TYP samples

Here is a set of TYP's samples which may help you to see how the files works.

XML files need to write more characters if you do it manually without an appropriate editor. With a XML editor, you create files faster than in txt format and the most important thing is you can check easily most of syntax errors with this XML schema definition (TYP.xsd) file. At least, if you finally don't like XML format, you can easilly export your data in text format with this Extensible Stylesheet Language Transformation (TYP.xsl) file.

For a simple multiplatform customizable XML editor, download Jaxe, place TYP.xsd, TYP.xsl (the 2 previous files above) and this jaxe's configuration file into jaxe/config directory.

For exhaustive formats description, see the manual.

sample1.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<TYP filename="myCustomTyp.TYP">
<FID val="123"/>
<PRODUCT val="1"/>
<CODEPAGE val="1252"/>

<DRAWORDER level="1" hexType="01"/>
<DRAWORDER level="8" hexType="3c"/>
<DRAWORDER level="2" hexType="46"/>
<DRAWORDER level="3" hexType="50"/>

<LINE borderWidth="0" lineWidth="3" hexType="02">
<LABEL id="1" lang="english" string="National primary road"/>
<LABEL id="2" lang="french" string="Route nationale"/>
<COLORSCHEME type="1DN"/>
<PATTERN>
<!--inner and border colors for both day and night displaymode-->
<COLOR key="1" hexValue="009500"/>
<COLOR key="2" hexValue="None"/>
</PATTERN>
</LINE>

<LINE borderWidth="0" lineWidth="3" hexType="03">
<LABEL id="1" lang="english" string="National secondary road"/>
<LABEL id="2" lang="french" string="Route nationale secondaire"/>
<COLORSCHEME type="2D2N"/>
<!--rotation is applied-->
<PATTERN skew="false">
<!--foreground and background colors for day display mode-->
<COLOR key="X" hexValue="009500"/>
<COLOR key="_" hexValue="ffffff"/>
<!--foreground and background colors for night display mode-->
<COLOR key="3" hexValue="006500"/>
<COLOR key="4" hexValue="7f7f7f"/>
<PIXELS height="3" pixelWidth="1" width="32">
<ROW>XXXXXXXX________XXXXXXXX________</ROW>
<ROW>XXXXXXXX________XXXXXXXX________</ROW>
<ROW>XXXXXXXX________XXXXXXXX________</ROW>
</PIXELS>
</PATTERN>
</LINE>

<POLYGON hexType="50">
<LABEL id="1" lang="english" string="Forest"/>
<LABEL id="2" lang="french" string="Forêt"/>
<COLORSCHEME type="1D1N"/>
<PATTERN>
<!--foreground and background colors for day display mode-->
<COLOR key="1" hexValue="00ff00"/>
<COLOR key="2" hexValue="None"/>
<!--foreground and background colors for night display mode-->
<COLOR key="3" hexValue="009500"/>
<COLOR key="4" hexValue="None"/>
<!--forest_pattern.png is a 2 colors image which will be rescaled if needed to 32 x 32 pixels-->
<IMAGE height="32" src="forest_pattern.png" width="32"/>
</PATTERN>
</POLYGON>

<POINT hexType="2c0b">
<!--optional font style element with optional parameters-->
<FONTSTYLE hexDay="ff0000" hexNight="7b0000" size="small"/>
<LABEL id="1" lang="english" string="Antiquity"/>
<LABEL id="2" lang="french" string="Antiquité"/>
<COLORSCHEME type="1D1N"/>
<!--pattern definition for day display mode-->
<PATTERN display="day">
<COLOR key="X" hexValue="ff0000ff"/>
<COLOR key="_" hexValue="00ff0000"/>
<PIXELS height="4" pixelWidth="1" width="4">
<ROW>XXXX</ROW>
<ROW>XXXX</ROW>
<ROW>XXXX</ROW>
<ROW>XXXX</ROW>
</PIXELS>
</PATTERN>
<!--pattern definition for night display mode-->
<PATTERN display="night">
<COLOR key="X" hexValue="7b0000ff"/>
<COLOR key="_" hexValue="00ff0000"/>
<PIXELS height="4" pixelWidth="1" width="4">
<ROW>XXXX</ROW>
<ROW>X__X</ROW>
<ROW>X__X</ROW>
<ROW>XXXX</ROW>
</PIXELS>
</PATTERN>
</POINT>
</TYP>

sample1.txt
[_id]
FID=123
ProductCode=1
codePage=1252
[end]

[_drawOrder]
Type=0x01,1;
Type=0x3c,8;
Type=0x46,2;
Type=0x50,3;
[end]

[_line]
Type=0x02
String1=english,National primary road
String2=french,Route nationale
ColorScheme=1DN
DayXpm="  2 "
DayXpm="0 0 2 0"
"1 c 0x009500"
"2 c None"
[end]

[_line]
Type=0x03
String1=english,National secondary road
String2=french,Route nationale secondaire
ColorScheme=2D2N
DayXpm="32 3 4 1"
"X c 0x009500"
"_ c 0xffffff"
"3 c 0x006500"
"4 c 0x7f7f7f"
"XXXXXXXX________XXXXXXXX________"
"XXXXXXXX________XXXXXXXX________"
"XXXXXXXX________XXXXXXXX________"
[end]

[_polygon]
Type=0x50
String1=english,Forest
String2=french,Forêt
ColorScheme=1D1N
DayXpm="32 32 4 1"
"1 c 0x00ff00"
"2 c None"
"3 c 0x009500"
"4 c None"
image="forest_pattern.png"
[end]

[_point]
Type=0x2c0b
StringStyle=small,day,0xff0000,night,0x7b0000
String1=english,Antiquity
String2=french,Antiquité
ColorScheme=1D1N
DayXpm="4 4 2 1"
"X c 0xff0000ff"
"_ c 0x00ff0000"
"XXXX"
"XXXX"
"XXXX"
"XXXX"
NightXpm="4 4 2 1"
"X c 0x7b0000ff"
"_ c 0x00ff0000"
"XXXX"
"X__X"
"X__X"
"XXXX"
[end]


 





CategoryResource
Some rights reserved
Except where otherwise noted, content on this site is licensed
under a Creative Commons Attribution - Noncommercial - No Derivative Works 3.0 License.