Skip to main content
6 events
when toggle format what by license comment
Jun 11, 2020 at 15:27 history edited CommunityBot
Commonmark migration
Mar 3, 2011 at 16:23 comment added whuber The real difficulty in the entire procedure is that connecting disjoint segments can potentially create tiny self-intersections (depending on why and how the segment endpoints don't exactly match). This can be troublesome to fix in general. If such problems occur, consider cleaning up the polyline to eliminate such flaws.
Mar 3, 2011 at 15:24 comment added whuber @Bob Finding the closest point is a relatively simple GIS operation (even in 3D). Each segment PQ has two endpoints P and Q. First find the closest point to P among the collection of endpoints of all segments (not including PQ itself). It is the endpoint, R, of some different segment RS. Create the edge PQ-->RS labeled by P and R. Repeat the search relative to the endpoint Q to obtain the other edge. One thing I did not note: you need a tolerance threshold; if the nearest point is greater than the tolerance, conclude there is no nearest point.
Mar 3, 2011 at 8:31 comment added user2117 My current thinking is to use Matplotlib to plot the segments regardless of sequence, that would create the line but the points would need recreating. How?
Mar 3, 2011 at 8:21 comment added user2117 Thank you Whuber. I am going to need some time to evaluate your suggestion, but I already have some questions: you say "Let R be the closest endpoint". This I believe is the crux of the problem. There are three potential points of contact between segments, the x , the y and the z coordinates. Even if we eliminate the z coordinate because a line could be perfectly flat, that still leaves two choices. Remember the solution has to be programmed (in Python), no visual choice is possible.
Mar 3, 2011 at 6:49 history answered whuber CC BY-SA 2.5