Level File Format
Level .LVL files are used to specify level and property data for various map types within Surfer. Level files are ASCII files with one record per line. Fields within the line are separated by commas or white space. Comments are delimited by a single quote character, and may be placed at the beginning of a line or the end of a record.
LVL Format 1
There are three different forms of the level file format. The first and simplest form consists of a single elevation value per record. For example, the following file can be used to specify logarithmic intervals for a contour map:
0.1
1
10
100
1000
LVL Format 2
The second form of the level file format is indicated by specifying the LVL2 keyword on the first line. In this form of level file, each subsequent record has the following general syntax:
Level Flags LColor
The fields are space delimited and defined as follows:
Element |
Description |
Level |
Level is the Z value of the level. |
Flags |
Flags represents labels and hachures where 0=normal (no labels, no hachures), 1=labeled, 2=hached, and 3=labeled and hached. |
LColor |
LColor is the color of lines used to represent the level. The color must be enclosed in double quotes. |
LStyle |
LStyle is the style of lines used to represent the level, and it is one of the line style names as listed in theLine Stylestopic. The name must be enclosed in double quotes. |
LWidth |
LWidth is the line width in mils (thousandths of an inch). |
FFGColor |
FFGColor is the fill foreground color. The color must be enclosed in double quotes. |
FBGColor |
FBGColor is the fill background color. The color must be enclosed in double quotes. |
FPattern |
FPattern is one of the fill style names as appears in the Fill Pattern palette within the dialogs. The name must be enclosed in double quotes. |
FMode |
FMode is the background mode for patterns where 1=transparent and 2=opaque. |
All colors are specified by name as listed in the Colors topic or by the special syntax "Rxxx Gyyy Bzzz." In this form, the red, green, and blue components are substituted for the xxx, yyy, and zzz fields, respectively. Each component can range from 0 to 255.
Here is an example of a version 2 level file that defines 4 levels and their properties:
LVL2
20 1 "Black" "Solid" 0 "Black" "Black" "Solid" 2
25 0 "Black" "Solid" 0 "R15 G15 B15" "R15 G15 B15" "Solid" 2
30 0 "Black" "Solid" 0 "R31 G31 B31" "R31 G31 B31" "Solid" 2
35 0 "Black" "Solid" 0 "R47 G47 B47" "R47 G47 B47" "Solid" 2
LVL Format 3
The third form of the level file format is indicated by specifying the LVL3 keyword on the first line. In this form of level file, each subsequent record has the following general syntax:
Level Flags LColor LStyle LWidth FVersion FFGColor FBGColor FPattern OffsetX OffsetY ScaleX ScaleY Angle Coverage
The fields are space delimited and defined as follows:
Element |
Description |
Level |
Level is the Z value of the level. |
Flags |
Flags represents labels and hachures where 0=normal (no labels, no hachures), 1=labeled, 2=hached, and 3=labeled and hached. |
LColor |
LColor is the color of lines used to represent the level. The color must be enclosed in double quotes. |
LStyle |
LStyle is the style of lines used to represent the level, and it is one of the line style names as listed in theLine Stylestopic. The name must be enclosed in double quotes. |
LWidth |
LWidth is the line width in mils (thousandths of an inch). |
FVersion |
Unused, set to 1 |
FFGColor |
FFGColor is the fill foreground color. The color must be enclosed in double quotes. |
FBGColor |
FBGColor is the fill background color. The color must be enclosed in double quotes. |
FPattern |
FPattern is one of the fill style names as appears in the Fill Pattern palette within the dialogs. The name must be enclosed in double quotes. |
OffsetX |
OffsetX controls the X location of the image pattern within the geometry. |
OffsetY |
OffsetY controls the Y location of the image pattern within the geometry. |
ScaleX |
ScaleX controls the density in the X direction of an image pattern. |
ScaleY |
ScaleY controls the density in the Y direction of an image pattern. |
Angle |
Angle controls the rotation of the pattern. This should always be set to zero. |
Coverage |
Coverage determines whether an image is stretched or tiled. 0 = tiled, 1 = stretched. |
All colors are specified by name as listed in the Colors topic or by the special syntax "Rxxx Gyyy Bzzz Aaaa." In this form, the red, green, and blue components are substituted for the xxx, yyy, and zzz fields, respectively. The opacity value is substituted for the aaa value. Each component can range from 0 to 255.
Here is an example of a version 3 level file that defines 5 levels and their properties:
LVL3
'Level Flags LColor LStyle LWidth FVersion FFGColor FBGColor FPattern OffsetX OffsetY ScaleX ScaleY Angle Coverage
2100 1 "R216 G0 B216 A255" ".2 in. Dash" 0 1 "Powder Blue" "R255 G255 B255 A156" "Crosshatch" 0 0 1 1 0 0
2300 0 "R216 G0 B216 A255" ".2 in. Dash" 12 1 "R255 G0 B255 A207" "R255 G255 B255 A0" "Dashed Horizontal" 0 0 1 1 0 0
2500 0 "R216 G0 B216 A255" ".2 in. Dash" 25 1 "R102 G153 B102 A130" "R255 G255 B255 A0" "Solid" 0 0 1 1 0 0
2700 0 "R216 G0 B216 A255" ".2 in. Dash" 37 1 "Powder Blue" "R255 G255 B255 A0" "Andesite 1" 0 0 1 1 0 0
2900 0 "R216 G0 B216 A255" ".2 in. Dash" 50 1 "Red" "R255 G255 B255 A0" "Coarse, medium-graded sand" 28 0 1.55 1.55 0 0