Answer the question
In order to leave comments, you need to log in
Is it possible to check partial overlap of segments?
There are two polylines, they can intersect each other, but one cannot overlap any part of the other.
What is the best way to check this?
While there were such thoughts:
1. Compare each segment with each. Get their arrays of points somehow (not from where to where, but everything, possibly based on the size of the coordinate grid cell). Compare whether more than one matches.
2. Check the angle relative to the axis if the last point lies on the segment and the angle is one, then they overlap.
Answer the question
In order to leave comments, you need to log in
If we are talking about broken lines consisting of straight segments, here is an option -
Algorithm for finding the segment overlapping two ...
where the segments do not formally overlap, but taking into account the scale, they are taken as overlap). It's a little more complicated and requires experimentation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question