Skip to content
Prev 15602 / 29559 Next

Subset SpatialLinesDataFrame with gIntersection and reattach data to new SpatialLinesDataFrame

On Sat, 14 Jul 2012, O'Hanlon, Simon J wrote:

            
SpatialLines SpatialPoints
          3303             1

shows that one returned object is non-conformant, so:

out_class <- sapply(out, class)
ri <- do.call("rbind", out[out_class == "SpatialLines"])

works.

Hope this helps,

Roger