Prev Up Top Next Contents
2.A thconfig syntax
The configuration files [ThBook 38] are text files with lines
of comments (begiing with '#'), and lines of commands.
Commands can be one-line or multiline. In this case
there is a termination command, whose name is make by prefixing
"end" to the name of the command.
One-line commands can be continued on more lines by ending the line with
the continuation sequence (backslash followed by newline).
encoding.
It specifies the encoding used for the data.
Examples: UTF-8, ASCII, ISO-8859-1, ...
cs.
This option specifies the output coordinate system.
The following coordinate systems are supported: UTM1 .. UTM60
(denoting the UTM zone, for the WGS84 coordinate system), and
JTSK (czechoslovak system with axes east and north).
Furthermore ESRI (a company that makes GIS and mapping software)
and EPGS (European Petroleum Survey Group)
codes are supported. To find the code number for your data
check the list files in the therion
sources:
extern/proj4/nad/esri
and extern/proj4/nad/epsg
,
respectively. Finally you can use lat-long
and long-lat
coordinate systems, with the data written as
degrees:min:sec (you may omit the seconds, or both
the seconds and the minutes). In this case the datum is WGS84.
The coordinate system can be specified for
centerline
: it applies to the centerline fixed data;
scrap
: to refer local scrap coordinate to a coordinate system;
for importing sketches without stations;
surface
: it defines the coordinate system of the surface bitmap
calibration and origin placing;
import
: when you import external data, for fixed stations;
layout
; for the layout origin
(atlas) and grid-origin
;
- the output coordinate system, in the configuration file,
cs
command.
If not specified the local coordinate system is assumed.
source.
It is used to list a data file that must be processed by
therion
.
This can be either a one-line command or a multiline command.
In the first form is used to input a therion file,
source file.th
The second form is used to write therion commands directly in the
configuration file and is convenient when the commands are just a few,
to avoid proliferation of small files.
input.
It is used to include a file, just like the C-preprocessor
"#include" directive.
It cannot be used inside a block layout
-endlayout
.
setup3d.
It is used to specify the three dimensions
- {3dSMP}
- {3dWALLSMP}
- {3dMAXDIMD}
These are used by scrapis (the polygonal line) class
to create the envelope of the cave for the 3D visualization.
select.
This command selects an object (either a
survey or a
map)
to export in the outputs. The selection rules allows to organize
maps and scraps with versatility [thbook 38].
- By default, if there is no "select" command with a survey
all the surveys are selected for export.
- If only surveys are selected, and there is no "select"
command for a map, all the maps of the selected surveys are exported.
- if surveys are selected and there is no
map
definition in
the selected surveys, all the centerlines of the selected surveys
are exported.
- if there are selected maps, they are exported.
The "select" command has options,
- recursive, it applyes to a survey "select":
it states that all the subsurveys of the survey are selected,
recursively.
- map-level N, it applies only to a map "select":
it states the level at which to stop the export of the map
when generating the pdf.
- chapter-level N, it applies only to a map "select":
it states the chapter-level at which to stop the export of the map
when generating an atlas.
unselect.
Is the opposite of select.
It is used when you want to include an object in an export,
and not to include it in the following exports. You put a
"unselect" of that object between the export commands.
layout.
It specifies a set of 2D layout options.
It takes, as argument the id (name) of the layout, that must be used
in the followigto refer to it.
It has several options. Among them:
- copy Layout_id copies the options of another layout into this;
- scale from to defines the output scale. For example "scale 1 500".
The default is 1:200.
- base-scale from to rescales the output by a factor
scale/base_scale;
- units has argument "metric" (default) or "imperial";
- rotate degrees, rotate the drawing in the output.
For example
-layout-rotate 20
rotates the map by 20 degrees
clockwise.
- north specifies the north of the map. It can be either
"true" (geographic north) or "grid".
The north arrow displayed by therion always points to the
true (astronomical) north. The crosses of the grid are aligned to the
grid north (which depends on the coordinate system).
The magnetic north is not displayed at all.
If you select "north grid" the grid crosses are aligned to the left/right
margins of the paper, and the north arrow can be slightly rotated.
With "north true" the north arrow is vertical and the grid can be
slightly tilted.
- symbol-set set specifies the set of symbols to use:
UIS (Union Internatinale de Speleologie),
ASF (Australian Speleological Federation),
CCNP (Carlsbad Caverns National Park) or
SKBB (Speleoklub Banska Bystrica); for example "symbol-set UIS".
At the moment the symbols do not differ that much.
- symbol-hide specifies symbols or group of symbols that must not
be drawn. Examples:
"symbol-hide point station" hides the cross '+' marks at the stations,
"symbol-hide group centerline" hides also the little segments aligned to the
shots at the stations.
There is also symbol-show.
- size width height units specifies the dimension (for the maps
the option page-grid must be "on"). Example:
"size 18 22.2 cm".
- overlap value units
specifies the amount of overlapping border (for map and atlas).
For example a
-layout-overlap 2 cm
in a map tells therion to leave
a 2 cm border around the map.
- grid has argument "off" (default), "top" or "bottom"
- grid-origin specifies the coordinates of the grid origin.
Example: "grid-origin 0 0 1875 m", assuming that the entrance altitude
is 1875 m, sets the altitude values for the
altitude
points.
Having set the entrance (grid origin) altitude, when you specify
an "altitude" for a point of a wall line (with the line-point option
"altitude .") the value of the altitude is computed and printed on the
map.
- grid-size defines the grid spacing (default 10 m).
Example: "grid-size 50 m"
- the color (or colour) command specifies how to colour an item.
Possible items are "map-fg", "map-bg" (map foreground and background
respectively) and "preview-above" "preview-below" (foreground of the
"preview above" and "below" map items, respectively). The color can be
a shde of grey, specified by a single number between 0 (black) and 100
(white), or a RGB triplet, specified by three numbers between 0 and 100
enclosed in square brakets.
For example "[100 0 0]" is red.
Special colors are "altitude", "scrap" and "map" (plurals are acceptable).
- transparency has argument "on" or "off", and defines
whether the cave passages that lye below must be visible (the default
is "on", and should be used with the option opacity)
- opacity defines the opacity value, between 0 and 100,
of the passages underlying. A value of 0 means transparent,
a value of 100 means fully opaque; the default is 70.
- surface-opacity specifies the opacity of the surface bitmap,
if the "transparency" is on.
The following options apply only to atlases:
- page-setup defines the size of the page.
It has arguments the numerical value and the units. For example,
"page-setup 29.7 cm"
- page-numbers has argument "on" (default) or "off"
- exclude-pages has argument "on" or "off", and the list
of the page-numbers to exclude (page-numbers start at 1).
For example, "exclude-pages on 2,3,6-8,19"
- title-page has argument "on" (default) or "off".
It refers to the title pages in front of the chapters.
- nav-factor defines the zoom factor of the navigation grid.
The default is 30.
- page-grid refers to the map atlas page grid.
It can be "on" or "off".
Legend options:
- legend has argument "off", "on" or "all"
- scale-bar. For example "scale-bar 10 m".
The grid step is adjusted to the scale-bar if it is not specified
with the option grid-size.
- map-header has three arguments: X, Y, and one among "off", "center", "n",
"e", ..., "sw". For instance, "map-header 0 0 n"
- statistics adds some statistics.
It it has argument "explo-length" or "topo-length", it can have value
"on" or "off". The first states to write the statistics, the second
not to write them. When it has argument "explo", "topo", "carto" or
"copyright" the value can be "all" (it writes all the names),
"off" (it does not write anything), or a number N (it writes the
first N names).
- language has argument the language to use in the output.
- map-comment is followed by the string of the comment
you want to include on the output. The comment is placed between the
drawing and the legend.
- debug can be "on", "all", "first", "second", "scrap-names"
or "off"
Finally there are PDF specific options.
Their name is rather self-explaining. They assign values to
properties of the PDF document, and are followed by the string
value (enclosed in double quote marks if it contains spaces).
- doc-author
- doc-keyword
- doc-subject
- doc-title
export.
It defines a output that must be created.
It has argument the output type, "map", "atlas", "model", "database",
"continuation-list", "survey-list", "cave-list", or "bbox".
Among the options there are,
- output specifies the name of the output (file).
By default this is "cave.XXX" where the extension "XXX" varies
according to the format of the output.
- fmt specifies the format of the output. The possible formats
depend on the type of the output:
- maps can be "pdf", "svg", "xvi".
- atlases are only "pdf"
- models can be "loch" (native format, the default), "compass" (plt),
"survex" (3d), "dxf", "esri", "vrml", "3dmf", and "kml" (Google Earth)
- databases are only "sql"
- lists are exported as "txt" (text), "html" (default), and "dbf"
- enable and disable, (only for models) select which elements to
export in the output: "wall", "centerline", "surface", "all";
- projection ID (for maps and atlases) specifies the type of the
projection, as for the scraps. It can be "none" (cross-sections),
"plan" (horizontal projection), "elevation" (vertical projection,
possibly with the projection direction in degrees), and "extended".
- layout ID (for maps and atlases)
includes a previously defined layout.
It is possible to define also layout options by preceeding them with the
prefix "layout-".
- encoding (for databases) specifies the output encoding.
- the continuation lists can have the user defined attributes
(option "attributes on/off") and be filtered depending on the presence
of a comment text (option "filter on/off").
- the cave lists can have the cave coordinates (option "location on/off"),
and contain also the surveys with their statistics (option "surveys on/off")
sketch-warp.
It is used to select the sketch warping algorithm. It takes only one
value, the algorithm name. This can be one of "line" (the default
algorithm), "point", "linear" and "plaquette".
system.
This command allows to execute an external program during therion
compilation. The syntax is "command &" on Linux, and
"start command" on Windows.
2.A.1 The examples
therion users - Tue Sep 20 16:49:29 2011
Prev Up Top Next Contents
This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 License.