[gdal-dev] gdalwarp putting in incorrect values for -dstnodata

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] gdalwarp putting in incorrect values for -dstnodata

sunil.chaudhary
This post was updated on .
Hello I'm hoping someone can help me out here. I'm using gdal version 2.1.1.
What I am trying to do is use gdalwarp to clip a raster to a shape file and
then set the no data value to black or 0.

the command I am using to do this is:

gdalwarp -cutline HxIP_HVA_GP_z11_30cm_2014.shp -dstnodata 0
GB_AB_z11_deflate.tif GB_AB_z11_nodata.tif

What is happening is that in the output file all red values that are 0 are
being turned into the no data value. For example, if I have a pixel with RGB value of 0,15,36 the program is setting the pixel to No Data, 15, 36.

I have also tried to quote "0 0 0" for dstnodata but it is again turning R=0 as a no data value

Has anyone else encountered this issue? and if so is there a work around to set the no data value to actual black?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev