Skip to content
Permalink
Browse files

Fix zonal stats min/max values when pixel area is greater than

polygon area
  • Loading branch information
nyalldawson committed Jun 8, 2018
1 parent 83d44b9 commit b533dd8e31bde7e6ef0df2e36f1e873fb38c3f98
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/analysis/vector/qgszonalstatistics.cpp
@@ -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 );

0 comments on commit b533dd8

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