gPolyByCentroid: Return polygons enclosed within a container (deprecated)

Description Usage Arguments Details Examples

Description

Pretty much a copy of gEnclosedCentroid but more robust

Usage

1
gPolyByCentroid(reference, centroids, container)

Arguments

reference

A SpatialPolygons or SpatialPolygonsDataFrame object with the values to be summarized within a containing polygon

centroids

A set of centroids for the reference polygons obtained by gCentroids

container

A SpatialPolygons or SpatialPolygonsDataFrame object of a single, container polygon

Details

Deprecated in favor gPolyByIntersect(container, reference, centroid = T) instead. Preserved for existing code that uses it.

Returns reference polygons whose centroids are enclosed within a containing polygon. Allows for (requires) the pre-specification of reference polygon centroids which is useful when there are a very large number of reference polygons. Uses a bounding box filter before any spatial operations which makes it much faster than a straight intersection.

Note: all inputs should be of class sp::SpatialPolygons|Points

Examples

1
gPolyByCentroid(blockgroups, sp::gCentroid(blockgroups, byid = T), cbsa)

townleym/mSpatial documentation built on May 31, 2019, 6:46 p.m.