getCellIDs: getCellIDs

View source: R/getCellIDs.R

getCellIDsR Documentation

getCellIDs

Description

Extracts cell IDs from a model mesh for each indicator region. Currently only supports spatialPolygonDataframes; spatialLines and spatialPoints have not been tested.

Usage

getCellIDs(
  modelMesh,
  indicatorRegions = RSM::IRMap[[2]],
  returnType = "polygons",
  modelName = NA,
  versionName = NA
)

Arguments

modelMesh

a SpatVector with model mesh cells and cell ID data (or, a character vector of the file address to be imported internally via rgdal::readOGR)

indicatorRegions

a SpatVector with indicator region data

returnType

specifies whether centroid points or partial mesh polygons are returned.

modelName

name of the model mesh used (e.g., rsm, COP)

versionName

name of the model version used (e.g., WERP)

Value

a dataframe with cell IDs, the corresponding indicator region names and other data. Specifically, the following columns must be present: from the indicator region data: "INDICATOR", "NAME". Columns required in the mesh data: "CellId", "Node1", "Node2", "Node3", "Topo_avg", "landuse"


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