-1

I want to calculate the perpendicular distance between line and a point. LinePointA(latitude,longitude)-(48.294483,11.568453) LinePointB(latitude,longitude)-(48.283479,11.838929) PointC(latitude,longitude)-(48.561846,11.733314) Here AB is the line and C is the point. Expected distance as per google maps is 59.36 km Thanks in advance.

  • The answer is entirely dependent on whether you will only be considering lines and points close enough to be considered flat, or whether it needs to work for any set of valid global coordinates? – Phil H Oct 24 '18 at 08:22
  • Yes. Need to work with valid global coordinates. – Nikhil Vernekar Oct 24 '18 at 08:40

1 Answers1

0

You can try barefoot -- open source Java library for geometric operation with Earth coordinates.

Here is a solution for your problem -- https://github.com/bmwcarit/barefoot#spatial-search-and-operations

If you want to dive deeper and understand math, look this

Kirill Liubun
  • 1,965
  • 1
  • 17
  • 35