[Gdal-dev] warping NITF file with RPCs and losing color

Frank Warmerdam warmerdam at pobox.com
Tue Nov 28 20:46:21 EST 2006


Derrick Hoffman wrote:
> Hello all,
> 
>  
> 
> I am trying to warp an NITF file using GDAL warp.  The file has RPCs and 
> the coordinate warping itself works just fine.  The problem is that 
> after the warp occurs, the result image is now grayscale.  Is there any 
> way to preserve each band’s colors in the output file?

Derrick,

First, I'd warn you that GDAL warps using RPCs aren't very accuracy since
I believe an elevation of zero is assumed everywhere.

I'm not sure why you are losing the color of your file.  Generally speaking
current versions of gdalwarp will try and copy a pseudocolor table to the
output file if the source has one, and 3-band RGB files should be fine.
Can you provide a gdalinfo report on the input file and output file, and
the version of GDAL you are using?

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list