Select to view content in your preferred language

Need Help Automation of Kriging using Model builder or python - Reg.

20735
53
09-12-2013 05:58 AM
AnushuyaRamakrishnan
New Contributor
I am using arcmap 10.2.

My project deals with the prediction of PM and Ozone concentrations for 2004-2006 (1098 days) using known concentrations of them at
99 grids throughout the county.

I am trying to predict the unknown concentrations at mother's residences using ordinary kriging.

This is what I am doing:

1. Use Geostatistical Wizard
2. Select kriging cokriging
3. Input the Data layers and specifications
4. Select Finish
5. Read the model parameters and click OK
6. Generate Kriged predictions
7. Right click on Kriged data and convert to raster
8. Use spatial analyst tool Extraction
9. Select "Extract values to points"
10. Generate Extracted values of kriged predictions
11. Select conversion tool
12. Choose convert From Raster to Ascii
13. Generate the Ascii table.
14. Alternatively use Sample tool and input multiple rasters to generate an output table.

My question:

1. I need some guidance for automating this kriging process using model builder or python?

2. Is there any way to directly copy and paste the raster values to excel?

Can any one provide me a lead into this
0 Kudos
53 Replies
AnushuyaRamakrishnan
New Contributor

Hi Steve:

I have not solved the problem that I reported earlier yet.

I confirm that there is problem with the python code. When I try to run kriging for certain datasets that already have kriged predictions generated, script is throwing me an error. The error is as follows:

Traceback (most recent call last):

  File "C:\Users\aramakrishnan\Documents\ArcGIS\scratch\Ordinary Kriging_July2014.py", line 41, in <module>

    arcpy.gp.ExtractValuesToPoints_sa(Harris_Lat_Long_csv_Events_lyr, Raster_Path + "OZ8_" + fieldname, Ext_Table_Path +  "OZ8_" + fieldname, "INTERPOLATE", "VALUE_ONLY")

  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 498, in <lambda>

    return lambda *args: val(*gp_fixargs(args, True))

ExecuteError: ERROR 999999: Error executing function.

Failed to execute (ExtractValuesToPoints).

Failed to execute (ScriptJul21).

Failed at Wed Aug 27 19:35:22 2014 (Elapsed Time: 1 minutes 55 seconds)

I tried to run ordinary kriging by manual methods by inputing the lag, sil and nugget values. However, I am not able to even generate the raster to feed it into the script. I attach my complete python code and xml file.

Will wait to hear from you

Thank you

Anushuya

0 Kudos
SteveLynch
Esri Regular Contributor

Anushuya

Please contact Esri Support

-Steve

0 Kudos
AnushuyaRamakrishnan
New Contributor

Hi Steve:

I have not contacted the ESRI support yet. I do not know how it works.

0 Kudos
SteveLynch
Esri Regular Contributor

If your are on a maintenance contract and in the USA then please contact Esri Support

else please contact your local distributor.

-Steve

0 Kudos