#1 Wed 24 October 2018 21:58
- soma1
- Participant occasionnel
- Date d'inscription: 2 Oct 2018
- Messages: 10
script arcgis
bonjour;
j ai besoin de votre aide pour corriger mon script pour qu il puisse fonctionner sur arcgis voila
merci
Code:
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # scripttousclassification.py # Created on: 2018-10-24 18:40:36.00000 # (generated by ArcGIS/ModelBuilder) # Usage: scripttousclassification <acp22224__2_> <acp22224> <acp22224__4_> <acp22224__3_> <classe5> <classe10> <classe15> <classe20> <file20_gsg> <file15_gsg> <file10_gsg> <file5_gsg> # Description: # Model de la Classification Unsupervised des tous les classes. # --------------------------------------------------------------------------- # Import arcpy module import arcpy # Script arguments acp22224__2_ = arcpy.GetParameterAsText(0) if acp22224__2_ == '#' or not acp22224__2_: acp22224__2_ = "M:\\test\\acp22224" # provide a default value if unspecified acp22224 = arcpy.GetParameterAsText(1) if acp22224 == '#' or not acp22224: acp22224 = "M:\\test\\acp22224" # provide a default value if unspecified acp22224__4_ = arcpy.GetParameterAsText(2) if acp22224__4_ == '#' or not acp22224__4_: acp22224__4_ = "M:\\test\\acp22224" # provide a default value if unspecified acp22224__3_ = arcpy.GetParameterAsText(3) if acp22224__3_ == '#' or not acp22224__3_: acp22224__3_ = "M:\\test\\acp22224" # provide a default value if unspecified classe5 = arcpy.GetParameterAsText(4) if classe5 == '#' or not classe5: classe5 = "M:\\test\\classif\\ttclass\\classe5" # provide a default value if unspecified classe10 = arcpy.GetParameterAsText(5) if classe10 == '#' or not classe10: classe10 = "M:\\test\\classif\\ttclass\\classe10" # provide a default value if unspecified classe15 = arcpy.GetParameterAsText(6) if classe15 == '#' or not classe15: classe15 = "M:\\test\\classif\\ttclass\\classe15" # provide a default value if unspecified classe20 = arcpy.GetParameterAsText(7) if classe20 == '#' or not classe20: classe20 = "M:\\test\\classif\\ttclass\\classe20" # provide a default value if unspecified file20_gsg = arcpy.GetParameterAsText(8) if file20_gsg == '#' or not file20_gsg: file20_gsg = "M:\\test\\classif\\ttclass\\file20.gsg" # provide a default value if unspecified file15_gsg = arcpy.GetParameterAsText(9) if file15_gsg == '#' or not file15_gsg: file15_gsg = "M:\\test\\classif\\ttclass\\file15.gsg" # provide a default value if unspecified file10_gsg = arcpy.GetParameterAsText(10) if file10_gsg == '#' or not file10_gsg: file10_gsg = "M:\\test\\classif\\ttclass\\file10.gsg" # provide a default value if unspecified file5_gsg = arcpy.GetParameterAsText(11) if file5_gsg == '#' or not file5_gsg: file5_gsg = "M:\\test\\classif\\ttclass\\file5.gsg" # provide a default value if unspecified # Local variables: # Process: Iso Cluster Unsupervised Classification arcpy.gp.IsoClusterUnsupervisedClassification_sa("M:\\test\\acp22224", "5", classe5, "20", "10", file5_gsg) # Process: Iso Cluster Unsupervised Classification (2) arcpy.gp.IsoClusterUnsupervisedClassification_sa("M:\\test\\acp22224", "10", classe10, "20", "10", file10_gsg) # Process: Iso Cluster Unsupervised Classification (3) arcpy.gp.IsoClusterUnsupervisedClassification_sa("M:\\test\\acp22224", "20", classe20, "20", "10", file20_gsg) # Process: Iso Cluster Unsupervised Classification (4) arcpy.gp.IsoClusterUnsupervisedClassification_sa("M:\\test\\acp22224", "15", classe15, "20", "10", file15_gsg)
Hors ligne
#2 Thu 25 October 2018 22:39
- carteq
- Participant assidu
- Date d'inscription: 8 Mar 2008
- Messages: 829
Re: script arcgis
Si tu nous disait ce que ça fait et où ça accroche et quelle est l'erreur signalée, ça serait un bon point de départ.
Hors ligne