import arcpy, sys, traceback, os arcpy.CheckOutExtension("Spatial") #set pathes arcpy.env.workspace = r"C:\tmp\Shp" outRasterDir = r"E:\VTA\TEST\output\Distance_from_Household\Script_First_10_HH" #your variables maxDistance = 100000 cellSize = 1000 shpList = arcpy.ListFeatureClasses("P*") for shp in shpList: #build the name of output raster: directory + shapefilename w/o extension + some text outRaster = os.path.join(outRasterDir, shp[:-4] + "_EucD") #run the tool (if you want use defaults instead of maxDistance and cellSize, place "" instead of variable name) outEucDist = arcpy.sa.EucDistance(shp, maxDistance, cellSize) outEucDist.save(outRaster)
If a tool is used manually from ArcToolbox it only processes selected records. I had expected the same to happen using Python but it didn't.
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.