Learn R Programming

geometr (version 0.2.5)

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 ppp 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 table of the lower left and upper right corner of the extent of x.

See Also

Other getters: getCRS(), getFeatures(), getGroups(), getHistory(), getLayer(), getName(), getPoints(), getRes(), getType(), getWindow()

Examples

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

getExtent(x = gtSP$SpatialPolygons)

getExtent(x = gtSF$multilinestring)

getExtent(x = gtPPP)

getExtent(x = gtRasters$categorical)

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

Run the code above in your browser using DataLab