overlay-methods {sp}R Documentation

Methods for spatially overlay-ing points (grids) and rings layers

Description

overlay combines points (or grids) and rings by performing point-in-polygon operation on all point-ring combinations.

Methods

x = "SpatialPoints", y = "SpatialPolygons"
returns a numeric vector of length equal to the number of points; the number is the id (number) of the ring of y in which a point falls; NA denotes the point does not fall in a ring; if a point falls in multiple rings, the last ring is recorded.
x = "SpatialPointsDataFrame", y = "SpatialPolygons"
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 fallin in each ring (set) of y
x = "SpatialPolygons", y = "SpatialPoints"
returns the ring id of points in y; if x is a SpatialRingDataFrame, a data.frame with rows from x corresponding to ponits in y is returned.
x = "SpatialGridDataFrame", y = "SpatialPoints"
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.
x = "SpatialGrid", y = "SpatialPoints"
returns grid values x at spatial point locations y; NA for NA grid cells or points outside the grid
x = "SpatialPixelsDataFrame", y = "SpatialPoints"
returns grid values x at spatial point locations y; NA for NA grid cells or points outside the grid
x = "SpatialPixels", y = "SpatialPoints"
returns grid values x at spatial point locations y; NA for NA grid cells or points outside the grid

Note

points on a ring boundary and points corresponding to a ring vertex are considered to be inside the ring

Author(s)

Edzer J. Pebesma, e.pebesma@geo.uu.nl

See Also

overlay, point.in.polygon


[Package sp version 0.7-12 Index]