Skip to main content
Question

Measuring the distance from a point to a line

  • July 10, 2013
  • 3 replies
  • 524 views

Forum|alt.badge.img+1
Hello,

 

 

I have a dataset (many datasets) that have a single line (of arbitrary orientation) and a large number of points.

 

 

I wish to add the perpindicular distance to the line as an attribute to each of the points.  This seems like a simple GIS question with an easy answer ... but I can't find it.

 

 

The closest I have come is the NeighborFinder, but if I use the points as bases, and the line as a candidate, it appears to measure the distance to an endpoint of the line, not the closest point.  The NeighborFinder works properly if I use the line as the base and the points as candidates, but then it only finds one point and the attribute is added to the line, and I need it the other way around.

 

 

Is there a simple way to do this, or do I need to do the geometric math myself and just calculate the distance with an arbitrary formula?
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • July 11, 2013
Hi,

 

 

You can do that with the NeighborFinder. Input the lines to BASE port, input the points to CANDIDATE port and specify the "Close Candidate List Name" parameter of the NeighborFinder. Then each line feature from MATCHED port will have a list attribute which contains the information (including distance etc.) about all points close to the line.

 

 

Takashi

Forum|alt.badge.img+1
  • Author
  • July 11, 2013
So, then I will have attributes for all the points, but they are on the line feature.

 

 

I need the distance attribute to be added to the existing attributes of the point feature.  Having it on the line doesn't help.

takashi
Celebrity
  • July 11, 2013
Go back to your first approach, try inputting the points to BASE, the lines to CANDIDATE. I think the closest point of a base point  will be the true closest point on the candidate line, it's not always an end point of the line. Confirm this again.

 

 

Takashi