<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Calvin,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I am quite sure that Charles Karney holds an undisputed claim of the Most Accurate Geodesic Algorithm™. At least I haven’t
 come across any papers offering better accuracy.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Google Earths figure of 14.672 km^2 is very similar to MapInfos spherical area calculation of 14.670 km^2, so for now
 I think we can assume that Google’s Earth is not subject to either rotation nor gravity :-)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Regarding including the gravity (geoid) models in GeographicLib I must admit that that is outside my knowledge of the
 library. If the library can calculate geodesics on the geoid that would be even more accurate, yes. Although you are at the mercy of the accuracy of the geoid models. For my particular application I wouldn’t use one since the global models mention in the docs
 you link to are not that well-fitting in this area. In theory I could produce a grid from a better geoid model. While an interesting problem to handle I think it is taking it just a step too far.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">/Kristian<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Fra:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> C Hamilton <adenaculture@gmail.com>
<br>
<b>Sendt:</b> 25. september 2018 16:27<br>
<b>Til:</b> Kristian Evers <kreve@sdfe.dk><br>
<b>Cc:</b> Nyall Dawson <nyall.dawson@gmail.com>; qgis-developer <qgis-developer@lists.osgeo.org><br>
<b>Emne:</b> Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Kristian,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for those calculations. Before this discussion I was contemplating doing a line and polygon measurement tool for Shape Tools by clicking on an existing shape and using geographiclib calculate the measurements, but if it is possible
 to replace the existing QGIS measuring functions and Vincinty with geographiclib, then I will hold off. Shape Tools uses geographiclib for all its calculations and I am pleased with it. In the last release I included a function to measure all geometry on a
 layer.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I don't know who has the most accurate algorithm. I just checked Google Earth and it measures your polygon at 14,672 km^2. I'm guessing Google Earth is not as accurate as some of those other applications. As far as I know geographiclib
 has the most accurate ellipsoid calculations. The only thing better would be to include elevation. I'm not an expert in this area, but would the gravity models provide more accuracy?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://geographiclib.sourceforge.io/html/gravity.html#gravityinst">https://geographiclib.sourceforge.io/html/gravity.html#gravityinst</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Calvin<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Sep 25, 2018 at 9:31 AM, Kristian Evers <<a href="mailto:kreve@sdfe.dk" target="_blank">kreve@sdfe.dk</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Right, here are the calculated areas as returned by a number of different GIS applications and the planimeter app of GeographicLib for reference:<br>
<br>
Caris LOTS: 14.737 km^2<br>
ArcMap:     14.727,446 km^2<br>
MapInfo:    14.727,352 km^2<br>
GeoMedia:   14.726,443 km^2<br>
Planimeter: 14.722,522 km^2<br>
QGIS 3.2:   14.652,181 km^2<br>
QGIS 2.8:   14.652,181 km^2<br>
<br>
The polygon that I have used to get the numbers above can be found here: <a href="https://gist.github.com/kbevers/207b5bcb9be20e7554abe5f56742ec2c" target="_blank">
https://gist.github.com/kbevers/207b5bcb9be20e7554abe5f56742ec2c</a><br>
<br>
I am quite confident that GeographicLib delivers the most accurate result (if you have doubts, this reference [0] should convince you). As can be seen from the table above all but QGIS come fairly close. I expect some variation in the results as these are numerical
 approximations, although I think QGIS is too far of the mark. My suspicion is that the geodesic algorithm used by QGIS (and apparently GRASS) is to blame here.<br>
