Code: Alles auswählen
import arcgisscripting # import der Library
gp=arcgisscripting.create(9.3) # geoprocessor zum import von funktionen
gp.workspace="C:/Temp" # workspace
cur=gp.SearchCursor("Polyline0Punkte.shp", "", "", "FID, FID_DREIEC, ORIG_FID, POINT_X,POINT_Y,POINT_Z,Tri_Index") # Durchsuchen der Datei nach den Spalten X, Y, Z
#get the first value
row = cur.next()
# Iterate through the rows in the cursor
#
liste = list()
while row:
current_Eintrag = (row.FID, row.FID_DREIEC, row.ORIG_FID, row.POINT_X, row.POINT_Y, row.POINT_Z)
liste.append(current_Eintrag)
liste.append(' ')
row = cur.next()
#import operator
#def sort_table(iterable, index)
#index = 2
#return sorted(iterable, key=operator.itemgetter(index))
import functools
def sort_with_index(iterable, index)
return sorted(iterable, key=operator.itemgetter(index))
sort_table = functools.partial(sort_with_index, index=2)