5

Is there a way to decrease the size of a raster image without decreasing cell size or quality?

I´m using ArcInfo but also have Saga-Gis or FME.

I could abviously change an 8bit raster to a 1bit raster and thereby lose the colour information, but I was thinking that there is maybe other "secret" or more lesser known methods.

1
  • You might delete any pyramid files (e.g. rrd) which ArcGIS will create if you don't change the defaults.
    – John
    Nov 19, 2013 at 14:42

3 Answers 3

2

As Guy said there are numerous lossless compression methods. Every method has its positives and negatives, and one must choose one with respect of the initial data. Generally, the DEFLATE algorithm for continuous raster data serves very well.

Usually the raster file size depends on the accuracy of each cell. Integer data types for example cost much less that float32. But the int type can hold only integers but float keeps the fraction part of the number. You also have flavors, meaning how many bits you choose to utilize (int4, int8, int16, int32 etc..) for you datatype. And depending on the flavor you have upper and lower limits.

As a practical example, if you have a classification raster, where each raster cell corresponds to a class, you don't need to save your raster as a float32 (which many applications have a default), but the data type int serves you very well also. the resulting raster will be if you combing it with a compression algorithm of a few megabytes where if you had chosen to save it as a float and without using any compression techniques the final size would be measured in hundreds of megabytes.

At end of the day it all comes down your initial datatypes and how much accuracy you want to preserve.

3
  • Thanks for the explaination. I´m interested in your comments regarding the difference between Data type and Bit depth. Are you able to expand? Nov 19, 2013 at 12:01
  • If it's imagery, and you're using 8-bit, then you're probably at the low end already. In FME open the data in the Data Inspector, and drag an envelope across it in query mode. That will tell you all about the image. If there are three bands (Red8, Green8, Blue8) then you're using an 8-bit image and I don't think changing bit depth would help. Nov 19, 2013 at 19:20
  • You can find the FME Training doc for raster online at: safe.com/learning/training/resource-center/advanced-raster - it includes an explanation of the difference between data type and bit depth, and how you can manipulate them with FME. Nov 19, 2013 at 19:22
1

Well, there are various type of compression techniques for raster images, which fall into either lossless data compression or lossy compression. The former is what you're looking for, and most of the time your GIS software will choose the best format (type of lossless compression) to save your raster image as. You can experiment with different types of file formats, but you should find your GIS chooses the best one.

1

Changing 3-band 8-bit to 1-bit wouldn't lose the color information, it would lose all information (unless you feel six colors, plus black and white is enough). If you have a 3-band 8-bit image, you can reduce its size by converting to a color-mapped one-band 8-bit image (though you may have to sacrifice some on color quality if there are more than 256 distinct colors).

In general, there aren't any "secret" ways of reducing image size, and the most effective compression algorithms are lossy, which will seriously degrade image quality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.