NODATA missing in blank area when warping vrt file with expanded RGB into vrt
|Reported by:||klokan||Owned by:||warmerdam|
Description (last modified by )
I am warping a VRT file which is expanded into RGB from a tiff with color palette. The result is different when warping into tiff and vrt.
The newly added blank areas created because of the change of the map shape during reprojection are always black (0,0,0) in vrt. They should be filled with correct NODATA value. Even when the nodata value is explicitly set when calling gdalwarp command the result is not correct:
gdal_translate -of vrt -a_nodata 255 -expand rgb palette.tif rgb.vrt gdalwarp -of vrt -t_srs epsg:900913 -srcnodata 255 -dstnodata 255 rgb.vrt rgbwarped.vrt
If I use in the second step gtiff driver instead of vrt, like:
gdalwarp -of gtiff -t_srs epsg:900913 -srcnodata 255 -dstnodata 255 rgb.vrt rgbwarped.tif
then the result is correct - new blank areas are filled with NODATA value.
Difference is visible in the top left corner of the file. OpenEV shows:
rgbwarped.vrt: 0r 0g 0b rgbwarped.tif: 255r 255g 255g [NODATA]
It seems like a bug in the warping core related to vrt with expanded rgb.
Change History (11)
comment:1 by , 14 years ago
|Keywords:||vrt warped added|
|Priority:||normal → high|
|Status:||new → assigned|