upcur = gp.UpdateCursor(sin_pt) for row in upcur: id1 = row.COMID id2 = row.next().COMID if id1 == id2: yval1 = row.NORTH yval2 = row.next().NORTH xval1 = row.EAST xval2 = row.next().EAST distval = math.sqrt(((xval1 - xval2)**2) + ((yval1-yval2)**2)) length = row.LENGTHKM * 1000 row.DIST = length / distval upcur.updateRow(row)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.