How to set a zone field as model parameter in zonal statistics

296
3
Jump to solution
03-05-2020 02:06 AM
JanOtto
New Contributor

Hi,

I have produced a little tool in modelbuilder, which includes a ZONAL_STATISTICS step.

In this dialogue I use a shape file as feature zone data.

I can set this a variable and make it a model parameter for the tools input dialogue.

But the zonal_stats also requires the selection of a zone field, i.e. the identifyier to distinguish between objects.

For more automatisation I would have this zone field also included in the tools input dialogue.

Is there a way to identify a zone field as model parameter/variable?

Thank you for your help,

Jan

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Esteemed Contributor

You can specify parameters in a model's tools

Model parameters—ArcGIS Pro | Documentation 

right-click on the tool and you can specify the parameter you want

View solution in original post

0 Kudos
3 Replies
DanPatterson_Retired
MVP Esteemed Contributor

You can specify parameters in a model's tools

Model parameters—ArcGIS Pro | Documentation 

right-click on the tool and you can specify the parameter you want

0 Kudos
JanOtto
New Contributor

Hi Dan,

thanks for the hint.

I managed to solve my issue to a great part.

One thing remains:

The Zone field as model parameter only displays one field (a string type) and not the others.

I would like to refer to a field containing numbers.

Any Ideas?

Best regards,

Jan

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

in a script  you can set the parameter as "derived", so if the parameter is a "field", the values that are available would be "derived" from the input dataset.  I dont know if it applies to modelbuilder

0 Kudos