mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
don't consider nan vertices for interpolation
git-svn-id: http://svn.osgeo.org/qgis/trunk@10243 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
11a160efad
commit
bc0826af42
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user