getFeatureIDs: getFeatureIDs

View source: R/getFeatureIDs.R

getFeatureIDsR Documentation

getFeatureIDs

Description

Extracts cell IDs from a model mesh for each indicator region. Currently only supports sf objects

Usage

getFeatureIDs(
  shpFeature,
  mesh = vect(system.file("extdata/gis/nsrsm_v352", "nsrsm_mesh_landuse.shp", package =
    "RSM"), "nsrsm_mesh_landuse"),
  cellIDcolumn = "CellId"
)

Arguments

shpFeature

an sf object with the indicator region, transect, point

mesh

sf object with model mesh cells and cell ID data (mesh must have a column named "CellId")

cellIDcolumn

name of column containing cell identifiers. Case insensitive.

Value

a list with three elements: a vector of cell IDs, (2) a vector indexing selected cells in the original mesh, and (3) a SpatVector object with the intersection of the mesh and the input shapefile


troyhill/RSM documentation built on Aug. 23, 2022, 2:40 p.m.