Learn R Programming

MazamaSpatialUtils (version 0.7.6)

organizePolygons: Organize ungrouped polygons

Description

Determines if the SpatialPolygonsDataFrame is grouped. If ungrouped, function will group duplicated values based on the provided unique identifier.

If sumColumns is NULL and there are multiple rows that aren't duplicated but have the same uniqueID, the original SpatialPolygonsDataFrame will be returned.

Usage

organizePolygons(SPDF, uniqueID, sumColumns = NULL)

Value

SpatialPolygonsDataFrame composed of grouped polygons.

Arguments

SPDF

Object of class SpatialPolygonsDataFrame.

uniqueID

Unique identifier to determine which values are duplicated.

sumColumns

Vector of column names to be summed.