Skip to content

Commit b533dd8

Browse files
committed
Fix zonal stats min/max values when pixel area is greater than
polygon area
1 parent 83d44b9 commit b533dd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/analysis/vector/qgszonalstatistics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ void QgsZonalStatistics::statisticsFromPreciseIntersection( const QgsGeometry &p
468468
if ( !intersectGeometry.isEmpty() )
469469
{
470470
double intersectionArea = intersectGeometry.area();
471-
if ( intersectionArea >= 0.0 )
471+
if ( intersectionArea > 0.0 )
472472
{
473473
weight = intersectionArea / pixelArea;
474474
stats.addValue( pixelValue, weight );

0 commit comments

Comments
 (0)