[Gdal-dev] gdal_merge: merge/mosaic NITF files
Frank Warmerdam
warmerdam at pobox.com
Thu Jan 8 19:28:18 EST 2009
Charles Chung wrote:
> Hi all, I am new using GDAL and raster format. Here is my situation.
>
> With GDAL 1.6.0dev, I want to merge or mosaic many NITF files into one NITF
> or GeoTIFF file.
>
> Each NITF file is about 284 KB and its characterists are:
>
> Driver: NITF/National Imagery Transmission Format
> Files: ???????.???
> Size is 1536, 1536
> ...
> Pixel Size = (0.000059486040609,-0.000044956841432)
> ...
> Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>
> If I use "gdal_merge" with one NITF input file and default settings, the
> default output is GeoTIFF and the size is 2,316 KB. That's 8 times bigger
> in size even though I used only one input file. If I output to NITF format,
> the size is also 8 times bigger. If I merge two NITF files the output is
> about 16 times bigger.
>
> Why the output file size is so much bigger than the input file? Is there
> settings to make it smaller?
> Basically I want the size of merged files to be about the same size as the
> sum of input file size.
Charles,
I suspect the input NITF files are compressed, and for the most part GDAL
does not support producing compressed files. If you run gdalinfo on the
input file, and check the IC (compression) field, I presume it will be
set.
If you were to convert ultimately to a compressed format like PNG or
Deflate compressed TIFF you should get similar or better results.
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 | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list