Learn R Programming

geometr (version 0.2.8)

getExtent: Get the extent (bounding box) of a spatial object.

Description

Get the extent (bounding box) of a spatial object.

Usage

# S4 method for ANY
getExtent(x)

# S4 method for geom getExtent(x)

# S4 method for Spatial getExtent(x)

# S4 method for sf getExtent(x)

# S4 method for Raster getExtent(x)

# S4 method for matrix getExtent(x)

Arguments

x

the object from which to derive the extent.

Value

A tibble of the lower left and upper right corner coordinates of the extent of x. This table two columns (x and y) and two rows (minimum and maximum).

See Also

Other getters: getCRS(), getCols(), getFeatures(), getGroups(), getHistory(), getLayers(), getNames(), getPoints(), getRes(), getRows(), getType(), getWindow()

Examples

Run this code
# NOT RUN {
getExtent(gtGeoms$polygon)

getExtent(x = gtSP$SpatialPolygons)

getExtent(x = gtSF$multilinestring)

getExtent(x = gtRasters$categorical)

getExtent(x = matrix(0, 3, 5))
# }

Run the code above in your browser using DataLab