Description Usage Arguments Details Value Author(s)
inside
returns indices of shapes that contain given points
1 | inside(shp, x, y)
|
shp |
shape object (as returned by |
x |
x coordinates of the points to match |
y |
y coordinates of the points to match |
The matching uses bounding box as a first approximation and then
CGAL point/polygon test to determine if a point is inside a shape,
returninig the first shape that matches or NA
otherwise.
Holes are supported as well as multi-part polygons.
If all=FALSE
:
Integer vector of the same length as the number of points, each value
is either an index of the first matching shape or NA
if the
point is not inside of any shapes.
If all=TRUE
:
List of integer vectors with the indices of matching shapes (which
whill be empty if there is no match). There will be as many elements
in the list as there are points.
Simon Urbanek
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.