Get or add stratum names from a SpatialPolygonsDataFrame

getStratumNames(
  stratumPolygon,
  StratumNameLabel = c("StratumName", "polygonName"),
  check.unique = TRUE,
  accept.wrong.name.if.only.one = FALSE
)

addStratumNames(
  stratumPolygon,
  StratumNameLabel = c("StratumName", "polygonName"),
  check.unique = TRUE,
  accept.wrong.name.if.only.one = FALSE
)

Arguments

stratumPolygon

A StratumPolygon.

StratumNameLabel

The name of the attribute representing the stratum names in the GeoJSON file or shapefile. When reading WKT or txt files the StratumNameLabel is ignored, as those formats does not support column names.

check.unique

Logical: If TRUE, an error is given if stratum names are not unique.

accept.wrong.name.if.only.one

Logical: If TRUE, interpret stratum names if only one column in the StratumPolygon.