User Tools

Site Tools


doc:project-files-format-legacy

Project file format (legacy)

Documentation | Other Specifications | Project (legacy)

Structure of configuration files (.ttkgp and .ini)

Description

The family of TatukGIS tools share the same method of defining the map appearance using configuration files.

A configuration file is an ini based file. TatukGIS provides two kinds of configuration files:

  • Layer
  • Project

Layer configuration file (layer_path.ini)

Every layer can handle a configuration file which will be called NAME_OF_FILE.EXTENSION.INI (for example STREETS.SHP.INI). Such file can handle all information about parameters, even about parameters corresponding only to a specific scale (zoom). The format of this file is INI file compatible.

Example:

  [TatukGIS Layer]
  AreaColor=red

Project configuration file (.ttkgp)

Project configuration file will keep information about layer paths, names, order, etc. It is very similar to the layer configuration file. Values written to this file will overwrite values from a layer configuration file.

Example:

  [TatukGIS Layer1]
  ; first layer
  Path=c:\\test\\photo.tif
  Name=SatelitePhoto
 
  [TatukGIS Layer2]
  ; second layer
  Path=c:\\test\\street.shp
  Name=Street

Samples

Sample layer configuration file
  [TatukGIS Layer]
  ; this is a general section use common values here
  Visible=False
  LineColor=BLACK
  LineWidth=-2
 
  [TatukGIS Layer 1]
  ; this is a section valid only for selected zooms

  ; those values describing when this section will be valid
  MinZoom=0.123
  MaxZoom=2.13
 
  //override standard values
  Visible=True
  LineColor=YELLOW
 
  [TatukGIS Layer 2]
  MinZoom=2.13
  MaxZoom=999
  Visible=True
  LineColor=YELLOW
  LineWidth=-5
Sample layers configuration file with render support (predefined values)

By attaching a 'render' entry followed by a query, you can turn on/off a section:

  [TatukGIS Layer]
  ; this is a general section use common values here
  Visible=False
  LineColor=BLACK
  LineWidth=-2
 
  [TatukGIS Layer 1]
  MinZoom=2.13
  MaxZoom=999
  Render=population \> 100
  Visible=True
  LineColor=YELLOW
  LineWidth=-5

The first section which meets all criteria will be used. If Render was used, then MinZoom, MaxZoom can be omitted.

Sample layers configuration file with render support (automatic values)

By attaching a 'render' entry followed by a query, you can turn on/off a section:

  [TatukGIS Layer]
  ; area color will me modified based on population field
  AreaColor=RENDER RenderExpression=population

  ; lowest/highest expected values for population
  RenderMinVal=0
  RenderMaxVal=2000000

  ; number of zones; minus because its logarithmic scale will be used
  RenderZones=-10
Sample style names

By attaching style name to a section name we have an option to define special styles (for flushing, etc.).

See: TGIS_LayerVector.DrawScope

  [TatukGIS Layer]
  ; this is a general section use common values here
  Visible=False
  LineColor=BLACK
  LineWidth=-2
 
  [TatukGIS Layer StyleName]
  LineColor=YELLOW
  LineWidth=-15
Sample project configuration file

This is very similar to a layer configuration file. Values written to this file will overwrite values from a layer configuration file.

  [TatukGIS Layer1]
  ; first layer
  Path=c:\\test\\photo.tif
  Name=SatelitePhoto
 
  [TatukGIS Layer2]
  ; second layer
  Path=c:\\test\\street.shp
  Name=Street

  ; layer parameter(s) can be set here or will be read from layer configuration file
  LineColor=YELLOW
 
  [TatukGIS Layer2 1]
  ; and now first zoom dependent value for second layer
  MinZoom=1.23
  MaxZoom=1.99
  Visible=False

Naming convention

Naming convention for configuration files.

Viewer

Main section in .ttkgp (Project file)

[TatukGIS] 

Project

Main layer section in .ttkgp (Project file)

[TatukGIS LayerN] 

Layer

Main layer section in .ttkgp (Project file)

[TatukGIS LayerN] 

Or main layer section in .ini (Configuration file)

[TatukGIS Layer] 

Section

Any layer section in a .ttkgp (Project file) or .ini (Configuration file)

[TatukGIS Layer...] 

String parameters

All string parameters are expected to be in C/C# format:

  • any occurrence of “\” will be converted to “”
  • any occurrence of “n” will be converted to CRLF (new line - code 13+10)
  • if value starts with “@” sign, then “” special treatment will be suspended for the rest of the string

Parameters

There are many parameters that can be set to define custom view of a layer. The parameters are divided into 12 categories:

  • Viewer parameters
    This section includes parameters (used on Viewer, Layer or Section)
  • Common parameters
    This section includes common parameters (used on Viewer, Layer or Section)
  • Section parameters
    This section includes scope, zone parameters (used on Viewer, Layer or Section)
  • Layer parameters
    This section includes parameters (used on Layer)
  • Render parameters
    This section includes render parameters (used on Layer)
  • Area parameters
    This section includes area parameters (used on Layer)
  • Line
    This section includes line parameters (used on Layer)
  • Marker
    This section includes marker parameters (used on Layer)
  • Label
    This section includes label parameters (used on Layer)
  • Chart
    This section includes chart parameters (used on Layer)
  • Pixel
    This section includes pixel parameters (used on Layer)
  • 3D related parameters
    This section includes 3D parameters (used on Layer)
  • Custom data
    This section includes custom (user-defined) parameters (used on Viewer, Layer)
2017/02/11 10:27