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

getPoints

Get the table of point coordinates


Description

Get tabular information of the point coordinates.

Usage

getPoints(x)

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

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

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

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

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

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

Arguments

x

the object from which to derive the point coordinates.

Details

This table contains three columns (x, y and fid) and as many rows as there are points. In case x is a polygon, the last point of each distinct feature is a duplicate of its first point. In case x has the type 'grid', all layers are summarised into one tibble, as several layers must have the same extent and resolution, so that each point occurrs in each layer, merely with a different, layer-specific value.

Value

A tibble of the point coordinates of x.

See Also

Examples

getPoints(x = gtGeoms$polygon)

getPoints(x = gtGeoms$point)

# for raster objects, the @point slot is extracted from its compact form
gtGeoms$grid$continuous@point

getPoints(x = gtGeoms$grid$continuous)

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.