Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getExtent

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


Description

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

Usage

getExtent(x, ...)

## S4 method for signature 'ANY'
getExtent(x)

## S4 method for signature 'geom'
getExtent(x)

## S4 method for signature 'Spatial'
getExtent(x)

## S4 method for signature 'sf'
getExtent(x)

## S4 method for signature 'Raster'
getExtent(x)

## S4 method for signature 'matrix'
getExtent(x)

Arguments

x

the object from which to derive the extent.

...

other arguments.

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

Examples

getExtent(gtGeoms$polygon)

getExtent(x = gtSP$SpatialPolygons)

getExtent(x = gtSF$multilinestring)

getExtent(x = gtRasters$categorical)

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

geometr

Generate and Modify Interoperable Geometric Shapes

v0.2.10
GPL-3
Authors
Steffen Ehrmann [aut, cre] (<https://orcid.org/0000-0002-2958-0796>), Dan Sunday [cph] (fast point-in-polygon algorithm.)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.