[Qgis-developer] QGIS API Distance, Azimuth/Bearing - API Documentation
adenaculture at gmail.com
Thu Apr 13 08:56:37 PDT 2017
Thanks for answering. Geographiclib has a good summary of the benefits over
The algorithms implemented by this package are given in Karney (2013) and
are based on Bessel (1825) and Helmert (1880); the algorithm for areas is
based on Danielsen (1989). These improve on the work of Vincenty (1975) in
the following respects:
- The results are accurate to round-off for terrestrial ellipsoids (the
error in the distance is less then 15 nanometers, compared to 0.1 mm for
- The solution of the inverse problem is always found. (Vincenty’s
method fails to converge for nearly antipodal points.)
- The routines calculate differential and integral properties of a
geodesic. This allows, for example, the area of a geodesic polygon to be
Here are my questions.
1. Sorry for my lack of knowledge here. I have gotten into the plugin
development and I have been thinking that I could possibly contribute to
the actual QGIS code, but I am not sure what you want done when you say to
do a "pull request on the topic".
2. geographiclib already has done the work for the more accurate geodesic
algorithms. They use the MIT/X11 license. Is that compatible with the QGIS
GNU2 license? It would certainly be easiest to use that code rather than
trying to reinvent it.
3. What is the best way to learn the steps necessary to contribute to the
core QGIS project?
On Thu, Apr 13, 2017 at 8:35 AM, Martin Dobias <wonder.sk at gmail.com> wrote:
> Hi Calvin
> On Mon, Apr 3, 2017 at 11:00 PM, C Hamilton <adenaculture at gmail.com>
> > I had been wondering what algorithm is being used for the methods
> > distance, and project in the QgsPoint class, but in looking at the code
> > is simply cartesian plane math. It looks like the qgsdistancearea class
> > using vincinty math if I am examining the code correctly.
> > Vincinty is more accurate than the great circle, but fails in some cases
> > there are more accurate methods. I apologize if I have failed to find the
> > right classes and methods in the API, but why doesn't the API provide the
> > more accurate geodesic calculations that are in geographiclib. It also
> > like it would be good to also provide great circle math as an option. Am
> > missing it in the API or is it simply not there? If it is not there is
> > anyone working on adding it?
> QgsDistanceArea is currently the only class in QGIS for doing
> measurements - either euclidean or using Vincenty's formulae. I have
> not heard about anyone currently working on adding more methods for
> calculation of distances or areas. I am no expert in geodesic
> calculations - what other methods would you like to have in QGIS and
> how are their results different from Vincenty's formulae?
> > Are there any efforts going on to flesh out the QGIS API a little more.
> > Generally, the methods and parameters are not well documented if it is
> > obvious from the name.
> Nowadays there is quite a lot of effort being done to improve QGIS API
> for the upcoming release of 3.0. Please feel free to join the effort
> and submit pull requests on this topic - that would be very
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer