- #1
kirk
- 3
- 0
Hi, any advice out there on an interesting challenge (at least a challenge for me :-)?
I am trying to come up with the easiest way to calculate the shortest distance between a single point and an arbitrary line. I want to start with lattitude and longitude coordinates for single point and for the endpoints of line segment.
It is a straightforward calculation to get the distance from the single point to the end points of the line segment using the lat/long.
But sometimes the shortest distance will be a perpendicular path to the line segment. I'm rusty on my geometry and not seeing the simple way of doing the calculations. is the answer just in rotation and translation of coordinates?
Any advice or tips out there?
I am trying to come up with the easiest way to calculate the shortest distance between a single point and an arbitrary line. I want to start with lattitude and longitude coordinates for single point and for the endpoints of line segment.
It is a straightforward calculation to get the distance from the single point to the end points of the line segment using the lat/long.
But sometimes the shortest distance will be a perpendicular path to the line segment. I'm rusty on my geometry and not seeing the simple way of doing the calculations. is the answer just in rotation and translation of coordinates?
Any advice or tips out there?