Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Environment Settings > Raster Storage settings

Compression

Release 9.2
Last modified September 4, 2007
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Raster Storage settings"


Related Topics

Specify the compression type for to use when storing the raster dataset. Three types of compression are supported: LZ77, JPEG, and JPEG2000. If JPEG or JPEG2000 is chosen, you can also specify the compression quality; the default compression quality is 75 for both JPEG and JPEG 2000.

LZ77 (the default) is a lossless compression that preserves all raster cell values. It uses the same compression algorithm as the PNG image format and one similar to ZIP compression. Since you can rely on the pixels not changing their values after you compress them, use LZ77 for performing visual or algorithmic analysis.

JPEG is a lossy compression because raster cell values may not be preserved after compression and decompression. It uses the public domain JPEG (JFIF) compression algorithm and only works for unsigned 8-bit raster data (single-band grayscale or three-band raster data).

JPEG2000 uses wavelet technology to compress rasters so they visually appear lossless, meaning that although the cell values do get manipulated, the differences between the original and the same raster with compression are not easily distinguishable. Use JPEG or JPEG2000 for rasters that are meant as pictures or backdrop imagery.

If JPEG or JPEG2000 is selected, you can also set the compression quality to control how much loss the image will be subjected to by the compression algorithm. The values of the pixels of an image compressed with a higher compression quality will be closer to those of the original image. Valid value ranges of compression quality are from one to 100. The default compression quality is 75. If you don't explicitly set a value the default will be used.

The amount of compression will depend on the data and compression quality. The more homogeneous the data, the higher the compression ratio. The lower the compression quality, the higher the compression ratio. Lossy compression normally results in higher compression ratios when compared to lossless compression.

The primary benefits of compressing data are that compressed data requires less storage space and data display times will be quicker because there is less information to transmit.

This setting is used for tools that create raster datasets in ArcGIS. Please refer to the Raster Storage Matrix to see which raster storage formats can be controlled when using this setting.


Usage tips




Command line syntax

An overview of the command line window

Compression <compression_type>


Parameters Explanation Datatype
<compression_type> Compression type:
  • LZ77—Lossless compression that preserves all raster cell values. This is the default.
  • JPEG—Lossy compression that uses the public JPEG compression algorithm. If you choose JPEG you can also specify the compression quality.
    • Value—compression quality. The valid value ranges are from 5 to 95, with 75 being the default.

  • JPEG2000—Uses wavelet technology so rasters appear lossless. If you choose JPEG2000 you can also specify the compression quality.
    • Value—compression quality. The valid value ranges are from 5 to 95, with 75 being the default. .

  • NONE—no compression will occur.

NOTE: For JPEG and JPEG2000 if you don't explicitly set a value the default will be used.

String

Data types for geoprocessing tool parameters

Command line example



Compression JPEG 80



Scripting syntax

An overview of scripting in geoprocessing

Compression (compression_type)


Parameters Explanation Datatype
compression type (Required) Compression type:
  • LZ77—Lossless compression that preserves all raster cell values. This is the default.
  • JPEG—Lossy compression that uses the public JPEG compression algorithm. If you choose JPEG you can also specify the compression quality.
    • Value—compression quality. The valid value ranges are from 0 to 100, with 75 being the default.
  • JPEG2000—Uses wavelet technology so rasters appear lossless. If you choose JPEG2000 you can also specify the compression quality.
    • Value—compression quality. The valid value ranges are from 0 to 100, with 75 being the default. .

  • NONE—no compression will occur.

NOTE: For JPEG and JPEG2000 if you don't explicitly set a value the default will be used.

String

Data types for geoprocessing tool parameters

Script example



import arcgisscripting
gp = arcgisscripting.create()

gp.workspace = "H:\\Tongass"
gp.compression= "JPEG 80"


Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.