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

20020
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
SteveLynch
Esri Regular Contributor
1) to automate the kriging process, have a look at http://blogs.esri.com/esri/arcgis/2010/06/18/automating-geostatistical-interpolation-using-template-...
2) for steps 10-14 do the following,
- you have a point feature class where the homes are, use this in the Extract values to points
- run the AddXY tool on the output feature class created above
- select all the rows in the output table and export, or if the output was sent to a shapefile you can use Excel to open the .dbf file

Hope this helps
Steve
AnushuyaRamakrishnan
New Contributor
Hi Steve,

Thank you very much for your prompt response.

Thank you for guiding me with steps 10-14.

I will try them.

Also, I will try model builder or python scripting and get in touch with you if I have any difficulty.

Thank you
0 Kudos
AnushuyaRamakrishnan
New Contributor
Hi Steve,

Going back to Steps 10-14, I tried to use the extract values to points tool and used the kriged prediction raster as input raster.

Extraction was successful.

I am trying to add xy layer as suggested by you by right clicking the extracted points shp file.

I am not finding the option for it.

Also I am trying to use the sample tool to integrate all the extracted points shp file to generate a single file.  A table is generated.

However, I am not able to convert it into ascii or dbf. When i try to export it, I am getting a 0KB file that I am not able to access.

Can you suggest suitably?

Thank you

Anushuya
0 Kudos
EricKrause
Esri Regular Contributor
Rather than converting the geostatistical layer to a raster and extracting the points, you should just use the "GA Layer to Points" geoprocessing tool.  It will bypass the creation of the raster, and merging all of the outputs will be easy.

Also, you might want to consider using Empirical Bayesian Kriging (EBK) instead of Ordinary Kriging.  The results are generally more accurate, and EBK is implemented as a geoprocessing tool, so it is much simpler to automate.
0 Kudos
AnushuyaRamakrishnan
New Contributor
Thank you Eric!!! I will try running EBK and will keep you updated.

Thanks

Anushuya
0 Kudos
AnushuyaRamakrishnan
New Contributor
Hi Eric/Steve,

I have another question:

I use a 99 gridded  (12 km x 12 km grid) Ozone PM input file to predict concentration at each mother's residence.

The "Extract values to Points" output table generates raster values at each mother's location.

Do I multiply or divide this value by 144 (12 x 12) to adjust for the gridded area.

Please let me know on this.

Thanks

Anushuya
0 Kudos
EricKrause
Esri Regular Contributor
You don't need to do any adjustment.  Ozone is a continuous phenomenon, so its value changes everywhere.  When you extract the points from a raster, all you're doing is asking for the ozone value at the closest cell center.  You don't need to do any corrections for the size of the grid cell.

Again, you can eliminate any imprecision from using the closest cell center by using GA Layer to Points.  It will calculate the ozone value at the exact point rather than looking to the closest cell center.
0 Kudos
AnushuyaRamakrishnan
New Contributor
Thank you for the clarification Eric

Anushuya
0 Kudos
SteveLynch
Esri Regular Contributor
I am trying to add xy layer as suggested by you by right clicking the extracted points shp file.

I am not finding the option for it.



It's a geoprocessing tool, http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000032000000
0 Kudos