sp (version 0.9-73)

over-methods: consistent spatial overlay for points, grids and polygons

Description

consistent spatial overlay for points, grids and polygons: retrieves the indexes or attributes from one geometry at the spatial locations of another

Usage

over(x, y, returnList = FALSE, fn = NULL)
x

Arguments

x
geometry (locations) of the queries
y
layer from which the geometries or attributes are queried
returnList
logical; see value
fn
(optional) a function; see value

Value

  • an object of length length(x), or a data.frame with number of rows equal to length(x). If returnList is FALSE, a vector with indices of y for each geometry (point, grid cell centre, polygon or lines) in x. if returnList is TRUE, a list of length length(x), with list element i the vector of indices of the geometries in y that correspond to the $i$-th geometry in x.

See Also

overlay, point.in.polygon