Opened 13 years ago

Last modified 13 years ago

#2724 closed defect

NODATA missing in blank area when warping vrt file with expanded RGB into vrt — at Initial Version

Reported by: klokan Owned by: warmerdam
Priority: high Milestone: 1.6.1
Component: Algorithms Version: 1.6.0
Severity: normal Keywords: vrt warped
Cc:

Description

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:

Example: 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 (1)

Changed 13 years ago by klokan

Attachment: palette.tif added
Note: See TracTickets for help on using tickets.