Description Usage Arguments Details Examples
This is the preferred function. It has been optimized for speed and flexibility. Allows choice of centroid or areal overlap (intersection). Amount of overlap (for non-centroid intersection methods) specified by threshold
defaults to zero which returns an intersection for two polygons that share any one point (unfortunately) including a border.
1 | gPolyByIntersect(container, reference, threshold = 0, centroid = F)
|
container |
The single polygon that will enclose the set of reference polygons |
reference |
The set of polygons that will be selected down to the containing polygon based on areal overlap |
threshold |
The percent of areal overlap required for inclusion (ignored if |
centroid |
Logical return reference polygons whose centroids are contained within the container |
Note: all inputs should be of class sp::SpatialPolygons|SpatialPolygonsDataFrame
.
Will warn if CRS mismatch between reference / container.
1 2 3 4 | bgoi.clip = gBoundingPolyClip(box_parkway, bg_no_data)
bgoi.cent = gPolyByIntersect(box_parkway, bgoi.clip, centroid = T)
bgoi.area.20 = gPolyByIntersect(box_parkway, bgoi.clip, threshold = 0.2)
bgoi.intersect = gPolyByIntersect(box_parkway, bgoi.clip)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.