Description Usage Arguments Details Examples
Pretty much a copy of gEnclosedCentroid but more robust
1  | gPolyByCentroid(reference, centroids, container)
 | 
reference | 
 A   | 
centroids | 
 A set of centroids for the reference polygons obtained by   | 
container | 
 A   | 
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
1  | gPolyByCentroid(blockgroups, sp::gCentroid(blockgroups, byid = T), cbsa)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.