How do I set nodata with custom color for gdal_translate and gdal2tilespy?

المشرف العام

Administrator
طاقم الإدارة
I start with a bunch of 1-bit geotiff files that I had to convert to 8-bit RGB tiff files to use with GDAL. Then I tried to set borders to red (content is in black and white so I can't use those) and do

gdal_translate -a_nodata '200 0 0' -of vrt red.tiff nodata.vrtgdalbuildvrt -srcnodata '200 0 0' -vrtnodata '200 0 0' -hidenodata -addalpha nodata.vrt trans.vrtgdal2tiles.py -a "200,0,0" trans.vrt ...But I am only able to hide nodata if it is in grayscale(ex. rgb(200,200,200)) I think the color information is just lost in the gdal_translate process. Is there any way to verify what happened and make gdal work with nodata that has custom colors?



أكثر...
 
أعلى