[Gdal-dev] Re: scanned maps for mosaicking

Juan Cicuéndez jicicuendez at gmv.es
Tue Jun 7 07:58:22 EDT 2005


Andrey Kiselev <dron <at> ak4719.spb.edu> writes:

> 
> On Mon, Jun 06, 2005 at 04:30:06PM +0200, Juan Ignacio wrote:
> > I am using gdal to create a mosaic composed of scanned maps in tiff
> > format. When I create this file the colour table of the first file in
> > order to create the output mosaick. The problem is that not all the
> > imagery have the same colour table therefore when you visualise the
> > mosaic the only image which remains the same in the one of the colour
> > table but the colours of the others have changed as the obviously had
> > a different colour table. Does anybody know if it is possible to
> > circumvent this problem and create a mosaic where all the colours look
> > ok? Does the tiff format allow to include all the colour tables? I
> > would not like to re-scan all the imagery to the same colour table.
> 
> Juan,
> 
> The simplest solution is to convert all your scans in the 24-bit RGB
> format. You can do that with the tiff2rgba utility from the libtiff
> package. Be ready that resulting images will be larger than original
> ones, but not too much if you will use compression.
> 
> Best regards,
> Andrey
> 
Thank you very much Andrey,

I tried to convert the imagery from normal tiff with colour table to RGB tiff 
with tiff2rgba. Somehow I obtain 4-banded files. Should it not be 3 bands 
instead? Is this normal?

Besides my program used to includ a line 
fileInfoArr[i] = new FileInfo(filename, oTargetSRS, temp_dir);

that fails now with the RGB tiff files; this might be related to my previous 
comment.

Any clue about what's going on or workarounds?

Cheers,
Juan






More information about the Gdal-dev mailing list