getType: Get the type of a spatial object.

Description Usage Arguments Value See Also Examples

Description

Get the type of a spatial object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
getType(x, ...)

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

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

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

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

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

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

Arguments

x

the object for which to determine the type.

...

other arguments.

Value

A vector of two values of the geometry type (point/line/polygon/grid) and the specific main type/class of x.

See Also

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

Examples

1
2
3
4
5
6
7
8
9
getType(x = gtGeoms$point)

getType(x = gtSP$SpatialPolygons)

getType(x = gtSF$multiline)

getType(x = gtRasters$categorical)

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

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