Relative Content

Tag Archive for rforeachrastervisibilitydoparallel

Error in {task 1 failed – [readValues] cannot read values in R doParallel “foreach”

I am trying to speed up an intervisibility calculation between landscape viewpoints (X, Y, height), using a rasterprofile and line of sight functions over a digital elevation model. I ran a large-scale project like this on 1000 objects (ie. 1000 x 1000 calculations) 2 months back and successfully parallelized, shortening processing time more than 10fold. I am now reusing the same code on a slightly fewer features (341 x 1200) in a neighboring region. The parallelisation runs to the end as the counter shows, function cansee() is defined locally. My problem is that if I calculate intervisibility for more than 10 x 1200 features, the function fails to write out the final result, giving instead “[readValues] cannot read values” error, as you can see below: