I have several points. These points are far from some lines.

I want to make the following:

If two points are closer to each other than the maximum distance of one of these points to the closest line, then connect the points to each other and connect the point that is closer to the line to the line. Is there a quick way of doing it?

I have used the xy to line to connect points to the line, but I do not know how to make this operation. Attached a snapshot to make it more clear. enter image description here

(Edit - should the screenshot look more like this? The two points on the left are closer to each other than to the line, so they are connected to each other. The two points on the right are closer to the line than to each other, so they are connected to the line)

enter image description here

  • 3
    For your graphic example, should the points connect together since that distance is closer than the point to line distance?
    – artwork21
    Jul 3, 2014 at 16:57
  • 1
    have a look at this. gis.stackexchange.com/questions/18307/…
    – Dom
    Jul 3, 2014 at 17:21
  • 2
    Dimitris, I agree with artwork21 your image does not agree with your text, please clarify?
    – Hornbydd
    Jul 3, 2014 at 19:45
  • 2
    I've added an alternative screenshot based on the description. @dimitris if the new screenshot is correct, please delete the original screenshot - if it's wrong, please delete the new screenshot instead. Jul 3, 2014 at 22:48
  • The alternative screenshot is close to what I want to do. Indeed these two points should connect to each other, but one of those should also be connected to the red line. So in the first screenshot, I want the point who is further from the line not to be connected to the line as shown but to the other point instead.
    – dimitris
    Jul 4, 2014 at 7:18


Browse other questions tagged or ask your own question.