Skip to main content
7 votes

Difference between Vincenty and great-circle distance calculations?

My apologies for posting a second answer here, but I taking the opportunity to respond to the request by @craig-hicks to provide accuracy and timing comparisons for various algorithms for computing ...
cffk's user avatar
  • 3,291
4 votes
Accepted

Lines as Great circles on a map

All comments look great but let me draw your attention to new Beeline plugin (Oct.2017~). Probably no explanations are needed. Enjoy!
Kazuhito's user avatar
  • 31.1k
4 votes

Projecting Cross-Track distance on great Circle?

EDIT: I deleted my previous answer as it was wrong. First big mistake I made was performing dot and cross products using spherical coordinates. One needs to convert them to Cartesian first. (I didn't ...
Jason's user avatar
  • 141
4 votes
Accepted

Interpolating orthodrome between two (lon,lat) points in Python?

I have found a good solution: pyproj.Geod.npts: from pyproj import Geod lon0, lat0 = 10, 10 lon1, lat1 = 20, 20 n_extra_points = 100 geoid = Geod(ellps="WGS84") extra_points = geoid....
Felix's user avatar
  • 183
3 votes

PostGIS Splitting complex linestring over dateline

First of all, this has nothing to do with the dateline, this is a 180W/E issue. And I would also say this is not a postgis issue, this is a problem coming up in the software presenting the data. If ...
MortenSickel's user avatar
  • 3,834
3 votes

Concept behind longitudes

Trying to put it really simply, the way I see it is this. If I go out with my compass (or gps, or some other kind of navigation tool) and head north I will eventually get to a point where I can't head ...
Midavalo's user avatar
  • 29.9k
3 votes
Accepted

Concept behind longitudes

Latitude and longitude: theoretical constructs, based on natural phenomenon Latitude is an empirical measurement — the distance you are between the pole and the equator — and has been measured for ...
Babel's user avatar
  • 73.9k
3 votes
Accepted

Calculating distances with PROJ4J

This function implements the Haversine formula (see the source code here - it is indeed not documented). The input parameters are geographical coordinates (double lon1, double lat1, double lon2, ...
julien's user avatar
  • 10.2k
3 votes
Accepted

Drawing curved lines in Carto?

A very common mistake when trying to connect points with lines using CARTO is forgetting one or many of the mandatory fields that should appear in the query of your map: cartodb_id, the_geom and ...
ramiroaznar's user avatar
  • 4,449
3 votes

Formula for the great circle arc between two points (lng/lat coordinates)

You can use GeographicLib, which has bindings to several programming languages. For example, the JavaScript version has an example to compute waypoints between two points. Essentially, you create an ...
Mike T's user avatar
  • 42.3k
3 votes

Moving dead ahead: rhumb line, great circle or none

I know the question has answered already, but allow me to show you something cool for future use: A live Google map where you can move the edge markers affecting the great circle and rhumb line same ...
hookie's user avatar
  • 31
3 votes
Accepted

How to create Great Circle Mapper style range rings in QGIS?

The best workaround is to clip your circle with a polygon covering nearly the world. Put Nr;WKT 1;POLYGON ((179.9 89.9, 179.9 -89.9, -179.9 -89.9, -179.9 89.9, 179.9 89.9)) in a text file, and ...
AndreJ's user avatar
  • 76.9k
3 votes

Difference between Vincenty and great-circle distance calculations?

Whether using vincenty or haversine or the spherical law of cosines, there is wisdom in becoming aware of any potential issues with the code you are planning to use, things to watch out for and ...
always_learning's user avatar
2 votes

Difference between Vincenty and great-circle distance calculations?

It appears that the geopy.distance package offers a function "distance()" which defaults to vincenty(). I would recommend using distance() on principle, as it is the package recommendation, in case ...
Craig  Hicks's user avatar
2 votes
Accepted

Recommendation for a book for geographical distance calculations

One place to start is the bibliography provided by the geographiclib of Charles Karney. This starts at the begining with: I. Newton, Philosophiae Naturalis Principia Mathematica (3rd edition, ...
Ian Turton's user avatar
  • 82.7k
2 votes
Accepted

How to calculate straight line distance from spherical distance

Thanks to trigonometric functions we know that where is your spherical distance, is the earth radius in km, and stands for "euclidian". Since the earth is only approximately spherical, you should ...
keepAlive's user avatar
  • 350
2 votes
Accepted

Least-cost path = great-circle path in open ocean? (R) (gdistance)

I think people have unrealistic expectations of what gdistance algorithms can do. With directions=8, any path across a free space will consist of N diagonal steps and then M horizontal (or vertical) ...
Spacedman's user avatar
  • 65.6k
2 votes

Projecting Cross-Track distance on great Circle?

With PyQGIS it is not difficult to do that. For example, for this situation: where orange line represents a great circle, next code find these "red points" by using 'closestSegmentWithContext' of ...
xunilk's user avatar
  • 30.1k
2 votes

Plotting great circle lines in Cesium (just getting started)?

Use a Polyline for something like this. Here's a live demo. var viewer = new Cesium.Viewer('cesiumContainer'); var airportData = { "EDDM": { "icao": "EDDM", "iata": "MUC", ...
emackey's user avatar
  • 1,456
1 vote

How to illustrate geodesic line reflecting bearing between two points + third projected point

The problem is not in your data, it's the rendering. Depending of the tool you use, you will have potentially different results. For example, if you use a planar projection like with QGIS in 3857, you ...
robin loche's user avatar
  • 2,495
1 vote

PostGIS Splitting complex linestring over dateline

MortenSickel's answer got me most of the way. What I did was I managed to use this code: SELECT ST_WrapX(ST_Split((SELECT ST_ShiftLongitude( 'SRID=4326;LINESTRING (MY LINESTRING COORDINATES)'::...
Thomas Owen's user avatar
1 vote

Why ellipsoidal distance measured in EPSG:7030 in QGIS?

If it using ellipsoidal option, does it mean measured using great circle formula in ellipsoid model? Yes. I tested this by drawing a line with the measure tool from Nome, Alaska to Longyearbyen, ...
dericke's user avatar
  • 992
1 vote

Error in mapping connections with great circles

I found a solution on my own (thank you for your suggestion @spacedman). The problem was due to the way I defined the basemap aestetics. Initially, I was defining the map aesthetics in ggplot() ...
Filippo Santi's user avatar
1 vote

Distance between coordinates computation speed: conversion to UTM vs Great Circle

1) IMHO, If your app were to run on a present-day server/desktop/notebook, be it real or virtual, any amount of effort you put into ramping up the computation throughput will far outweigh the return. ...
Ralph Tee's user avatar
  • 1,732
1 vote

St_Segmentize on CARTO

looking at this again, I think you've got it working :-) some of the long-haul routes are showing up as curved, although it's difficult to see - there are a lot of short-haul routes in there. ...
Steven Kay's user avatar
  • 20.5k
1 vote

Iterate over geopandas dataframe returning nearest point on each LineString

You might want to try rtree. It is the fastest way to retrieve nearest geometries especially when you have a large number of geometries involved. An example of geopandas itself implementing r-tree ...
Shangdaemon's user avatar
1 vote
Accepted

Projecting Cross-Track distance on great Circle?

I found the answer to my question by using the algorithms suggested on this website. The idea is to find the along-cross distance defined as: along-track distance: distance between the start point ...
Federico Gentile's user avatar
1 vote

Confusion regarding distance calculation in R (euclidean distance, "great circle distance")

EPSG 3857 is a Mercator projection, and this is not a suitable choice for distance calculations, generally. This can be a subtle and tricky topic, and your example brings out an problem very clearly....
mdsumner's user avatar
  • 8,226
1 vote

Moving dead ahead: rhumb line, great circle or none

So I found this question in a search for why the great circle route requires course corrections, and this post got me to my answer but didn't answer it directly. As what @gansub says, latitude circles ...
Jon Thompson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible