Kriging with a NaN

3476
6
04-14-2014 06:33 AM
MicheleLazzarini
New Contributor
Hi everyone,
I am trying to create some maps using Kriging with a Python script.
The original data contain some Nan that I previously flag with values -999.
I want to exclude these points from the estimation, do you have any suggestion on how to do that?
A drastic way could be excluding these points in the "shapefile creation" step...
0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus
You must exclude the -999 values or your interpolation will be meaningless
0 Kudos
MicheleLazzarini
New Contributor
hi Dan,
yes excluding -999 is what I want to do.
Is it possible to do it directly in the estimation?



You must exclude the -999 values or your interpolation will be meaningless
0 Kudos
DanPatterson_Retired
MVP Emeritus
query the file for all values >0 then export to a new file, then proceed with the interpolation
0 Kudos
MicheleLazzarini
New Contributor
Ok Dan thanks, I will do it in this way!


query the file for all values >0 then export to a new file, then proceed with the interpolation
0 Kudos
SteveLynch
Esri Regular Contributor
There are a number of ways to exclude data from the analysis. Here are some;

1) from the Geostats help. "For data formats that support Null values, such as file and personal geodatabase feature classes, a Null value will be used to indicate that a prediction could not be made for that location or that the value showed be ignored when used as input. For data formats that do not support Null values, such as shapefiles, the value of -1.7976931348623158e+308 is used (this is the negative of the C++ defined constant DBL_MAX) to indicate that a prediction could not be made for that location."
2) or use the Make Feature Layer geoprocessing tool
3) or use the Select Layer By Attribute geoprocessing tool

-Steve
0 Kudos
MicheleLazzarini
New Contributor
Thanks Steve for the detailed explanation.
At the end, I just put a line of code before the Kriging to create a temporary shapefile from the Select By Attribute, in order to interpolate only the real values.
All the batch processing of Kriging with the cross-correlation works perfectly now.




There are a number of ways to exclude data from the analysis. Here are some;

1) from the Geostats help. "For data formats that support Null values, such as file and personal geodatabase feature classes, a Null value will be used to indicate that a prediction could not be made for that location or that the value showed be ignored when used as input. For data formats that do not support Null values, such as shapefiles, the value of -1.7976931348623158e+308 is used (this is the negative of the C++ defined constant DBL_MAX) to indicate that a prediction could not be made for that location."
2) or use the Make Feature Layer geoprocessing tool
3) or use the Select Layer By Attribute geoprocessing tool

-Steve
0 Kudos