Efficiently querying vector and raster data