Skip to content
Permalink
Browse files

Exclude degenerated rings from polygon area calculation

  • Loading branch information
mhugent committed Jan 5, 2017
1 parent 1c02dc7 commit 64b0b1072959f392372c947d20ffd95c4371d60e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/geometry/qgscurvepolygonv2.cpp
@@ -365,7 +365,7 @@ double QgsCurvePolygonV2::area() const

double totalArea = 0.0;

if ( mExteriorRing->isClosed() )
if ( mExteriorRing->isRing() )
{
double area = 0.0;
mExteriorRing->sumUpArea( area );
@@ -376,7 +376,7 @@ double QgsCurvePolygonV2::area() const
for ( ; ringIt != mInteriorRings.constEnd(); ++ringIt )
{
double area = 0.0;
if (( *ringIt )->isClosed() )
if (( *ringIt )->isRing() )
{
( *ringIt )->sumUpArea( area );
totalArea -= qAbs( area );

0 comments on commit 64b0b10

Please sign in to comment.
You can’t perform that action at this time.