Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
An if-else statement is a programming conditional statement that runs a different set of statements depending on whether an expression is true or false.
2
votes
Accepted
Calculate geometry in IF/ELSE statement using ArcGIS.Pro field calculator
You are not passing in the geometry into the function which is causing the invalid syntax error. So taking on the excellent advice from @BERA it should be:
myCalc(!Type!,!LENGTH!,!Shape!)
def myCalc( …
1
vote
Accepted
How to apply if-else condition on two different rasters to produce another rasters?
This logic can equally be done very easily in model builder as shown below:
You don't need to do a reclassification the CON tool can achieve this. A CON tool would be set up as shown below:
4
votes
Filling attribute tables with values from the same attribute table
All geoprocessing tools honour selections. So simply select the rows where column 1 has the NULL values then run a field calculate and select the field you want the values to come from. As you have a …
1
vote
Accepted
Calculating field on if-else-condition checking input parameters for <Null>?
You appear to be treating your variables in your script e.g. owner as inline model variables by surrounding them with %%. That syntax is for accessing variables in a model. You want to set your expres …