Reproject a bounding box to EPSG:3857 (Web Mercator).
Source:R/bbox_utils.R
reproject_bbox_to_3857.RdProjects all four sides of the bbox (not just two corners) by converting to a polygon first, ensuring the reprojected envelope is correct even at high latitudes or for large geographic extents.
Arguments
- xmin, ymin, xmax, ymax
Bounding-box corners in
from_crsunits.- from_crs
Source CRS — anything accepted by
sf::st_crs(), including integer EPSG codes, WKT strings, andcrsobjects.