Closed Aariq closed 3 months ago
What are your thoughts on
tile_n
becomingtile_grid
ortile_spec
. To me, then
implies that I would suggest a total number of elements - similar to how in dplyr there isn_groups
,n_distinct
. Whereas in specifying a grid or a spec, we are suggesting that there is more information to be specified.A
tile_n
function could then be specified that must be a square number, and that could then specify breaking it inton
tiles. e.g.,tile_n(4)
would be a 2x2.I am happy to write this out if you'd like.
tile_grid()
makes sense to me. I think that should be sufficient and we probably don't need tile_n()
tile_grid()
makes sense to me. I think that should be sufficient and we probably don't needtile_n()
Great! I will open a separate issue to log the idea of tile_n()
in case we think it might be useful later on.
This follows the discussion in #83 and implements the version where
tar_terra_tiles()
takes a function name or anonymous function.I like this because:
Limitations:
Possible tweaks:
tile_blocklist
it would betile_blocklist(my_raster)
and instead of\(x) tile_n(x, 2, 2)
it would betile_n(my_raster, 2, 2)
wheremy_raster
would be the sameSpatRaster
object/target supplied to theraster
argument oftar_terra_tiles()
.Let me know what you think. If you like the idea, I can properly deprecate
creat_tile_exts()
which in this PR is renamed totile_n()
.