hunzikp / velox

https://hunzikp.github.io/velox/
119 stars 23 forks source link

vx$extract_points failure #31

Open beutelt opened 6 years ago

beutelt commented 6 years ago

I have been unable to make the point extraction function work using velox 0.2.0 package. For example, taking the code directly from page 19 of the current velox manual, the following error results..

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") library(sp) library(rgeos) coord <- cbind(runif(10), runif(10)) spoint <- SpatialPoints(coords=coord) vx$extract_points(sp=spoint)

Error in envRefInferField(x, what, getClass(class(x)), selfEnv) : ‘extract_points’ is not a valid field or method name for reference class “VeloxRaster”

Does this mean the vx$extract_points doesn't work, or is there another reason I am not seeing? Any help appreciated. I think velox is an amazing extension of R's handling of rasters. Regards Terry

pascaloettli commented 6 years ago

I cannot get the error. I get 10 points as expected

OS Version      : Ubuntu 18.04
R Version       : 3.5.1
sp Version      : 1.3-1
rgeos Version   : 0.3-28
velox Version   : 0.2.0