Created
December 26, 2020 12:52
-
-
Save BishopGIS/926866c9bf92b561ee0d9e1f9fd21ec7 to your computer and use it in GitHub Desktop.
Test warp
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
from osgeo import gdal | |
import os | |
ds = gdal.Warp('', 'small.tif', format='MEM', warpOptions=["INIT_DEST=NO_DATA", "UNIFIED_SRC_NODATA=YES"], srcNodata=0, dstAlpha=True) | |
try: | |
os.remove('nd5.tiff') | |
except OSError: | |
pass | |
gdal.GetDriverByName('GTiff').CreateCopy('nd5.tiff', ds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment