rasterframes icon indicating copy to clipboard operation
rasterframes copied to clipboard

Expand function signatures for rf_rasterize

Open vpipkt opened this issue 6 years ago • 0 comments

Two points of friction:

  1. 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
  2. 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.

vpipkt avatar Nov 08 '19 16:11 vpipkt