rasterframes
rasterframes copied to clipboard
Expand function signatures for rf_rasterize
Two points of friction:
- almost always and everywhere we are doing "rasterize geometry like this projected raster tile" and then having to pass in the various metadata bits of the PRT explicitly
- often enough we are rasterizing with a default-y value of 1 or as frequently expressed
F.lit(1)
Add the following signatures:
rf_rasterize(geom: Column, projected_rastr_tile: Column)
rf_rasterize(geom: Column, projected_rastr_tile: Column, cell_val: Column)
rf_rasterize(geom: Column, projected_rastr_tile: Column, cell_val: Int)
rf_rasterize(geom: Column, extent: Column, crs: Column, dimensions: Column) # nb not geom but extent, also note dims is a struct as returned by rf_dimension
rf_rasterize(geom: Column, extent: Column, crs: Column, dimensions: Column, cell_val: Column)
rf_rasterize(geom: Column, extent: Column, crs: Column, dimensions: Column, cell_val: Int)
We might even consider a flag for optionally reprojecting the geom from EPSG:4326. That is a common enough use case but expensive enough that it ought not be the default.