Select to view content in your preferred language

Failed Script Error calculating area of polygon

534
5
11-20-2024 02:43 PM
GeoffFreer
Emerging Contributor

Im getting the following error calculation Area (Geodesic). I have successfully done this on this layer previously but not with a new polygon I just added

Calculate Geometry Attributes
=====================
Parameters

Input Features SRK_Resource_Area
Geometry Attributes Area AREA_GEODESIC
Length Unit
Area Unit SQUARE_KILOMETERS
Coordinate System PROJCS["GDA_1994_MGA_Zone_54",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",10000000.0],PARAMETER["Central_Meridian",141.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
Updated Features SRK_Resource_Area
Coordinate Format SAME_AS_INPUT
=====================
Messages

Start Time: Thursday, 21 November 2024 9:36:07 AM
Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\calculategeometry.py", line 366, in <module>
CalculateGeometry(fc, properties, lUnit, aUnit, cs, cformat)
File "c:\program files\arcgis\pro\Resources\ArcToolbox\scripts\calculategeometry.py", line 155, in CalculateGeometry
srow = next(scur)
^^^^^^^^^^
StopIteration

Failed script Calculate Geometry Attributes...
Failed to execute (CalculateGeometryAttributes).
Failed at Thursday, 21 November 2024 9:36:10 AM (Elapsed Time: 2.80 seconds)

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

Repair Geometry (Data Management)—ArcGIS Pro | Documentation

I would use it to check and fix the geometry before calculating geometry


... sort of retired...
0 Kudos
GeoffFreer
Emerging Contributor

Thanks Dan

Ran the tool but still getting the same error

0 Kudos
DanPatterson
MVP Esteemed Contributor

Calculate Geometry Attributes (Data Management)—ArcGIS Pro | Documentation

now if you used the tool above and got that error,  and repair geometry didn't catch any errors in the geometry, is it possible to copy that particular polygon to a separate featureclass and delete it from the one you are working in to see if it is the actual geometry or something in the featureclass.


... sort of retired...
0 Kudos
GeoffFreer
Emerging Contributor

Hi Dan

I recreated in a new shp and it worked. Thanks for your help!

0 Kudos
DanPatterson
MVP Esteemed Contributor

glad it worked out


... sort of retired...
0 Kudos