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

(forward port from 30d7423)
  • Loading branch information
mhugent authored and nyalldawson committed Feb 4, 2017
1 parent 1d29d02 commit ba7cc0f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/core/geometry/qgslinestringv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,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 ba7cc0f

Please sign in to comment.