0

I have a raster file which is only partly covered by a shapefile with polygons.

Now I want to apply raster::extract in order to get the mean value for each polygon based on the rasterfile - But some features of the shapefile are complete outside of the rasterfile.

If I'm using snow clusters in order to speed the extraction up - I get the following error: R raster::extract Error in .local(x, y, ...) : cluster error at polygon: 1

Do you have an idea, how to resolve this issue?

3
  • Can you make a simple reproducible example or even just some sample code? I can never remember how to run over snow clusters...
    – Spacedman
    Commented Nov 5, 2019 at 15:43
  • 1
    Should be handled out of the box with the exactextractr package, if you want to give it a try (I'm the author.) Should remove the need to use snow.
    – dbaston
    Commented Nov 5, 2019 at 17:49
  • @dbaston thank you for your package! This works much fast compared to classical raster package and you can also use it with snow clusters! - Thanks! Commented Nov 8, 2019 at 14:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.