overlay-methods {sp} | R Documentation |
overlay combines points (or grids) and polygons by performing point-in-polygon operation on all point-polygons combinations.
returns a numeric vector of length
equal to the number of points; the number is the index (number) of the polygon of y
in which a point falls; NA denotes the point does not fall in a polygon; if a point
falls in multiple polygons, the last polygon is recorded.
equal to the previous method,
except that an argument fn=xxx
is allowed, e.g. fn = mean
which will
then report a data.frame with the mean values of the x
points falling in each
polygon (set) of y
returns a data.frame of the second argument with row entries corresponding to the first argument
returns the polygon index of points in y
;
if x
is a SpatialPolygonsDataFrame
, a data.frame with rows from x
corresponding to points in y
is returned.
returns object of class SpatialPointsDataFrame with grid attribute values x at spatial point locations y; NA for NA grid cells or points outside grid, and NA values on NA grid cells.
returns grid values x at spatial point locations y; NA for NA grid cells or points outside the grid
returns grid values x at spatial point locations y; NA for NA grid cells or points outside the grid
returns grid values x at spatial point locations y; NA for NA grid cells or points outside the grid
points on a polygon boundary and points corresponding to a polygon vertex are considered to be inside the polygon
Edzer Pebesma, edzer.pebesma@uni-muenster.de