I'm trying to change the values of nodata from my source file to a set value for my output file, but all I am getting is an error. This is my code:
from osgeo import gdal
from subprocess import call
input_raster = r"c:\blah\someinputtiff.tif" #This file I want to clip
output_raster = r"c:\blah\someoutputtiff.tif" #The resulting clip file
input_shape = r"c:\blah\someshapefile.shp" #The file I want to use to clip the.tif
call(['C:\Program Files (x86)\GDAL\gdalwarp.exe','-
dstNodata"value[-9999]"', '-cutline' , input_shape , '-crop_to_cutline' ,
input_raster , output_raster, '-overwrite'])
This produces the following error:
FAILURE: Unknown option name '-dstNodata"value[-9999]"'
I have tried multiple permutations of '-dstNodata' followed by a value but no luck.