Guest User

Untitled

a guest
Jan 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. #import the module
  2. import arcpy
  3. from arcpy.sa import *
  4. from arcpy import env
  5. arcpy.CheckOutExtension("Spatial")
  6. env.overwriteOutput = True
  7.  
  8. #set the workspace
  9. arcpy.env.workspace = r"C:UsersWindowsDocumentsJO_GIS_Analyst"
  10.  
  11. #Create a list of raster files
  12. rasterList = arcpy.ListRasters("reprojected*", "TIF")
  13.  
  14. #Loop through the list of ListRaster
  15. for k in rasterList:
  16. print k #check the presence of rasters
  17. OutRaster = (k)*100) #multiplying the raster by 100
  18. OutRaster_Name = "nofpt" + k #specifying the output name
  19. OutRaster.save(OutRaster_Name) #saving the raster
  20.  
  21. for k in rasterList:
  22. print k #check the presence of rasters
  23. OutRaster = Raster(k)*100 #multiplying the raster by 100
  24. OutRaster_Name = "nofpt" + k #specifying the output name
  25. OutRaster.save(OutRaster_Name) #saving the raster
Add Comment
Please, Sign In to add comment