# Calculation of land price based on area and type of land

I'm new in ArcGIS 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 would be grateful for help.

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 ArcGIS? 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.

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!)

• Now I'm trying to add a rounding area line to four decimal places in the code but it's not working, any idea ? Thank you so much def LandValue(area,type): if (type == "PLANE"): return(round !shape_area!,4*100000) if (type == "ROUGH"): return(round !shape_area!,4 *60000) if (type == "VEGETATION"): return(round !shape_area!,4*15000) Sep 30, 2015 at 12:44
• I don't understand what you are trying to achieve, and the code in the comment is shown in a bad and unreadable format. Try open a new question, or edit your old one. Oct 2, 2015 at 14:59