CLS Classed Post File Format

Classed post maps .CLS file formats are used to define a class and the symbol associated with the class. The basic format consists of an ASCII file with header information on the first line. Subsequent lines specify each class, with one class on each row. The range minimum, range maximum, symbol set, symbol index number, color, and symbol size are saved in the .CLS file. The color is in RGBA format.

The header consists of the following space-delimited fields:

Element

Description

Id

case-sensitive string "ClassData" without the quotes

Version

format version number, this should be set to 1 or 2. 1 does not specify the line and fill color for the symbol separately.

BinningMethod

binning method, this should be set to 0, 1, or 2. 0 = Equal Number, 1 = Equal Interval, and 2 = User Defined.

Subsequent lines define the class, one per line. Each line has the following space-delimited fields:

Element

Description

Minimum

The minimum value is the lower bound for this class. The minimum value is included in the class.

Maximum

The maximum value is the upper bound for this class. The maximum value is not included in the class.

Symbol Set

The symbol set is the name of the font to use for the symbol. For example "GSI Default Symbols". The name is enclosed in double quote marks.

Symbol Index

The symbol index is the number of the symbol to use.

Color

In Format 1 CLS files, the color is for both the line and fill symbol color, specified as RGBA values, such as 81 186 198 255, with the values for R G B A separated by spaces. RGBA values range from 0 to 255 with 0 = none of the specified color or transparency and 255 = maximum of the specified color or transparency.

Fill Color

In Format 2 CLS files, the symbol fill color, specified with a color name, such as "Blue" or with RGBA values, such as "R81 G186 B198 A255". Color names and RGBA values are enclosed with double quotes. R is the red component, G is the green component, B is the blue component, and A is the alpha (opacity). RGBA values range from 0 to 255 with 0 = none of the specified color or transparency and 255 = maximum of the specified color or transparency.

Line Color

In Format 2 CLS files, the symbol line color, specified with a color name, such as "Blue" or with RGBA values, such as "R81 G186 B198 A255". Color names and RGBA values are enclosed with double quotes. R is the red component, G is the green component, B is the blue component, and A is the alpha (opacity). RGBA values range from 0 to 255 with 0 = none of the specified color or transparency and 255 = maximum of the specified color or transparency.

bitflag

An indicator that tells the program to use the line color for the fill color. As this is no longer supported and the colors are listed separately, this value must be 1.

Size

The symbol size in inches.

Examples

In the following example, 3 classes are defined. The first class has min and max values at 25 and 60, second at 60 and 75, and third at 75 and 105.1 The first class has a slightly transparent blue 0.01 inch circle (with a black outline in the type 2 CLS). The second class has a solid opaque green 0.20 inch diamond. The third class has a black 0.01 inch cross hair.

Format 1:

min max "symbol set" symbol_index color size

ClassData 1 0

25 60 "Default Symbols" 12 0 0 255 255 0.100000

60 75 "Default Symbols" 6 0 255 0 255 0.200000

75 105.1 "Default Symbols" 0 0 0 0 255 0.100000

Format 2:

min max "symbol set" "fill color" "line color" bitflag symbol_index size

ClassData 2 0

25 60 "GSI Default Symbols" "R0 G0 B255 A150" "Black" 1 12 0.1

60 75 "GSI Default Symbols" "Green" "Green" 1 6 0.2

75 105.1 "GSI Default Symbols" "Black" "Black" 1 0 0.1

See Also

Class Post Map

Classes Page