Learn R Programming

MazamaSpatialUtils (version 0.6.4)

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(dataset, uniqueID, sumColumns = NULL)

Arguments

dataset

object of class SpatialPolygonsDataFrame

uniqueID

unique identifier to determine which values are duplicated

sumColumns

vector of column names to be summed

Value

SpatialPolygonsDataFrame composed of grouped polygons.

Examples

Run this code
# NOT RUN {
SPDF <- organizePolygons(SimpleTimezones, "timezone", NULL)
# }

Run the code above in your browser using DataLab