Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

help filter.list

$
0
0
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
Attached Thumbnails
Click image for larger version

Name:	tools2.JPG‎
Views:	N/A
Size:	74.4 KB
ID:	33812   Click image for larger version

Name:	scripte.JPG‎
Views:	N/A
Size:	53.9 KB
ID:	33809   Click image for larger version

Name:	parametert.JPG‎
Views:	N/A
Size:	63.8 KB
ID:	33810   Click image for larger version

Name:	validation.JPG‎
Views:	N/A
Size:	60.8 KB
ID:	33811   Click image for larger version

Name:	Werteliste.JPG‎
Views:	N/A
Size:	115.5 KB
ID:	33814  


Viewing all articles
Browse latest Browse all 2485

Trending Articles