Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. env.workspace = "My raster folder"
  2. rasterList = arcpy.ListRasters("*.img")
  3. print rasterList
  4. #works
  5. OutDir= "My output raster folder" + raster [0:7] + ".img"
  6. #Here is my loop that won't work
  7. for raster in rasterList:
  8. OutRaster = Con(IsNull(raster), 0, raster)
  9. outCon.save(OutDir)
  10. #this prodices only one raster out of the 50 rasters in the List.
  11.  
  12. Con(IsNull(raster1), 0, raster1)
  13. Con(IsNull(raster2), 0, raster2)
  14. Con(IsNull(raster50), 0, raster50)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement