rows = arcpy.UpdateCursor(newWetland) row = rows.next() while row: if row.getValue(wetlandTypeField) == 'Estuarine and Marine Wetland': totalHectares = row.getValue(areaField) sampleArea = (totalHectares * .25) # Sample 25% of this type row.setValue(sampleField, sampleArea) rows.updateRow(row) row = rows.next() elif row.getValue(wetlandTypeField) == 'Freshwater Emergent Wetland': totalHectares = row.getValue(areaField) sampleArea = (totalHectares * .25) # Sample 25% of this type row.setValue(sampleField, sampleArea) rows.updateRow(row) row = rows.next()
print sampleArea
Solved! Go to Solution.