I have a position (A) in longitude and latitude.
I have a line segment with start (B) and end (C) points in longitude and latitude.
What I am trying to calculate is the shortest distance from A to line B<->C. In other words the distance from A to the closest point (on line BC) in meters.
Thanks in advance.
I think you could read this link to get the intersection point between A and the perpendicular line to BC passing on A.
Then using formulas (and code ready) from here you should be able to solve your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With