Dataset Compression Encode Type

Encode Type

To optimize storage space and improve system efficiency, SuperMap ImageX Pro provides multiple data compression encode types. Selecting appropriate encode types for different application scenarios is crucial. Detailed descriptions are shown in the following table:

Encode Type Description
Unencoded No encode type is used.
SGL

SGL (SuperMap Grid LZW) is a custom compression format developed by SuperMap. Based on improved LZW algorithm, it provides more efficient compressed storage.

Currently used for compressing Grid datasets and DEM datasets, this lossless compression method is suitable for raster datasets.

DCT

DCT (Discrete Cosine Transform) is a widely used transform coding method in image compression.

This method offers excellent balance between compression capability, reconstructed image quality, adaptability, and algorithm complexity, making it the most prevalent image compression technology.

Its principle reduces strong spatial domain correlation in original images through transformation for more compact data representation. While providing high compression ratio and performance, this method may cause encoding distortion.

As image datasets are generally not used for precision analysis, DCT is commonly adopted for image dataset storage.

LZW

LZW is a widely-used dictionary-based compression method originally designed for text data compression.

The encoding principle replaces recurring strings with codes, enabling compression of both repetitive and non-repetitive data.

This lossless compression method is suitable for indexed-color images, applicable to both raster and image datasets.

PNG

PNG compression supports images with various bit depths. This lossless compression method is suitable for image datasets.

JPEG

JPEG is a lossy compression method offering compression ratios from 1:20 to 1:40 while maintaining visual quality, making it suitable for background image data.

Compound Compound method achieves compression ratio close to DCT while addressing boundary tile distortion issues caused by DCT compression (applicable to RGB format image datasets).
Four-byte Int32 method. Stores coordinate values using four bytes. Suitable for vector data but not for point datasets, tabular datasets, CAD datasets, or 3D vector datasets.
Three-byte Int24 method. Stores coordinate values using three bytes. Suitable for vector data but not for point datasets, tabular datasets, CAD datasets, or 3D vector datasets.
Double-byte Int16 method. Stores coordinate values using two bytes. Suitable for vector data but not for point datasets, tabular datasets, CAD datasets, or 3D vector datasets.
Single-byte Byte method. Stores coordinate values using one byte. Suitable for vector data but not for point datasets, tabular datasets, CAD datasets, or 3D vector datasets.

Encode Type Application Scope

Compatible encode types for different dataset types are shown below:

Dataset Type Encode Type
Vector Dataset Single-byte, Double-byte, Three-byte, Four-byte
Raster Dataset SGL, LZW
Image Dataset LZW, DCT, PNG

Vector Dataset

Supports four encode types: Single-byte, Double-byte, Three-byte and Four-byte. These lossy compression methods share the same encoding mechanism but different compression ratios. Not applicable to point datasets, tabular datasets, or CAD datasets.

Example: For a line object with minimum bounds width (W) and height (H), the Single-byte compression ratio is: ratio = max(W,H)/255 (255 being maximum byte value). The encoded coordinate (x', y') for point (x, y) with origin (x₀, y₀) is: x'=byte[(x-x₀)/ratio], y'=byte[(y-y₀)/ratio].

Encoded coordinates are stored as byte type, reducing storage space to 1/8 of original size. Maximum precision loss equals ratio. Other vector compression methods follow the same principle with maximum precision loss ratio = max(W,H)/maxValue.

maxValue represents maximum value of corresponding data type: 255 (byte), 65535 (int16), 16777215 (int24), 4294967295 (int32).

Raster Dataset

Supports DCT, SGL, LZW or Compound methods. DCT and Compound are lossy compression, while SGL and LZW are lossless. When original encode type is DCT or Compound, conversion to SGL is supported. 8-bit non-grayscale palette images don't support DCT encoding - use LZW instead.

Image Dataset

Available encode types vary by pixel format:

Example: 1-bit monochrome data supports original LZW and PNG encode types. When original encode type is DCT, SGL or Compound, LZW encoding format can be selected.