Set no data (null) value in geostatistical wizard?

2433
7
07-19-2011 06:02 PM
AbbyFrazier
New Contributor II
Hello,

I am working with monthly climate data and need to use ordinary kriging.  I have just upgraded from 9.3.1 to version 10, and aside from the many exciting changes, I cannot seem to find a way to set my null value in my data.  I know 9.3.1 had this option (set no data value = -9999), but version 10 tries to use my -9999s as regular values.  I create my tables in excel, then import them into Arc and create shapefiles which I use to Krige the different columns representing months.  When I tried replacing -9999s with blanks in excel, Arc converted them to 0s (same when I tried using NaNs). 

Is the "set no data value" option gone in version 10 (or just hiding)?  Any suggestions for a work around?  Other than creating new files for every single month where I eliminate the null points myself?  Thanks!

Abby
0 Kudos
7 Replies
SteveLynch
Esri Regular Contributor
Abby

If you rather store your feature classes in a file geodatabase then <nulls> are supported, i.e. ignored.
Else, leave the -9999 values and do a selection prior to using the Wizard.


Steve
AbbyFrazier
New Contributor II
Thanks Steve, using a geodatabase seems to work. 

However, is there an easier way to change my -9999 values into <Null>?  I cannot seem to get a formula to work in Field Calculator (tried using "replace()" and "con()" with no luck), so I have to use Editor and manually go into my attribute table and delete these values.  I am trying to automate as much of this process as possible, since I have to make about 100 kriged maps...

Thanks!!
Abby
0 Kudos
SteveLynch
Esri Regular Contributor
Abby

It is a 3 step process
1) arcpy.SelectLayerByAttribute_management('ca_ozone_pts', 'NEW_SELECTION', '"ELEVATION" = -9999')
2) arcpy.CalculateField_management('ca_ozone_pts', 'ELEVATION', 'NULL', 'VB', '#')
3) clear the selection or save the layer to a new FC in a file geodatabase

Steve
0 Kudos
AbbyFrazier
New Contributor II
Thanks, Steve.  I added a 3rd command to clear the selection,
arcpy.SelectLayerByAttribute_management('ca_ozone_pts', 'CLEAR_SELECTION', '"ELEVATION" = -9999')

and this seems to work well to automate this procedure.  It's too bad the option to "set no data value as:" was taken away, this is a lot of extra work to get the data ready.  Thanks for your help,

Abby
0 Kudos
SteveLynch
Esri Regular Contributor
Abby

Setting the null values was only available in the Wizard and one cannot automate a Wizard workflow. However, a Geostat layer can be manipulated via the CreateGeostatisticalLayer GP tool. But you can't specify the Nodata values when using this tool. We then decided to remove the option from the Wizard.

All tools in ArcGIS honor selections and ignore nulls, therefore Geostatistical Analyst is now in line with the rest of ArcGIS.

Hope this helps in understanding why it was removed and sorry for the inconvenience.

Steve
0 Kudos
WilliamBrown
New Contributor
Actually I have the same sort of question for changing -9999 that I have in a bunch of fields of shapefiles to NULLS when I import the shapefiles to a geodatabase.  Is there a simple way to automate this?
0 Kudos
SteveLynch
Esri Regular Contributor
Once you have exported the shapefile featureclass to file geodatabase do the following

use either SelectLayerByAttribute_management or management.MakeFeatureLayer selecting all values = -9999 then
CalculateField(�??mylayer�??, �??FieldZ�??, �??None�??, �??Python�??)


Steve
0 Kudos