# --------------------------------------------------------------------------- # Grids to Tiffs # Created on: Fri Aug 20 2010 03:15:43 PM # Daryl Van Dyke, USFWS Klamath SHC Analyst # --------------------------------------------------------------------------- # Import system modules import sys, string, os, arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create(9.3) # Check out any necessary licenses gp.CheckOutExtension("spatial") # Load required toolboxes... gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx") gp.OverwriteOutput = 1 # Local variables... TileSet = "G:\\02_Shasta\\DEM_Tile\\" targetDirectory = "J:\\DEM_tif\\" gp.Workspace = TileSet listRasters = gp.ListRasters( "", "") print "Workspace: "+ TileSet print listRasters for rasters in listRasters: print "copying "+rasters+" to "+targetDirectory+rasters+".tif"+" from "+TileSet outputLocation = targetDirectory+rasters+".tif" print outputLocation print "gp.Copy_Management("+rasters+","+outputLocation+")" gp.Copy_Management(rasters, outputLocation,"#","#","#","NONE","NONE","#")
J:\DEM_tif\r257.tif gp.Copy_Management(r257,J:\DEM_tif\r257.tif) copying r258 to J:\DEM_tif\r258.tif from G:\02_Shasta\DEM_Tile\ J:\DEM_tif\r258.tif gp.Copy_Management(r258,J:\DEM_tif\r258.tif) copying r259 to J:\DEM_tif\r259.tif from G:\02_Shasta\DEM_Tile\
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.