Skip to content

Commit

Permalink
Fix occasional NaN when automatically calculating heatmap radius
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 18, 2013
1 parent 404d89f commit 3acfdc3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/plugins/heatmap/heatmapgui.cpp
Expand Up @@ -219,9 +219,7 @@ double HeatmapGui::estimateRadius()

// Find max dimension of layer bounding box
QgsRectangle mExtent = inputLayer->extent();
double extentWidth = abs( mExtent.xMinimum() - mExtent.xMaximum() );
double extentHeight = abs( mExtent.yMinimum() - mExtent.yMaximum() );
double maxExtent = max( extentWidth, extentHeight );
double maxExtent = max( mExtent.width(), mExtent.height() );

// Return max dimension divided by 30. This is fairly arbitrary
// but approximately corresponds to the default value chosen by ArcMap
Expand Down

0 comments on commit 3acfdc3

Please sign in to comment.