You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think we should also expose a get_map_area() function for making a Mercator rectangle with desired aspect ratio and buffer as well; this is useful for st_crop() other spatial data.
The text was updated successfully, but these errors were encountered:
get_buffered_area: takes an sf object and applies a buffer based on distance in meters or a distance based on a proportion of the diagonal distance across the bounding box
get_asp_adjusted_bbox: take an sf object or bbox and returns a new bbox adjusted to contain the original bbox while matching a provided aspect ratio
get_adjusted_bbox: calls get_buffered_area and get_asp_adjusted_bbox and optionally switch CRS
If you had an idea about how you wanted to implement a get_map_area function for snapbox, I'd be happy to take your thoughts, adapt my code, and create a pull request. One small related suggestion: it would be nice if the area parameter for layer_snapbox supported sf objects and used a separate bbox parameter if a user wanted to set the map area with a bounding box.
Whoops! I just realized that the functions you need to do this are already in the package just not documented and user accessible. You obviously don't need my code but I'm still happy to work on this if you have any suggestions.
I think we should also expose a
get_map_area()
function for making a Mercator rectangle with desired aspect ratio and buffer as well; this is useful forst_crop()
other spatial data.The text was updated successfully, but these errors were encountered: