climr
climr copied to clipboard
Allow user to supply a raster/polygon shapefile instead of table of point locations
It would be great that climr functions (e.g. climr_downscale) accepted a polygon shapefile or a raster layer instead of a table of point locations.
things to consider:
- would this be implemented in
climr_downscaleonly or in inner functions (e.g.downscale)? - if providing a polygon,
climrwill need to get/use its own DEM -- document where it comes from and its attributes - if providing a raster, do we want to allow the user to:
- provide a DEM?
- a raster of cell locations AND a DEM?
- or just a raster of locations and always use
climr's default DEM?
note that in options 2 and 3, the attributes of the target raster (e.g. resolution, projection) could differ from the DEM's
Agreed. Specifically for the raster option, it would be worth potentially having the internal functions use terra direction instead of data.table, e.g. as in https://github.com/bcgov/climr/issues/84#issue-1899148480