Adapted RasterLite2 _Query to be more like the others.