GeoSphere

Hi All,

If anyone is interested, I've created the beginnings of a library for
handling coordinates at: https://github.com/akgrant43/GeoSphere

It only:

- Parses string coordinates
- Calculates the distance between coordinates
- Opens a web browser in OpenStreetMap at the receiver's coordinates

Examples of string formats that can be parsed:

- 144.61025 @ -38.28697
- 38° 17′ 13.09″ S, 144° 36′ 36.9″ E
- 38 deg 17' 13.09" S, 144 deg 36' 36.9" E
- https://www.openstreetmap.org/#map=18/-38.28697/144.61025

The distance calculation uses haversine (assumes the earth is a
sphere), which is good enough for my needs at the moment.

Thanks again to Sven, Benoit, Pierce and Richard for their input.

Cheers,
Alistair
Advertisements
%d bloggers like this: