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

Description Usage Arguments Value See Also Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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

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

Examples

1
2
3
4
5
6
7
8
9
getExtent(gtGeoms$polygon)

getExtent(x = gtSP$SpatialPolygons)

getExtent(x = gtSF$multilinestring)

getExtent(x = gtRasters$categorical)

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

geometr documentation built on Sept. 21, 2021, 1:07 a.m.