biodiverse
biodiverse copied to clipboard
raster imports: Use a def query to constrain imports
Extracted from to do list for #761 but has more general application.
Use a def query to speed up analyses. Target basedata might be a very small subset of the raster being imported, for example global data from Worldclim being applied to a basedata of Indonesian plants.
Def query for property imports can be the intersection of the extents.
It should be possible to do this using a Virtual Raster Table to map into the target raster: https://gdal.org/drivers/raster/vrt.html#simplesource
Probably only need to do so when bounds overlap, and adjust the VRT to the intersection so we avoid processing a heap of nodata.