Skip to content

Commit

Permalink
Fix area calculation of compoundcurve rings if they contain a 2-verte…
Browse files Browse the repository at this point in the history
…x linestring
  • Loading branch information
mhugent committed Jan 3, 2017
1 parent b6b0902 commit 30d7423
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/core/geometry/qgslinestringv2.cpp
Expand Up @@ -837,9 +837,6 @@ QgsPointV2 QgsLineStringV2::centroid() const
void QgsLineStringV2::sumUpArea( double& sum ) const
{
int maxIndex = numPoints() - 1;
if ( maxIndex == 1 )
return; //no area, just a single line

for ( int i = 0; i < maxIndex; ++i )
{
sum += 0.5 * ( mX.at( i ) * mY.at( i + 1 ) - mY.at( i ) * mX.at( i + 1 ) );
Expand Down

0 comments on commit 30d7423

Please sign in to comment.