[Gdal-dev] Gdalwarp color corruption

Craig Miller craig.miller at spatialminds.com
Fri Jan 5 02:17:17 EST 2007


I've been using gdalwarp to reproject USGS quads (single band geotif images
with color table) from UTM zone 10/11 to geographic (EPSG:4326).  If I use
nearest neighbor sampling (-rn) the color table gets translated correctly,
but if I use bilinear, cubic, or cubic spline resampling the color table is
corrupted.  For example, blue water turns brown.  As nearest neighbor
sampling doesn't always offer up the smoothest results I'm hoping to get
cubic spline resampling working.  Any suggestions on how to get this working
w/o corrupting my color table?

I'm using gdal out of CVS from a couple of weeks ago.

Gdalwarp -rcs -co "COMPRESS=LZW" -co "TILED=YES" -wo "INIT_DEST=NO_DATA"
-t_srs EPSG:4326 infile.tif ..\geo\outfile.tif

I'd be happy to provide sample images, but they are a bit large so I didn't
want to send them to the list.

Thanks for the help,
Craig






More information about the Gdal-dev mailing list