TransWikia.com

Finding line equation (on Earth) using two GPS coordinates

Geographic Information Systems Asked by danieln on September 4, 2021

Assuming I have two GPS coordinates, how can I find the equation of Earth horizontal line that passes between them?

I tried searching for a method of finding a line on a sphere that passes through two points, but couldn’t find any.

One Answer

If you think the Earth as a sphere, you probably looking for the great circle (orthodrome), the shortest path on the surface of the sphere. You should find the circle which is in the plain of the two points on the surface and the center of the sphere. The center of the great circle is in the center of the sphere.

Here is an image

If you think the Earth as an ellipsoid, you probably looking for the geodetic line, the shortest path on the surface of an ellipsoid.

If you think about a projected coordinate system (e.g. EPSG:3857 Web Mercator projection), then you can calculate line equation between the two points on the projection plain. First you have to calculate the projected coordinates (east, north) using for example cs2cs utility of the proj open source library.

Answered by Zoltan on September 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP