Closed LCroote closed 4 years ago
Thanks for an excellent report! For visual reference, the raster and polygon look like this:
plot(r)
plot(st_geometry(p), add=TRUE)
In which the extracted cells can be seen:
exact_extract(r, p, include_xy=TRUE)[[1]] %>%
st_as_sf(coords=c('x','y')) %>%
st_geometry() %>%
plot(pch=7, cex=0.8, add=TRUE)
Will try to bring up in the debugger and see what I can figure out.
Thanks, yes the images are much more insightful! I am looking forward to your response.
I have a candidate fix in place.
remotes::install_git('https://gitlab.com/isciences/exactextractr', ref='gh-23')
Thanks very much for the quick response and fix, that seems to do the trick!
Fixed version (0.2.1) is now in CRAN, by the way.
Hi, Thanks for a awesome and fast package. I have been using
exact_extract
quite a bit but have run into a problem.I was trying to extract raster values into a polygon that sits well within the bounds of the raster, but values are only being extracted onto the border of the polygon.
When I compared to the results of
raster::extract
there was no problems. I haven't managed to be able to make a small reproducible example as this problem only showed up now and I have been usingexact_extract
for a while now.Any help would be much appreciated!
Data (Sorry for the
dput
dump):