This is a port of the excellent JavaScript geodesy module by Chris Veness to Swift.
All spherical functions are implemented and tested.
Geodesy functions in Swift ๐
License: MIT License
This is a port of the excellent JavaScript geodesy module by Chris Veness to Swift.
All spherical functions are implemented and tested.
The package doesn't compile with destination Apple Vision Pro
(Apple Vision Pro(Designed for iPad) is no problem.
Coordinate.swift:
#if os(OSX) || os(iOS)
import Darwin
#elseif os(Linux)
import Glibc
#endif
Maybe this is enough:
#if os(OSX) || os(iOS) || os(visionOS)
import Darwin
#elseif os(Linux)
import Glibc
#endif
Hey @florianreinhart!
First: Thank you very much for this great collection of useful geodesy functions!
This isn't a real issue but more a question. I'm currently struggling on calculating the perpendicular point of a line (p1, p2) and a point (p3) near the line.
Background: We are using MKPolyLine
to draw lines on the map. The user should be able to tap (p3) on (or near to) a line segment (p1, p2). Now I need the closest point in the line (the perpendicular point) to the touch point, to show a popup with detailed informations at this line point. It should look like this:
Now I'm asking myself if this is possible with your functions? Maybe I'm missing something, unfortunately I don't find a solution...
Question: Is this calculation possible with your library or is an entire new function needed to get the result?
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.