Select to view content in your preferred language

Python script to calculate the area (!shape.area!),

4920
3
Jump to solution
05-28-2014 12:40 PM
JamalNUMAN
Legendary Contributor
Python script to calculate the area (!shape.area!),

I wanted to calculate the are in a particular field. I used the script shown in the screenshot below (!shape.area!):

[ATTACH=CONFIG]34143[/ATTACH]

The ArcGIS quits.

What might be the issue here?

What could be the proper syntax?


Thank you

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
MattEiben
Deactivated User
You're very close, the correct syntax is this:

!Shape!.area


If you're in a Projected Coordinate System, you can also use the "Calculate Geometry" option to get area as well.

View solution in original post

0 Kudos
3 Replies
MattEiben
Deactivated User
You're very close, the correct syntax is this:

!Shape!.area


If you're in a Projected Coordinate System, you can also use the "Calculate Geometry" option to get area as well.
0 Kudos
JamalNUMAN
Legendary Contributor
You're very close, the correct syntax is this:

!Shape!.area


If you're in a Projected Coordinate System, you can also use the "Calculate Geometry" option to get area as well.


Thank you very much Matt. It works fine

[ATTACH=CONFIG]34184[/ATTACH]

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
RoryBennison
Occasional Contributor

Just to throw my ten cents worth in I use the following code: round(!shape.area@hectares!,1)