Hallo Leute, ich versuche, die kumulative Entfernung für eine Reihe von Punkten zu berechnen, die in einem linearen Muster angeordnet sind. Ich verwende ArcGIS 10.3.1 Standardlizenz.<\/P><\/BODY><\/HTML>
Do the following:
Pre-logic Script Code:
should do it... syntax highlighting isn't taking this morning
""" input shape field: returns cumulative distance between points dist_cumu(!Shape!) #enter into the expression box""" x0 = 0.0; y0 = 0.0; distance = 0.0 def dist_cumu(shape): global x0; global y0; global distance x = shape.firstpoint.X; y = shape.firstpoint.Y if x0 == 0.0 and y0 == 0.0: x0 = x; y0 = y distance += math.sqrt((x - x0)**2 + (y - y0)**2) x0 = x; y0 = y return distance
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.