User Tools

Site Tools


doc:project-files-format-xml

Project file format (XML)

Documentation | Other Specifications | Project file format (xml)

The Developer Kernel introduced a new, XML-based project file. The old project file format can still be used, although the XML format is recommended for new development. Be aware, that only new format fully support new DK11-introduced features. Upon saving legacy format, new features will not be saved at all or will be saved in a “compatibility mode”.

Basic information about new format can be found at TGIS_ConfigXml class.

This document is under active editing. The content below this line can be inaccurate or incomplete.

General files structure

New project and layer styles format is based on an XML with the general structure of:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TatukGIS>
</TatukGIS>

Project configuration file

A general structure of a project file (.ttkproject) is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TatukGIS>
  <Viewer> 
  </Viewer>
  <Layers>
    <Layer>
    </Layer>
    <Layer>
    </Layer>
  </Layers>
  <Hierarchy>
  </Hierarchy>
</TatukGIS>

Where:

  • <Viewer></Viewer>
    contains viewer specific parameters like coordinata system, visible extent, etc.
  • <Layers></Layers>
    contains list of layers and their specification.
  • <Layer></Layer>
    contains definition of layer path, name, visual styles, visibility, etc.
  • <Hierarchy></Hierarchy>
    contains definition of layers hierarchy.

Read more:

Layer style file

A general structure of a layer style file (.ttkstyle) is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TatukGIS>
  <Layer>
  </Layer>
</TatukGIS>

Where:

  • <Layer></Layer>
    contains defintion of layer visual styles, visibility, etc.

Read more:

Warning! Format modified in v11.8.0. Files .ttkstyle written in versions before 11.8.0 should be modified manually to match current specification.

Sample files

Project configuration file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TatukGIS>
  <Viewer>
    <VisibleExtent>
      <XMin>13.5683080162247</XMin>
      <XMax>24.6619641937987</XMax>
      <YMin>46.38677912557</YMin>
      <YMax>57.480435303144</YMax>
    </VisibleExtent>
    <CS>
      <EPSG>4326</EPSG>
    </CS>
  </Viewer>
  <Layers>
    <Layer Name="Country area" Path="country.shp">
      <Sections>
        <Section>
          <Visible>YES</Visible>
          <Ground>OnDem</Ground>
          <Line>
            <OutlineWidth>SIZE:0 twips</OutlineWidth>
          </Line>
          <Area>
            <Color>ARGB:FFF7EFEF</Color>
            <OutlineWidth>SIZE:24 twips</OutlineWidth>
            <SmartSize>SIZE:16 twips</SmartSize>
            <ShowLegend>YES</ShowLegend>
          </Area>
          <Active>YES</Active>
          <Caption>Country area</Caption>
          <CodePage>1250</CodePage>
          <CS>
            <EPSG>4326</EPSG>
          </CS>
          <IgnoreShapeParams>YES</IgnoreShapeParams>
        </Section>
      </Sections>
    </Layer>
  </Layers>
  <Hierarchy>
    <Groups>
      <Group Name="Group1" Caption="Poland" Collapsed="False" Active="True">
        <Group Name="Group5" Caption="Borders" Collapsed="False" Active="True">
          <Layers>
            <Layer Name="Country area"/>
          </Layers>
        </Group>
      </Group>
    </Groups>
  </Hierarchy>
</TatukGIS>

Layer configuration file

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TatukGIS>
  <Layer>
    <Sections>
      <Section>
        <Visible>YES</Visible>
        <Ground>OnDem</Ground>
        <Line>
          <OutlineWidth>SIZE:0 twips</OutlineWidth>
        </Line>
        <Area>
          <Color>ARGB:FFF7EFEF</Color>
          <OutlineWidth>SIZE:24 twips</OutlineWidth>
          <SmartSize>SIZE:16 twips</SmartSize>
          <ShowLegend>YES</ShowLegend>
        </Area>
        <Active>YES</Active>
        <Caption>Country area</Caption>
        <CodePage>1250</CodePage>
        <CS>
          <EPSG>4326</EPSG>
        </CS>
        <IgnoreShapeParams>YES</IgnoreShapeParams>
      </Section>
    </Sections>
  </Layer>
</TatukGIS>
2018/08/06 15:34