coords2spi: Convert coordinates to spatial information

Description Usage Arguments Value Author(s) See Also Examples

View source: R/coords2spi.R

Description

Wrapper function for 'sp::over' in overlaying points over polygons to retrieve relevant intersection information.

Usage

1
coords2spi(points, global)

Arguments

points

a data frame with two columns of coordinates, or a Spatial object listed here under "x" in showMethods(sp::over). These represent points to be mapped onto polygon(s). Coordinates in 'points' should be in the same column order as those in 'global'

global

an object onto which 'points' is mapped, possible classes corresponding to 'points' listed under "y" in showMethods(sp::over). If 'points' is a data frame, it will be converted into a SpatialPoints object.

Value

a data frame corresponding to the coordinates in 'points' mapped onto 'global' with the attributes of 'global'

Author(s)

Atreya Shankar

See Also

over

Examples

1
2
3
4
5
6
## Not run: 

require(rworldmap)
test <- demystas::coords2spi(as.data.frame(cbind(60,50)), getMap(resolution="low"))

## End(Not run)

pik-piam/demystas documentation built on Oct. 26, 2019, 12:15 a.m.