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 (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-11T16:09:53.000Z (12 months ago)
- Last Synced: 2025-04-17T14:19:23.225Z (6 months ago)
- Topics: geodesic, geodesy, swift
- Language: Swift
- Homepage:
- Size: 42 KB
- Stars: 5
- 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).