Skip to content

Commit 81befa3

Browse files
mhugentnyalldawson
authored andcommitted
Exclude degenerated rings from polygon area calculation
(forward port from 64b0b1)
1 parent 449a4a8 commit 81befa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/geometry/qgscurvepolygonv2.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ double QgsCurvePolygonV2::area() const
371371

372372
double totalArea = 0.0;
373373

374-
if ( mExteriorRing->isClosed() )
374+
if ( mExteriorRing->isRing() )
375375
{
376376
double area = 0.0;
377377
mExteriorRing->sumUpArea( area );
@@ -382,7 +382,7 @@ double QgsCurvePolygonV2::area() const
382382
for ( ; ringIt != mInteriorRings.constEnd(); ++ringIt )
383383
{
384384
double area = 0.0;
385-
if (( *ringIt )->isClosed() )
385+
if (( *ringIt )->isRing() )
386386
{
387387
( *ringIt )->sumUpArea( area );
388388
totalArea -= qAbs( area );

0 commit comments

Comments
 (0)