Select to view content in your preferred language

conditional function for webgis geoprocessing widget

2849
2
Jump to solution
06-01-2016 03:52 AM
AnastasiaPatera
Deactivated User

Hello, I want to make a webgis geoprocessing tool. I use modelbuilder because I am a beginner in python language. What I want to do is to apply a function separately on 10 raster files  with raster calculator. I am ok up to there. The complicated issue is that I want the user to decide what function will be applied on each raster from the menu of two, named "cost" or "benefit". It is obvious that I need a conditional function but I can't find a compatible one with my problem.

Thank you in advance.

0 Kudos
1 Solution

Accepted Solutions
FC_Basson
MVP Regular Contributor

You can create a String type parameter in your model, then in the model properties you can set the parameter filter to a value list, from which you can pick the raster process type.  This will allow the user to make the choice, but then it seems there is no other option that to write a script tool to do the if-then-else logic: ArcGIS Help 10.1

View solution in original post

2 Replies
FC_Basson
MVP Regular Contributor

You can create a String type parameter in your model, then in the model properties you can set the parameter filter to a value list, from which you can pick the raster process type.  This will allow the user to make the choice, but then it seems there is no other option that to write a script tool to do the if-then-else logic: ArcGIS Help 10.1

AnastasiaPatera
Deactivated User

Actually, I have already found this page and I suppose I need time to get into the logic of conditional in python, since there is no another way.
Thanks a lot, FC Basson

0 Kudos