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

getType

Get the type of a spatial object.


Description

Get the type of a spatial object.

Usage

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

Examples

getType(x = gtGeoms$point)

getType(x = gtSP$SpatialPolygons)

getType(x = gtSF$multiline)

getType(x = gtRasters$categorical)

getType(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.