Skip to content

Instantly share code, notes, and snippets.

@ryan-hill
Created September 11, 2015 19:02
Show Gist options
  • Save ryan-hill/ecd240fb7c46b31a4da3 to your computer and use it in GitHub Desktop.
Save ryan-hill/ecd240fb7c46b31a4da3 to your computer and use it in GitHub Desktop.
Code snippet to convert NA values within conterminous USA (NLCD data as mask) to 0s
path = 'xyz/'
mask_grid = path + 'nlcd2006.tif'
arcpy.env.mask = mask_grid
PCH = path + 'PCH.tif'
PCH = Con(IsNull(PCH),0,PCH)
PCH.save(path + 'PCH2.tif')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment