4 ms·
This assumes the earth model to be sphere. GeographicLib [1], however, works according to WGS84 earth model which is an ellipsoid. Anyone knows why they used a
by ducktective 5y ago
This assumes the earth model to be sphere. GeographicLib [1], however, works according to WGS84 earth model which is an ellipsoid.
Anyone knows why they used a sphere model and why they didn't just use GeographicLib (MIT license)?
[1]: https://geographiclib.sourceforge.io/ https://geographiclib.sourceforge.io/
- tantalor 5y ago> Why not project onto an ellipsoid? (The Earth isn’t quite ellipsoidal either, but it is even closer to being an ellipsoid than a sphere.) The answer relates to the other goals stated above, namely performance and robustness. Ellipsoidal operations are still orders of magnitude slower than the corresponding operations on a sphere. Furthermore, robust geometric algorithms require the implementation of exact geometric predicates that are not subject to numerical errors. While this is fairly straightforward for planar geometry, and somewhat harder for spherical geometry, it is not known how to implement all of the necessary predicates for ellipsoidal geometry. http://s2geometry.io/about/overview http://s2geometry.io/about/overview
- jacobolus 5y agoDepends what you want to do. If you want to compute a few very precise bearings, distances, areas, etc. (say for some navigation or surveying application) you should use an ellipsoidal model or even something fancier if your requirements are very exacting. If you want to do computational geometry or spatial indexing with millions of objects, you might prefer to trade accuracy for speed and model with a sphere.