Description Arguments Value Examples
Given a set of points, returns all raster values of the cells with which they intersect.
sp |
A SpatialPoints* object or a sf* POINT object. |
A numeric matrix. One row per element in sp
, one column per band in the VeloxRaster.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Make VeloxRaster with two bands
set.seed(0)
mat1 <- matrix(rnorm(100), 10, 10)
mat2 <- matrix(rnorm(100), 10, 10)
vx <- velox(list(mat1, mat2), extent=c(0,1,0,1), res=c(0.1,0.1),
crs="+proj=longlat +datum=WGS84 +no_defs")
## Make SpatialPoints
library(sp)
library(rgeos)
coord <- cbind(runif(10), runif(10))
spoint <- SpatialPoints(coords=coord)
## Extract
vx$extract_points(sp=spoint)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.