Encode Type
According to different application purposes, the Encode Type of GIS Data Settings is reasonable, which is very beneficial to improve the efficiency of system operation and save storage space. provided, and their respective characteristics and applicability are shown in the following table:
Encode Type | Description |
Uncoded | Do not use Encode Type. |
SGL | SGL (SuperMap Grid LZW), a compressed Storage Format customized by SuperMap. Its essence is an improved LZ W Encode Type. SGL improves LZW and is a more efficient way of compressed storage. At present, the compression storage of Grid Dataset and DEM Dataset in SuperMap adopts the compression Encode Type of SGL, which is a lossless compression applicable to Raster Dataset. |
DCT | DCT (Discrete Cosine Transform), discrete cosine coding, is a transform coding method which is widely used in image compression. This transformation method provides a good balance between the compression ability of information, the quality of reconstructed image, the scope of application and the complexity of algorithm, and becomes the most widely used image compression technology at present. Its principle is to reduce the very strong correlation existing in the original spatial domain representation of the image through transformation, so that the signal can be expressed more compactly. The method has high compression ratio and performance, but the coding is distorted. Since the Image Dataset is generally not used for precise analysis, the DCT Encode Type is the compression Encode Type stored in the Image Dataset, which is applicable to the Image Dataset. |
LZW | LZW is a widely used dictionary compression method, which was first used in the compression of text data. The encoding principleof LZW is to replace a string with a code, and the same code is used for subsequent identical strings. Therefore, the Encode Type can not only compress duplicate data, but also compress non-duplicate data. Compression methodfor indexed-color images, a lossless compression Encode Type for raster and Image Dataset. |
PNG | PNG Compressed method, supporting images with multiple bit depths, is a lossless Compression method, applicable to Image Dataset. |
JPEG | JPEG is a lossy compression method. On the premise that there is no difference in visual effect, the compression ratio can reach 1/20 to 1/40. It has a high degree of compression and is suitable for Image Data as a background image. |
Compound | Compound mode, whose compression ratio is close to DCT Encode Type, mainly aims at the problem of boundary image block distortion caused by DCT compression. (For Image Dataset in RGB format). |
Four bytes | Int32 mode. Uses four bytes to store a coordinate value. Works with Vector Data but not with Point Dataset, Tabular Dataset, CAD Dataset, and 3D Vector Dataset. |
Three bytes | Int 24 mode. Uses three bytes to store a coordinate value. Works with Vector Data but not with Point Dataset, Tabular Dataset, CAD Dataset, and 3D Vector Dataset. |
Double Byte | Int16 mode. Stores a coordinate value in two bytes. Works with Vector Data, but not with Point Dataset, Tabular Dataset, CAD Dataset, and 3D Vector Dataset. |
Single byte | Byte mode. Uses one byte to store one coordinate value. Works with Vector Data, but not with Point Dataset, Tabular Dataset, CAD Dataset, and 3D Vector Dataset. |
Encode TypeScope of application
For Vector Dataset, four compression Encode Types are supported, namely, single-byte, double-byte, three-byte and Int32 modes. These four compression Encode Types adopt the same compression encoding mechanism, but the compression ratios are different. They are all lossy compression.
For Raster Data, four compression Encode Types are available, namely DCT, SGL, LZW, and Compound. Where DCT and Compound are lossy compression Encode types, and SGL and LZW are lossless compression Encode types.
Note the Point Dataset, Tabular Dataset, and CAD Dataset incompressible encodings.
As shown in the figure, for an object in Line Dataset, if the minimum Bounds are Width and Height, the compression ratio with Byte is ratio = Max (Width, Height)/255.
Where 255 is the maximum number that a single byte can represent. Let the coordinates of the lower left corner of the line object be (x0, y0), then for a point (X, y) on the line object, its encoded coordinates are: X '= byte (x-x0)/ratio y' = byte (y-y0)/ratio
Therefore, the coordinates of the encoded points are stored in the byte type Data Type, and the storage space of the Dataset is 1/8 of the storage space of the unencoded points. Obviously, there is a loss of precision when encoding double precision (8 Byte) types into byte (1 Byte) types. For coordinate values, the maximum precision loss value is ratio.
For other vector compression Encode Types, the principle is the same, and the maximum loss of coordinate accuracy after compression is ratio = Max (Width, Height)/Max Value.
Where Width and Height are the width and height of the minimum Bounds of Geometry, and maxValue is the maximum value that can be represented by the Data Type of Encode Type (the maximum Byte value is 255, the maximum Int16 value is 65535, Int24 Max is 16777215, Int32 Max is 4294967295).
- Raster Dataset only supports LZW SGL. When the original Encode Type is DCT or Compound, the Encode Type of SGL can be selected. The non-gray color palette of 8-bit images does not support DCT encoding and can be converted to Encode Type of LZ W.
- For the compression Encode Type of vector, Byte of Line Dataset is taken as an example to illustrate its compression encoding mechanism. It is assumed that the Spatial Data of the uncompressed Line Dataset is stored as a double-precision Data Type, and now it is compressed and stored using a single-byte compression Encode Type.
- For images and Raster Dataset, selecting the appropriate compression Encode Type according to its Pixel Format is very beneficial to improving the efficiency of system operation and saving storage space. The following table lists the reasonable Encode Types for different Pixel Formats for images and Raster Dataset. For example, Pixel Format is 1-bit monochrome data and supports the original Encode Type of LZW and PNG. When the original Encode Type is DCT, SGL and Compound, the Encoding Format of LZW can be selected.
Use of DatasetEncode Type
DatasetEncode Type can be modified through the Create Dataset, Copy Dataset, Import Dataset, and Export Image Dataset functions, or by right-clicking a Dataset. View the Encode Type of the Dataset in the Attributes window.
Create Dataset
When you create a new Vector Dataset, you can set the Encode Type for it. For different types of Datasets, the available Encode Types are available in a drop-down menu.
Copy Dataset
You can set the Encode Type for a Copy Dataset at the same time. For different types of Datasets, the available Encode Types are available in a drop-down menu.
See the following table for the different types of Dataset and the corresponding Encode Type:
Dataset Type | Encode Type |
---|---|
Vector Dataset | Single-byte, double-byte, three-byte, four-byte |
DEM/Grid Dataset | SGL,LZW |
Image Dataset | LZW,DCT,PNG |
Import Dataset
Encode Type can be selected for Data Import of external format. Where, the default Encode Type of the image Image Dataset is DCT coding, and the default Encode Type of other formats is uncoded.
Export Image Dataset
Click the right mouse button in the Map, and select Output as Image Data in the Context Menu that appears. The Encode Type can be DCT, LZW, PNG, or None.