getGroups: Get the table of group attributes

Description Usage Arguments Details Value See Also Examples

Description

Get the table of group attributes

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
getGroups(x)

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

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

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

Arguments

x

the object from which to derive the attribute table.

Details

This table contains at least the column 'gid'.

When this function is called on "ANY" object, it is first tested whether that object has features (getFeatures), from which the groups can be reconstructed. If this is not the case, NULL is returned.

Value

A tibble (or a list of tibbles per layer) of the group attributes of x.

See Also

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

Examples

1
2
3
4
5
getGroups(x = gtGeoms$polygon)

# for raster objects, groups are pixels with the same value and their
# attributes are in the raster attribute table (RAT)
getGroups(x = gtRasters)

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