Skip to content
Permalink
Browse files

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

…x linestring
  • Loading branch information
mhugent committed Jan 3, 2017
1 parent b6b0902 commit 30d74237972594144e4f4d5415e615c0dd6f7fef
Showing with 0 additions and 3 deletions.
  1. +0 −3 src/core/geometry/qgslinestringv2.cpp
@@ -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 ) );

0 comments on commit 30d7423

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