<br>
/Kristian<br>
<br>
[0] <a href="https://arxiv.org/pdf/1102.1215.pdf" target="_blank">https://arxiv.org/pdf/1102.1215.pdf</a>
<br>
<br>
-----Oprindelig meddelelse-----<br>
Fra: QGIS-Developer <<a href="mailto:qgis-developer-bounces@lists.osgeo.org">qgis-developer-bounces@lists.osgeo.org</a>> På vegne af Kristian Evers<br>
Sendt: 25. september 2018 09:15<br>
Til: Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>><br>
Cc: qgis-developer <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Emne: Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0<br>
<br>
It's not a small area, that's why I have been nitpicking ellipsoid area calculation<br>
algorithms!<br>
I did end up doing the calculations with geographiblib to get a reference to judge<br>
various other calculations by. It's a pain in the butt to extract the data from a<br>
polygon shapefile (or whatever) and format it to suit the planimeter app of<br>
geographiclib. It would be so much cooler if I could get the same results by<br>
clicking info on a polygon in QGIS :-)<br>
<br>
/Kristian<br>
<br>
<br>
-----Oprindelig meddelelse-----<br>
Fra: Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>>
<br>
Sendt: 25. september 2018 09:07<br>
Til: Kristian Evers <<a href="mailto:kreve@sdfe.dk">kreve@sdfe.dk</a>><br>
Cc: Paolo Cavallini <<a href="mailto:cavallini@faunalia.it">cavallini@faunalia.it</a>>; qgis-developer <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>><br>
Emne: Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0<br>
<br>
On Tue, 25 Sep 2018 at 16:59, Kristian Evers <<a href="mailto:kreve@sdfe.dk">kreve@sdfe.dk</a>> wrote:<br>
><br>
> Hi Paolo,<br>
><br>
> I have some rought notes that I can try to polish up a bit and share here.<br>
> I'll see if I can find the time for that today. I didn't get to the bottom of<br>
> the problem but I am leaning towards the issue being that QGIS uses an<br>
> inferior algorithm to determine geodesics. Unfortunately I couldn't find out<br>
> from either the source code or the documentation which algorithm is used.<br>
> As far as I remember it differs from the otherwise popular algorithm by<br>
> Vincenty. That may be because a different algorithm is used or the<br>
> Implementation is wrong.<br>
><br>
> I'll get back with a better write-up later and some test data and results.<br>
<br>
We use a direct port from GRASS:<br>
<br>
<a href="https://github.com/qgis/QGIS/blob/master/src/core/qgsdistancearea.cpp#L690" target="_blank">https://github.com/qgis/QGIS/blob/master/src/core/qgsdistancearea.cpp#L690</a><br>
<br>
vs GRASS upstream:<br>
<br>
<a href="https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/area_poly1.c?rev=71260" target="_blank">https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/area_poly1.c?rev=71260</a><br>
<br>
It's not very stable for very small areas -- better to use cartesian<br>
calculations there. Or bring in geographiclib and punt the<br>
responsibility elsewhere ;)<br>
<br>
Nyall<br>
<br>
<br>
<br>
><br>
> /Kristian<br>
><br>
> -----Oprindelig meddelelse-----<br>
> Fra: QGIS-Developer <<a href="mailto:qgis-developer-bounces@lists.osgeo.org">qgis-developer-bounces@lists.osgeo.org</a>> På vegne af Paolo Cavallini<br>
> Sendt: 25. september 2018 08:23<br>
> Til: <a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a><br>
> Emne: Re: [QGIS-Developer] [Qgis-user] New Features in Shape Tools 3.2.0<br>
><br>
> Hi Kristian,<br>
><br>
><br>
> Il 09/25/2018 07:24 AM, Kristian Evers ha scritto:<br>
> ><br>
> ><br>
> > On a related note, I have been meaning to raise a similar issue based<br>
> > on QGIS’s not so accurate polygon-area-on-the-ellipsoid calculations.<br>
> > A colleague of mine came across some differences between QGIS and<br>
> > CARIS LOTS while doing area calculations in relation to a border<br>
> > dispute at sea. After that I tested several popular closed source GIS<br>
> > apps and they all performed better than QGIS.<br>
> this is worth exploring in detail. could you please be more specific? do<br>
> you have a test case? could you share the results, or give us a way to<br>
> replicate them?<br>
> Thanks.<br>
><br>
> --<br>
> Paolo Cavallini - <a href="http://www.faunalia.eu" target="_blank">www.faunalia.eu</a><br>
> <a href="http://QGIS.ORG" target="_blank">QGIS.ORG</a> Chair:<br>
> <a href="http://planet.qgis.org/planet/user/28/tag/qgis%20board/" target="_blank">
http://planet.qgis.org/planet/user/28/tag/qgis%20board/</a><br>
><br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>