https://github.com/sbooth/geodesic
CLLocationCoordinate2D extensions for geodesic calculations.
https://github.com/sbooth/geodesic
geodesic geodesy swift
Last synced: 3 months ago
JSON representation
CLLocationCoordinate2D extensions for geodesic calculations.
- Host: GitHub
- URL: https://github.com/sbooth/geodesic
- Owner: sbooth
- License: mit
- Created: 2021-09-08T16:22:58.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-08-18T15:57:26.000Z (10 months ago)
- Last Synced: 2025-09-15T17:26:59.097Z (9 months ago)
- Topics: geodesic, geodesy, swift
- Language: Swift
- Homepage:
- Size: 46.9 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Geodesic
[](https://swiftpackageindex.com/sbooth/Geodesic)
[](https://swiftpackageindex.com/sbooth/Geodesic)
`CLLocationCoordinate2D` extensions for solving geodesic problems on an ellipsoid model of the Earth.
```swift
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
```
## Installation
### Swift Package Manager
Add a package dependency to https://github.com/sbooth/Geodesic in Xcode.
### Manual or Custom Build
1. Clone the [Geodesic](https://github.com/sbooth/Geodesic) repository.
2. `swift build`.
## License
Geodesic is released under the [MIT License](https://github.com/sbooth/Geodesic/blob/main/LICENSE.txt).