Skip to content
Permalink
Browse files

don't consider nan vertices for interpolation

git-svn-id: http://svn.osgeo.org/qgis/trunk@10243 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Feb 27, 2009
1 parent 11a160e commit bc0826af42da9f26efa27bf070d65f1a9e9b3eef
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/plugins/interpolation/qgsinterpolator.cpp
@@ -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 )
{
@@ -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;
}

0 comments on commit bc0826a

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