create_bounding_box: Create bounding box polygon

create_bounding_boxR Documentation

Create bounding box polygon

Description

This function creates a bounding box polygon from it's corner coordinates, setting the coordinate reference system from the supplied EPSG value.

Usage

create_bounding_box(xmin, ymin, xmax, ymax, epsg_number)

Arguments

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.

Value

The bounding box polygon returned as a sf spatial object.

See Also

The function was created following the approach taken in the stack overflow polygons from coordinates.

Examples

create_bounding_box(xmin = -10.81,
                    ymin = 49.85,
                    xmax = 2.07,
                    ymax = 60.96,
                    epsg = 4326)

gcfrench/store documentation built on May 17, 2024, 5:52 p.m.