Project: QGIS

Version: 3.6.0

Feature: API for calculating Geodesic lines

New PyQGIS API for calculation of geodesic lines (shortest distance on an ellipsoid) has been added to QgsDistanceArea, which utilises the mature geographiclib library for geodesic calculations.

  • QgsDistanceArea.geodesicLine : calculates the geodesic line between two points
  • QgsDistanceArea.latitudeGeodesicCrossesAntimeridian calculates the latitude at which the geodesic line joining two points crosses the antimeridian
  • QgsDistanceArea.splitGeometryAtAntimeridian : splits a (multi)linestring at the antimeridian, using geodesic lines to calculate the exact point at which the split occurs on the antimeridian

This feature was developed by Nyall Dawson (North Road)