Skip to content

Commit

Permalink
don't consider nan vertices for interpolation
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10243 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 27, 2009
1 parent 20e46f5 commit 040a039
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/interpolation/qgsinterpolator.cpp
Expand Up @@ -18,6 +18,7 @@
#include "qgsinterpolator.h"
#include "qgsvectordataprovider.h"
#include "qgsgeometry.h"
#include <cmath>

QgsInterpolator::QgsInterpolator( const QList<QgsVectorLayer*>& vlayers ): mDataIsCached( false ), mVectorLayers( vlayers ), zCoordInterpolation( false ), mValueAttribute( -1 )
{
Expand Down Expand Up @@ -89,7 +90,7 @@ int QgsInterpolator::cacheBaseData()
return 3;
}
attributeValue = att_it.value().toDouble(&attributeConversionOk);
if(!attributeConversionOk) //don't consider vertices with attributes like 'nan' for the interpolation
if(!attributeConversionOk || isnan(attributeValue)) //don't consider vertices with attributes like 'nan' for the interpolation
{
continue;
}
Expand Down

0 comments on commit 040a039

Please sign in to comment.