import arcgisscripting gp = arcgisscripting.create(9.3) gp.overwriteoutput = True catchmentsFC = gp.GetParameterAsText(0) #in a toolbox GUI, this should be Type = FeatureLayer landCoverFC = gp.GetParameterAsText(1) #in a toolbox GUI, this should be Type = FeatureLayer outputFC = gp.GetParameterAsText(2) #in a toolbox GUI, this should Type = FeatureClass gp.Intersect_Analysis (catchmentsFC + ";" landCoverFC, outputFC, "ALL", "", "INPUT")
import arcgisscripting gp = arcgisscripting.create(9.3) Catchments = gp.GetParameterAsText(0) LandCover = gp.GetParameterAsText(1) Output = gp.GetParameterAsText(2) gp.Toolbox = "Analysis" gp.Intersect (Catchments + ";" LandCover, Output, "ALL", "", "INPUT")
import arcgisscripting gp = arcgisscripting.create(9.3) Catchments = gp.GetParameterAsText(0) LandCover = gp.GetParameterAsText(1) Output = gp.GetParameterAsText(2) gp.Toolbox = "Analysis" gp.workspace = "F:\Hydrology_Tools\Data" gp.Intersect ("Catchments; LandCover", Output, "ALL", "", "INPUT")
#master script (calls 100 instances of "subprocess.py" subProcessScript = r"C:\temp\subprocess.py" pythonExePath = r"C:\Python25\python.exe" rootDir = r"D:\temp" for tileNumber in range (1,101): parameterList = [pythonExePath, subProcessScript, rootDir, str(tileNumber)] os.spawnv(os.P_WAIT, pythonExePath, parameterList) #subprocess program (subprocess.py) rootDir = sys.argv[1] tileNumber = sys.argv[2] os.mkdir(rootDir + "\\tile_" + str(tileNumber)
import arcgisscripting gp = arcgisscripting.create(9.3) Catchments = gp.GetParameterAsText(0) LandCover = gp.GetParameterAsText(1) Output = gp.GetParameterAsText(2) gp.Toolbox = "Analysis" gp.Intersect ("LandCover; Catchments", "Output + 'output.shp'", "ALL", "", "INPUT")
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.