Created
October 4, 2017 23:36
-
-
Save debboutr/c024e7df0896a6dc275882f78248edbc to your computer and use it in GitHub Desktop.
Fill raster cell values that aren't NoData with a single value with georasters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import georasters as gr | |
fll = 'D:/Projects/georaster_scrap/old/lakes_05b.tif' | |
a = gr.from_file(fll) | |
a.raster.data[:] = 1 | |
a.raster.unshare_mask() | |
a.nodata_value = 0 | |
a.datatype = 'Byte' | |
a.to_tiff('D:/Projects/georaster_scrap/test6') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment