create_bounding_box | R Documentation |
This function creates a bounding box polygon from it's corner coordinates, setting the coordinate reference system from the supplied EPSG value.
create_bounding_box(xmin, ymin, xmax, ymax, epsg_number)
xmin |
The left corners easting coordinate as an integer or double. |
ymin |
The lower corners northing coordinate as an integer or double. |
xmax |
The right corners easting coordinate as an integer or double. |
ymax |
The upper corners northing coordinate as an integer or double. |
epsg_number |
EPSG number as an integer. |
The bounding box polygon returned as a sf spatial object.
The function was created following the approach taken in the stack overflow polygons from coordinates.
create_bounding_box(xmin = -10.81,
ymin = 49.85,
xmax = 2.07,
ymax = 60.96,
epsg = 4326)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.