Conditional function in Spatial Modeler
By Nyasha in ERDAS Software Forum
Hie all
Does anyone have any idea if there is a limit to the number of arguments one can use in carrying out conditional analysis in Spatial modeler. I have been trying to run a model with 10 arguments but the model only runs well when I have a maximum of 6 arguments.
Any help with this will be much appreciated.
Thank you.
----------------------------------
You were sent this email because you opted to receive email notifications when someone created a new thread, or replied to a topic within this forum, ERDAS Software Forum.
To unsubscribe:
Re: Conditional function in Spatial Modeler
By Donn Rodekohr in ERDAS Software Forum
Nyasha,
To my knowledge there is not a maximum number of arguments, at least I have never bumped into it. I have written some models with dozens (>30) of conditions and had it run successfully.
What will cause the model to fail would be an unreconcilable argument (possibly bad data) or a syntax error on the 7th line. The CONDITIONAL statement processes until a condition is true, then it assigns the output and moves on. Clearly your first 6 conditions are syntactically correct and produce valid results. There may be an error on the 7th condition.
One way to check is to invert the conditional statement to start from the bottom and work up. You may have to reverse the logic of your statement to make this happen but it may identify the problem.
----------------------------------
You were sent this email because you opted to receive email notifications when someone responded to this thread.
By Nyasha in ERDAS Software Forum
Hie Donn
Thank you so much for your advice. Now that I know I am not fighting a losing battle I will take your advice and hopefully see where I am going wrong.
Many thanks again.