AnsweredAssumed Answered

Calculate line feature with conditional

Question asked by flaviofelix on Mar 9, 2018
Latest reply on Mar 9, 2018 by flaviofelix

Hello, I'm trying to calculate a field in the model but it's returning error syntax in the line 7

I can't see the error.

 

def Reclass(TIPO_PAV, CLASSIFICACAO ):
           if (TIPO_PAV=='ASFALTO' and CLASSIFICACAO=='URBANA'):
                 return 10000
            if (TIPO_PAV=='TERRA' and CLASSIFICACAO=='URBANA'):
                  return 10000
             if (TIPO_PAV=='TERRA'):
                    return !shape.length@kilometers!/40*60
              if (TIPO_PAV=='ASFALTO'):
                    return !shape.length@kilometers!
              else:
                     return 0

Attachments

Outcomes