3

I am working on a project that requires the calculation of the area of a polygon by two different methods. I need to know what algorithm QGIS uses to calculate the area of a polygon. I know ESRI ArcGIS uses the shoelace (Gaussian) method and am looking for GIS software that uses a different method.

1
  • 2
    If you will be comparing these implementations in any way, be aware that the areas could disagree for reasons other than the area-computation algorithm. For instance, the GISes may internally change coordinates in order to fit within an area of interest or predefined project boundaries. Some GISes use floating point coordinates and others use (scaled) integer coordinates. Also, it would be practically meaningless to do timing comparisons unless you could identify and control for various overhead operations. So in the end, given no comparison of time or accuracy will be valid, what's the point?
    – whuber
    Commented May 23, 2013 at 14:51

1 Answer 1

3

QGIS uses the GEOS library for geometry operations:

https://github.com/qgis/Quantum-GIS/blob/master/src/core/qgsgeometry.cpp

GEOS uses the shoelace formula:

http://trac.osgeo.org/geos/browser/trunk/src/algorithm/CGAlgorithms.cpp#L304

OGR also uses the shoelace formula:

http://trac.osgeo.org/gdal/browser/trunk/gdal/ogr/ogrlinearring.cpp#L461

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.