Skip to content
Permalink
Browse files

Fix area calculation of compoundcurve rings if they contain a 2-verte…

…x linestring

(forward port from 30d7423)
  • Loading branch information
mhugent authored and nyalldawson committed Feb 4, 2017
1 parent 1d29d02 commit ba7cc0f32356a5fca9d235af6f5774f93ce30bde
Showing with 0 additions and 3 deletions.
  1. +0 −3 src/core/geometry/qgslinestringv2.cpp
@@ -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 ) );

0 comments on commit ba7cc0f

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