Select to view content in your preferred language

ArcGIS Python Reclassify Coding Problem-Stop Iteration

69
1
7 hours ago
Labels (3)
Leeyak88
New Member

Good morning, All

I have an assignment. We will classify watersheds based on the area to perimeter ratio in the huc4.shp shapefile. 

In the Contents, right-click the huc4 layer and click Attribute Table. Review the fields of watersheds. Notice that there is a field called SHAPE_Area and a field called SHAPE_Leng.

Task: Write a script in Python that will determine the Class of each polygon by calculating the area to length ratio and grouping into a Class accordingly to the table below. In ArcMap, create a map assigning symbology to the Class as follows.

 

Area/length Ratio

Class

Symbology

Ratio > 40,000

Low

Green

20,000 < Ratio <= 40,000

Medium

Brown

15,000 < Ratio <= to 20,000

High

Orange

Ratio <= 15,000

Very High

Red

 

********************************

I wrote a python script. However, it occurs an error ' Stop Iteration'. How to fix it?

Appreciate the solutions. 

 

0 Kudos
1 Reply
DanPatterson
MVP Esteemed Contributor

your last 3 lines need to be indented 4 spaces so that they are within the cursor loop


... sort of retired...
0 Kudos