Skip to content

Commit bc0826a

Browse files
author
mhugent
committedFeb 27, 2009
don't consider nan vertices for interpolation
git-svn-id: http://svn.osgeo.org/qgis/trunk@10243 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 11a160e commit bc0826a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/plugins/interpolation/qgsinterpolator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "qgsinterpolator.h"
1919
#include "qgsvectordataprovider.h"
2020
#include "qgsgeometry.h"
21+
#include <cmath>
2122

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

0 commit comments

Comments
 (0)
Please sign in to comment.