Possible duplicate:
Working with latitude / longitude values โโin Java
Duplicate:
- Working with latitude / longitude values โโin Java
- How to calculate the distance between two points of longitude latitude?
I need to calculate the distance between two points given by two coordinates. The project I'm working on is a Java project, so the Java code will be great, but the pseudocode can also be set, then I can implement it myself :)
As you probably know, there are three ways to represent coordinates:
- Degrees: minutes: seconds (49 ยฐ 30'00 "N, 123 ยฐ 30'00" W)
- Degrees: decimal minutes (49 ยฐ 30.0 ', -123 ยฐ 30.0'), (49d30.0m, -123d30.0 ')
- Decimal degrees (49.5000 ยฐ, -123.5000 ยฐ), usually with 4-6 decimal numbers.
This is the third way my coordinates are indicated, so the code for these values โโwill be preferable :)
java latitude-longitude distance
Espen Herseth Halvorsen May 08 '09 at 1:38 a.m. 2009-05-08 01:38
source share