LIN File Specification

Revision History: 5/28/09  Updated for XP930b13 with MIRROR 4/28/09  Updated for XP930b8 with LAYER_GROUP 7/24/06  Updated for XP850b5 with TEX_WIDTH 7/19/06  Initial Draft

Intro
Painted line files (.lin) define taxiway markings that can be draped over DSFs, although they could can be used for other purposes too.

Painted line files are standard X-Plane 8/9 text files starting with a header and then commands. The # defines a comment. For a .lin file to be valid, it must contain a TEXTURE command, a SCALE command and an S_OFFSET command. A 850 LINE_PAINT Painted lines are defining polygons in the DSF file. The polygon may have windings - only lat and lon coordinates are needed. The polygon parameter is used to indicate a closed loop (1) or open chain (0).

If two coordinates are provided (lon, lat) then the line is made of line segments. But if it is made of four coordinates (lon, lat, control lon, control lat) then it is interpreted as bezier curves.

Commands
The commands define the line:

TEXTURE &lt;texture&gt;
The texture command specifies the texture to be used for the painted lines. It is located relative to the .lin file. Night lighting is not available for painted lines.

SCALE &lt;horizontal&gt; &lt;vertical&gt;
The scale command defines how large the texture is in meters when applied. The parameters are in meters and represent the size of the entire texture.

TEX_WIDTH &lt;pixels&gt;
The horizontal coordinates are specified in terms of a texture of this width. In other words, this defines the scale in which horizontal coordinates are specified. So if your TEX_WIDTH is 1024, your middle pixel is 512, even if your whole texture size is only 16 pixels wide.

S_OFFSET &lt;layer&gt; &lt;s1&gt; &lt;sm&gt; &lt;s2&gt;
Each line is drawn in multiple layers, numbered consecutively starting at 0. Each line has three horizontal texture coordinates--a left, middle and right. The middle coordinate is aligned with the DSF line. The texture is simply repeated from top to bottom.

LAYER_GROUP &lt;name&gt; &lt;offset&gt;
[XP930:]This specifies which layer group (z order) to draw the polygon in. The definition is the same as the ATTR_layer_group command in the OBJ8 spec.

MIRROR
[XP930:]Normally a rounded or bent line is made by stretching the texture, forming trapezoids out of the lines. However when the mirror command is present in the file, X-Plane may reverse the texture direction to form clean cuts at sharp corners. This lowers the artifacts due to sharp corners in lines with lateral markings, but is inappropriate if the line has a clear longitudinal "direction" (e.g. a line with text in the texture along the long axis).

Example file:
A 850 LINE_PAINT TEXTURE taxilines.png SCALE 10.0 2.5 S_OFFSET 0  0.03125  0.046875 0.0625 S_OFFSET 1  0        0.015625 0.03125