Skip to content

Commit 30d7423

Browse files
committed
Fix area calculation of compoundcurve rings if they contain a 2-vertex linestring
1 parent b6b0902 commit 30d7423

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/core/geometry/qgslinestringv2.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -837,9 +837,6 @@ QgsPointV2 QgsLineStringV2::centroid() const
837837
void QgsLineStringV2::sumUpArea( double& sum ) const
838838
{
839839
int maxIndex = numPoints() - 1;
840-
if ( maxIndex == 1 )
841-
return; //no area, just a single line
842-
843840
for ( int i = 0; i < maxIndex; ++i )
844841
{
845842
sum += 0.5 * ( mX.at( i ) * mY.at( i + 1 ) - mY.at( i ) * mX.at( i + 1 ) );

0 commit comments

Comments
 (0)