Returns information about the ids and attributes of the selected features
only. If geometry
is `TRUE, retrieves their geodata as well.
mapLayer.selectedFeatures(layer = NULL, geometry = FALSE, ...)
layer | layer (or ID of the layer) from which features should be retrieved. If not specified, defaults to the layer currently selected in QGIS. |
---|---|
geometry | if |
... | low-level parameters (such as |
If geometry
is FALSE
: a data frame of all features and their
attributes, with the data frame's row names giving the respective
QGIS-internal feature ids. If geometry
is TRUE
: a data frame of class sf
.