3

I'm new in ArcMap and I'm working on a evaluation of land value would like to create a calculation routine of land value from the area and the type of area.

I have a shapefile and in my attribute table have 3 columns: TYPE, AREA and PRICE. The PRICE column would have to be calculated automatically if possible like Shape_Area field in geodatabase.

if TYPE is PLANE -> PRICE = AREA x 100000

if TYPE is PASTURE ROUGH -> PRICE = AREA x 60000

if TYPE is VEGETATION -> PRICE = AREA x 15000

Is it possible to do this in ArcMap?

If it is not possible to do it automatically then it's not a problem since I have to run the routine once and not three times.

0

1 Answer 1

2

You need an if-block statement as follows. Open field calculator on your price field, and change the script to python on the left-top corner. In the code block copy and paste the following script:

 def LandValue(area,type):
   if (type == "PLANE"):
     return(area*100000)
   if (type == "ROUGH"):
     return(area*60000)
   if  (type == "VEGETATION"):
      return(area*15000)

Than in the expression window write the following line:

LandValue( !AREA!, !TYPE!)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.