njtierney / geotargets

Targets extensions for geospatial data
https://njtierney.github.io/geotargets/
Other
60 stars 4 forks source link

Tiling improvments #84

Closed Aariq closed 3 months ago

Aariq commented 4 months ago

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:

Let me know what you think. If you like the idea, I can properly deprecate creat_tile_exts() which in this PR is renamed to tile_n().

Aariq commented 3 months ago

What are your thoughts on tile_n becoming tile_grid or tile_spec. To me, the n implies that I would suggest a total number of elements - similar to how in dplyr there is n_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 into n 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()

njtierney commented 3 months ago

tile_grid() makes sense to me. I think that should be sufficient and we probably don't need tile_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.