1

What is the expression to calculate an acreage in USA ? I am aware that there is a geometry calculate but when you convert raster to polygon it doesn't do it's job and I have to use the field calculator to manual it.

I am writing a model builder and in it I have tools for Add field and calculate them for 83 datasets.

  • the automated "shape_area" field exists with geodatabase, but not with shapefiles. Also, the unit of the area is the same as the reference system of the data. – radouxju Jun 16 '14 at 14:38
11

In ModelBuilder, drop in the Calculate Field tool (under Data Management | Fields toolbox) and use the expression !shape.area@acres! (make sure Expression Type is PYTHON or PYTHON_9.3.)

Or, in ArcPy: arcpy.CalculateField_management(YourFeature, Field, "!shape.area@acres!", "PYTHON", "")

It's possible to use a wide range of units for both area and length calculations this way:

Shape and length properties of the geometry field can be modified with unit types expressed with an @ sign.

Areal unit of measure keywords: ACRES | ARES | HECTARES | SQUARECENTIMETERS | SQUAREDECIMETERS | SQUAREINCHES | SQUAREFEET | SQUAREKILOMETERS | SQUAREMETERS | SQUAREMILES | SQUAREMILLIMETERS | SQUAREYARDS | SQUAREMAPUNITS | UNKNOWN

Linear unit of measure keywords: CENTIMETERS | DECIMALDEGREES | DECIMETERS | FEET | INCHES | KILOMETERS | METERS | MILES | MILLIMETERS | NAUTICALMILES | POINTS | UNKNOWN | YARDS

4

You may include this python expression in your field calculator tool:

!shape.area@acres!

http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000004s000000

  • Does anyone know the calculation to convert square feet to acres, supposing someone wanted to do this in PostGIS? – DPSSpatial Jun 16 '14 at 15:38
2

in the field calculator (CalculateField tool in model builder), you can use the following expression.

!shape.area@ACRES!

0

The actual formula or expression depends on your CRS measurement units, since acres is one unit and CRS units can vary - degrees, meters, feet, etc. Assuming you are in a projection, you'll probably have feet or meters.

1 acre = 43,560 square feet = 4046.85642 square meters

As radouxju mentions, shapefiles don't automatically track shape area, but feature classes in geodatabases do - only in the CRS units though. As the other answers suggest, using Field Calculator with a function is the only way to do this 'automatically' in ModelBuilder since the Calculate Geometry tool can't be accessed from there.

  • when you convert raster or image to polygon, does it takes from the pixels from that raster or image ? Is there a way to smooth it a little bit ? How do you match the polygon with the image ? I am thinking it's not possible but.... – PROBERT Jun 17 '14 at 0:43
  • @PROBERT The tool gives you a choice. If you smooth it, it of course won't match exactly - that's just the nature of the difference between a raster and a vector representation of data. – Chris W Jun 17 '14 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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