The difference between uncompressed size and physical size of a raster,
I couldn’t figure out what might the uncompressed size indicate for.
For example, the raster below has 1.5 GB as physical size while the uncompressed size is 1.1 GB. How this might be explained.
Other example, the physical size is 13 MB and the uncompressed size is 111.1 GB
What might be the explanation for these two cases?
Thank you
Best
Jamal
Rounding representation...
Thanks Dan.
Does this mean that the uncompressed size is the rounding off for the physical size?
dont' go comparing what you seen in windows with what you see in Arc* but in any event
Thanks Dan,
What I wanted to know here is to make sure that the uncompressed size of a raster refers somehow to its physical size but not to something else.
Hello Jamal,
For 8-bit per pixel data, uncompressed size can be found with this formula:
pixels X * pixels Y * number of bands = uncompressed bytes.
An 8-bit per pixel tiff file with no compression applied and only pixels in the file is a representation of uncompressed size of the image. In your screen captures above there is compression applied. So the size on disk is then different from the uncompressed size.
Of course there can be georefencing info in the file's header and maybe some other things. There's another reason for uncompressed size to not match the size on disk.
Page 23 of the ERDAS Field Guide shows the formula and an example. There is another part to this formula that helps with images that are not 8-bits per pixel. I almost always work with 8-bit per pixel image data so the formula above can be used most of the time.
http://www.gis.usu.edu/manuals/labbook/erdas/manuals/FieldGuide.pdf
Thank you very much Paul.
This is very valuable answer that shows how the physical size of an image is calculated.
It remains to find a mathematical equation that associates the uncompressed size with the physical size.
The raster object should have the same compression type, compression quality, pixel depth, number of bands, and tile size as the final raster object that it will represent. These raster properties affect storage size of a raster object within the database.
The total raster dataset size to sample size ratio is calculated as - total size of all rasters / sample raster size = total size to sample size
Thanks Kaleigh,
This is an excellent post. I’d love to see these tests repeated with ArcGIS 10.1 to see what the deltas are between 10.0 and 10.1 performance on the same hardware.
Thanks !!
Jamal NUMAN:
...
It remains to find a mathematical equation that associates the uncompressed size with the physical size.
There are many different types of raster compression, both lossy and lossless. You can't reliably calculate compressed file size from uncompressed size as it is very dependent on the values in the raster (and on the compression type). Consider two rasters, both with the same number of bands, bit depth, rows and columns. One is full of random values, the other contains only 1s. The first will compress poorly and the second will compress to a very small file size.
The following file sizes are for 1 band, 16bit, 512x512 rasters, one containing just 1s and the other with random values:
524.9Kb test_ones.tif
524.9Kb test_random.tif
13.9Kb test_ones_compressed.tif
681.4Kb test_random_compressed.tif
The rasters were compressed with LZW compression. Note the compressed raster with random data is actually larger in file size than the uncompressed version. This is an extreme case, but you will find that rasters with larger contiguous areas of the same value will compress better than rasters whose values vary. For example, a land use classification raster will compress much better than a satellite image band.