Skip to content

Commit

Permalink
Fix zonal stats min/max values when pixel area is greater than
Browse files Browse the repository at this point in the history
polygon area
  • Loading branch information
nyalldawson committed Jun 8, 2018
1 parent 83d44b9 commit b533dd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/analysis/vector/qgszonalstatistics.cpp
Expand Up @@ -468,7 +468,7 @@ void QgsZonalStatistics::statisticsFromPreciseIntersection( const QgsGeometry &p
if ( !intersectGeometry.isEmpty() )
{
double intersectionArea = intersectGeometry.area();
if ( intersectionArea >= 0.0 )
if ( intersectionArea > 0.0 )
{
weight = intersectionArea / pixelArea;
stats.addValue( pixelValue, weight );
Expand Down

0 comments on commit b533dd8

Please sign in to comment.