Skip to content

CLLocationCoordinate2D extensions for geodesic calculations.

License

Notifications You must be signed in to change notification settings

sbooth/Geodesic

Repository files navigation

Geodesic

CLLocationCoordinate2D extensions for solving geodesic problems on an ellipsoid model of the Earth.

let lax = CLLocationCoordinate2D(latitude: 33.9424964, longitude: -118.4080486)
let jfk = CLLocationCoordinate2D(latitude: 40.6399278, longitude: -73.7786925)
let distance = lax.distanceTo(jfk)
// distance is approx. 3,982,961 m

License

Geodesic is released under the MIT License.