Learn R Programming

geometr (version 0.2.10)

getPoints: Get the table of point coordinates

Description

Get tabular information of the point coordinates.

Usage

getPoints(x)

# S4 method for ANY getPoints(x)

# S4 method for geom getPoints(x)

# S4 method for Spatial getPoints(x)

# S4 method for sf getPoints(x)

# S4 method for Raster getPoints(x)

# S4 method for matrix getPoints(x)

Arguments

x

the object from which to derive the point coordinates.

Value

A tibble of the point coordinates of x.

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.

See Also

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

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab