Skip to content
Prev 24345 / 29559 Next

Error in checkForRemoteErrors(val) with sfClusterApplyLB()

On Thu, 28 Apr 2016, Marine Regis wrote:

            
Avoid snowfall unless you know that the code runs in general. The problem 
seems to be with your if conditions - you assume that ob1 is either a 
SpatialCollections object and has a lineobj slot, or that ob1 is a 
SpatialLines object, in both cases yielding ob2 as a SpatialLines object.

You do not check that ob1 is neither SpatialLines nor SpatialCollections, 
or if SpatialCollections that it has a lineobj slot. You need a further 
step where ob2 is initialised as NULL, and tested after the attempts to 
assign lines, branching on is.null(ob2).

Your data are likely not the same as those of the authors of the code you 
are trying to run, and they didn't write to take account of situations 
they didn't encounter.

Roger