0

I have information about different locations in a Java List. Each location has it's coordinates (longitude and latitude) For example:

longitude = 2.37364
latitude = 42.38473

I need to look up using an API which bus stations are near each location (in a radius of 500m).

I want to know how can I relate the coordinate system with meters to filter the search.

  • There is an ellipsoidal relation between geodesic coordinates and meters over the ellipsoid. I do not know anything about Java, but you can look there: geographiclib.sourceforge.io/html/java – Gabriel De Luca Feb 10 at 21:02
  • Geographic degrees to geodesic meters is partial differential equation, only solvable through iterative means. You really want to find an open-source provider for this. – Vince Feb 10 at 21:39
  • For a search radius of 500m the earth is practically flat, and if you don't need much precision, you could scale the longitude by the lat-long aspect ratio at that latitude, then convert to approximate metres. Quick and dirty. Might get you 1m precision... – Spacedman Feb 10 at 22:27
  • possible duplicate of stackoverflow.com/questions/44249945/… – Ian Turton Feb 11 at 8:53
  • possible duplicate of stackoverflow.com/questions/36481651/… – Ian Turton Feb 11 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.