POST
|
Hello, I try to explain the problem: I have a tool within a parameter (string) of a Value List with 4 values â??â??has (4 different coordinate systems). The tool itself is relatively simple: Input file: File Output file: shapefile Edition KS: String (4 different KS to choose)("DHDN Soldner Berlin", "GCS_WGS_1984", "WGS 1984 auxiliary sphere", "ETRS 1989) Function: Project my filter.list: self.params[2].filter.list = ["DHDN Soldner Berlin", "GCS_WGS_1984", "WGS 1984 auxiliary sphere", "ETRS 1989 ]
if self.params[2].filter.list[0] == "DHDN Soldner Berlin":
arcpy.Project_management(input_shp, new_shp, "C:\Users\\hicham\\MEINE_DATEN\\koordinates\\DHDN Soldner Berlin.prj"")
elif self.params[2].filter.list[1] == "WGS 1984":
arcpy.Project_management(input_shp, new_shp, "C:\Users\\hicham\\MEINE_DATEN\\koordinates\\GCS_WGS_1984.prj")
elif self.params[2].filter.list[1] == "WGS 1984 auxiliary sphere":
arcpy.Project_management(input_shp, new_shp, "C:\Users\\hicham\\MEINE_DATEN\\koordinates\\WGS 1984 Web Mercator (auxiliary sphere).prj")
elif self.params[2].filter.list[1] == "ETRS 1989":
arcpy.arcpy.Project_management(input_shp, new_shp, "C:\Users\\hicham\\MEINE_DATEN\\koordinates\\ETRS 1989 UTM Zone 33N 7stellen.prj")
return I just do not know what function I would have to enter in the validation to be able to select these values â??â??from the list in order to accurately transform the file into a specific KS (eg. Soldner Berlin) can. Would be great if someone could help me. Thanks in advance!:) Hicham
... View more
05-14-2014
04:58 AM
|
0
|
1
|
4095
|
POST
|
thanke you here is my skript : I think something is missing or my script is wrong . def __init__(self): """Setup arcpy and the list of tool parameters.""" self.params = arcpy.GetParameterInfo() self.params[2].filter.list = ["DHDN Soldner Berlin", "GCS_WGS_1984", "WGS 1984 auxiliary sphere", "ETRS 1989 ] if self.params[2].filter.list[0] == "DHDN Soldner Berlin": arcpy.Project_management(input_shp, new_shp, "C:\Users\\eElhajou\\MEINE_DATEN\\koordinates\\DHDN Soldner Berlin.prj"") elif self.params[2].filter.list[1] == "WGS 1984": arcpy.Project_management(input_shp, new_shp, "C:\Users\\eElhajou\\MEINE_DATEN\\koordinates\\GCS_WGS_1984.prj") elif self.params[2].filter.list[1] == "WGS 1984 auxiliary sphere": arcpy.Project_management(input_shp, new_shp, "C:\Users\\eElhajou\\MEINE_DATEN\\koordinates\\WGS 1984 Web Mercator (auxiliary sphere).prj") elif self.params[2].filter.list[1] == "ETRS 1989": arcpy.arcpy.Project_management(input_shp, new_shp, "C:\Users\\eElhajou\\MEINE_DATEN\\koordinates\\ETRS 1989 UTM Zone 33N 7stellen.prj") return i hope someone help me
... View more
05-12-2014
10:24 PM
|
0
|
0
|
185
|
POST
|
koordinatensystem TOOLS Beitragvon HichamE » vor 14 Minuten Hallo, ich versuche das Problem zu erläutern. Und zwar habe ich generell folgendes Problem: ich habe innerhalb eines Tools einen Parameter (String) der eine Value List mit 4 Werten besitzt (4 versch. Koordinatensysteme). Das Tool selber ist relativ einfach: Eingabedatei: File Ausgabedatei: Shapefile Ausgabe KS: String (4 versch. KS zum wählen) Funktion: Projizieren ich wisse jetzt blo� nicht welche Funktion ich in der Validation eintragen müss um diese Werte aus der Liste anwählen zu können, um genau die Datei in ein bestimmtes KS (zb. Soldner Berlin) transformieren zu können. Wäre super, wenn mir jmd. den entscheidenen Tip geben könnte. Danke im Vorraus! Hicham
... View more
05-12-2014
01:20 PM
|
0
|
2
|
758
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|