Select to view content in your preferred language

Create Geostatistical Layer tool and Iterators in Model Builder

243
2
Jump to solution
06-04-2024 04:16 PM
EToon
by
New Contributor

Hello,

I am having trouble getting geostatistical layers and iterators to play nicely in model builder.

I am trying to use the "Create Geostatistical Layer" tool to create multiple geostatistical layers from multiple feature classes. The model source for the tool is a .xml file downloaded from the GA Wizard (has modified flags to mimic Ordinary Kriging - Optimized per past Esri Community posts). However, when using the tool in model builder, it does not appear that you can specify the "input dataset(s)" parameter using iterators or other feature classes. Assistance on how to specify the parameter or otherwise automate the creation of geostatistical layers in model builder would be greatly appreciated!

Thanks.

0 Kudos
1 Solution

Accepted Solutions
EricKrause
Esri Regular Contributor

Hi @EToon,

Unfortunately, as you found, this is not going to work.  The iterators in ModelBuilder are designed to work with Feature Class and Field type parameters, but the Input Datasets in Create Geostatistical Layer tool is a custom parameter type (called a Geostatistical Value Table), where the input dataset(s) and the field(s) are contained in a single parameter.  This is because different model sources require different fields.  For your case, only a dataset and field are required, but if you had performed cokriging with two datasets, for example, you would need to provide two feature classes and two fields.  Other model sources would require other combinations of fields.

Do your datasets and fields happen to have consistent names?  Something like data1, data2, data3, etc?  If so, this should be relatively simple to do in Python (I can help with this). But if they all have completely different names, you would need to type each out individually, which probably would not save much time from just doing it manually.

Sorry for the bad news, but I don't know any way around this.

-Eric

View solution in original post

0 Kudos
2 Replies
EricKrause
Esri Regular Contributor

Hi @EToon,

Unfortunately, as you found, this is not going to work.  The iterators in ModelBuilder are designed to work with Feature Class and Field type parameters, but the Input Datasets in Create Geostatistical Layer tool is a custom parameter type (called a Geostatistical Value Table), where the input dataset(s) and the field(s) are contained in a single parameter.  This is because different model sources require different fields.  For your case, only a dataset and field are required, but if you had performed cokriging with two datasets, for example, you would need to provide two feature classes and two fields.  Other model sources would require other combinations of fields.

Do your datasets and fields happen to have consistent names?  Something like data1, data2, data3, etc?  If so, this should be relatively simple to do in Python (I can help with this). But if they all have completely different names, you would need to type each out individually, which probably would not save much time from just doing it manually.

Sorry for the bad news, but I don't know any way around this.

-Eric

0 Kudos
EToon
by
New Contributor

Hello Eric,

Thank you for the explanation and offer of assistance. My project is part of my GIS Masters final project so I will endeavor to solve the problem myself. I appreciate you pointing me in the direction of Python so I can stop my attempts through ModelBuilder.

Your past contributions to the EsriCommunity - Geostatistical Analyst Questions board have been invaluable for my many headaches with using the GA extension.

Thank you.

0 Kudos