[gdal-dev] Help by merge jpg-files - gdal_merge

Frank Warmerdam warmerdam at pobox.com
Mon Nov 2 11:31:27 EST 2009


Jan Tappenbeck wrote:
> Hallo !
> 
> in my secound post for this mail a had a secound question about gdal_merge.
> 
> using following command:
> 
> gdal_merge -v -o c:\temp\outputfile.tif --optfile c:\temp\sfilelist.txt
> 
> and 16 jpg-filenames (size 4-5 mb) in sfilelist.txt i create a new file 
> outputfile.tif with 2.3 gb !!!! a size unpractical to open in a viewer.
> 
> my job is to merge 500 files - is there a mistake i do in prinziple ????
> 
> i found the new file-size very big - because the resolution of the 
> source jpg-files is 72 dpi !

Jan,

There are various reasons this could be happening.

1) The input files could be highly compressed and the result file is
uncompressed.  JPEG compression is often on the order of 5:1 so a
5MB jpeg might well be 25MB uncompressed.  Depending on options it
is possible to achieve substantially more than 5:1 compression.

2) The input files could be spatially distant such that the resulting
uncompressed output file has large areas of no data (ie. an airphoto
in Canada and another one in Germany).

I would note that 2.3 GB is not too large a file to open in a viewer
application intended to work with large files.  However, it is generally
impractical to work with large geospatial mosaics in "camera photo"
oriented image viewers.

Your process does not seem unreasonable, but if you are going to produce
a large mosaic image you will need software intended to work with such a
large file.

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