Each geometry in a GRASS vector has a "category" number (abbreviated "cat" in output and modules). Geometries can have the same or different numbers, but for functions to work as intended, they often need to have sequential category values, starting at 1, with no skips between integers. This function reconstitutes the category values of a vector in GRASS so they being with 1 and have no skips. This function is mostly of use to developers.
Arguments
- x
A
GVector
or thesources()
name of a vector in GRASS.- gtype
Character: Type of vector features in GRASS format (i.e., either
point
,line
, orarea
). Seegeomtype()
.- cats
NULL
(default) orinteger
orcharacter
vector: Category values of the GRASS vector. Supplying these can speed the re-assignment of categories. The values ofcats
is not used as the new category values. Rather, they will be used to indicate which geometries belong to the same multi-part feature.
Value
The sources()
name of a vector.