Skip to content
Prev 24450 / 29559 Next

Overlay between polygons and their intersecting lines

On 28/05/16 00:21, Vijay Lulla wrote:
I don't see what it is you have trouble with (except lacking documentation)
Sorry, my mistake. You'll find details in vignette("over")

over() finds intersections without ordering them, so if a line overlaps
polygon A but touches polygon B, it might as well return polygon B as
your match, where you were hoping for polygon A.

With minDimension = 1 the dimensionality of the intersection (read the
help of rgeos::gRelate) needs to be at least one, so touching (a point:
0-dimensional) is ignored, and polygon A would be returned.

minDimension is now 0 by default; other values might make more sense,
depending on the geometries at hand. A problem is that this increases
the computational burden quite a bit (requiring gRelate instead of
gIntersects).