| a5_bbox | R Documentation |
Returns, for each polygon feature, the longitude/latitude box that
contains its edges as A5 draws them: great circles between consecutive
vertices (see a5_polygon_to_cells()). Such an edge bows toward the pole,
so the box can extend beyond the latitudes of the vertices, which a plain
vertex bounding box would miss. A ring that winds around a pole extends
the box to that pole across all longitudes.
a5_bbox(x)
x |
A polygon-like geometry. One of:
|
Longitudes are continuous: a box crossing the antimeridian has xmin
between -180 and 180 and xmax above 180.
A wk::rct() vector with one box per feature (one for matrix and
data.frame input), in WGS 84 longitude and latitude. NA for a
missing or empty geometry.
a5_polygon_to_cells()
# an edge along 60 degrees north bows toward the pole
poly <- wk::wkt("POLYGON ((-30 50, 30 50, 30 60, -30 60, -30 50))")
a5_bbox(poly)
wk::wk_bbox(poly)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.