[Gdal-dev] Is their a way to derive the size of a Mr. Sid file without expanding it?

Frank Warmerdam warmerdam at pobox.com
Sat Jan 20 13:42:10 EST 2007


John Mitchell wrote:
> Hi,
> 
> Is their a way to derive the size within GDAL of a Mr. Sid file without 
> expanding it?
> I would like to know in advance the size of a Mr. Sid file before I 
> split up and convert into GeoTiff format.  The reason why I need this 
> information in advance is so that I can plan on how many chunks of 
> GeoTiff's are necessary so that each GeoTiff is about 100 megs in Size.

John,

You can get the number of pixels, lines and bands from a mrsid with gdalinfo.
Then  you can compute the approximate size a corresponding uncompressed
file would be by multiplying them.  So a MrSID file that is 10000 pixels
by 10000 lines by 3 bands would be 10000 x 10000 x 3 = 300000000 or 300MB.

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