Select to view content in your preferred language

Create Geostatistical Layer and output both Prediction and SE in Model Builder

1961
4
Jump to solution
10-06-2016 02:33 PM
RobertRockwood
Deactivated User

Hi-

I have built a model in Model Builder that iterates over point Features in a file geodatabase, selects a subset of each point feature based on attributes and then uses the 'Create Geostatistical Layer' tool to implement Ordinary kriging with optimization via crossvalidation.  I am using an xml file as a template.  I attached a screenshot of the model for reference.

I would like the output to be 1) a raster of predictions and 2) a raster of Standard Errors.  I have used the 'GA Layer To Grid' tool to output the prediction raster.  However, the type of output from the 'Create Geostatistical Layer' tool is specified in the xml file.  Do I need to re-run the tool with a new xml template in order to output the SE raster or is there a simpler way to do this. (This is simple to do when a GA Layer is created with Geostatistical Analyst by right clicking the layer and selecting 'Change output of Standard Error').

I am using ArcGIS 10.3.1 for Desktop with the Advanced license on Windows 10.  I also have 64-bit Background Geoprocessing installed in case that is relevant.

I used some of the information from this (Automating geostatistical interpolation using template layers | ArcGIS Blog) post by Eric Krause and this (https://community.esri.com/thread/80709 ) to get started.

0 Kudos
1 Solution

Accepted Solutions
EricKrause
Esri Regular Contributor

You will need to create two different xml files, one for prediction and one for standard error.  You already have one for prediction, and the easiest way to make it other is to make a copy of the xml file and change one line:

 <enum name="KrigingResultType">Prediction</enum>

...should change to:

 <enum name="KrigingResultType">PredictionStandardError</enum>

Aside from that line, the files should be identical.  In ModelBuilder, you'll need to make a second branch in your model to run Create Geostatistical Layer and GA Layer to Grid twice (once with each xml source).

View solution in original post

4 Replies
EricKrause
Esri Regular Contributor

You will need to create two different xml files, one for prediction and one for standard error.  You already have one for prediction, and the easiest way to make it other is to make a copy of the xml file and change one line:

 <enum name="KrigingResultType">Prediction</enum>

...should change to:

 <enum name="KrigingResultType">PredictionStandardError</enum>

Aside from that line, the files should be identical.  In ModelBuilder, you'll need to make a second branch in your model to run Create Geostatistical Layer and GA Layer to Grid twice (once with each xml source).

RobertRockwood
Deactivated User

Great!  I wasn't certain, but thought this might be the way to do it.  Thanks for confirming, Eric!

I have another question about model builder, if you don't mind.  I am using the %Name% inline variable from the iterator to name my output files.  The %Name% variable takes on "All_2014_06", "All_2014_07",.. etc.  I would like to re-name with "Speed_2014_06", "Speed_2014_07", etc. instead... is there a way to alter the %Name% variable to do this?

Thanks!

0 Kudos
EricKrause
Esri Regular Contributor

I'm definitely not the best person to ask about ModelBuilder variables.  Hopefully someone with more direct experience can chime in here, but your best bet is probably to ask this on the ModelBuilder forum.

RobertRockwood
Deactivated User

OK.  Thanks for your help, Eric!

0 Kudos