A walk through tunnel - Survex data file syntax

From Fs_wiki

Jump to: navigation, search


This section summarizes the synatx of survex datafile. See {Tu06b} for more details.

Survex datafiles are text files with command lines and datalines. A command line begins with a keyword, a word which starts with an asterisk "*". The data lines are used for the survey data. There can be comments: everything on the line following a semicolon ";" is treated as a comment. Furthermore extra data on a data line are ignored.

Station names are referred in a namespace in which the left entry is the most general, and the right entry is the name of the station. For example, lost_cave.main_passage.14 is the full name of the station 14 in the survey main_passage of the cave lost_cave.

A survex datafile starts with a "*begin survey_name" command and ends with a "*end survey_name" command. Both commands take the name of the survey, which must be the same.


The "*data" command specifies the order of the survey data on the data lines that follow. For example, *data normal from to length clino compass states that the data have normal style, and you have to insert the following data: from_station, to_station, distance, inclination, and compass measurements. A data line following it might look like 1 2 4.30 17 217.

The "*entrance station_id" command states that a station is an entrance: for example *entrance 1 states that station 1 is a cave entrance.

The command "*equate station1 station2" defines the equivalence of two stations (possibly from different surveys). For example *equate 1 main_passage.14 defines that the station \it{14} of the main_passages coincides with the station 1 of the current survey.

A datafile can include other survex datafiles, with the command "*include datafile".

The command "*export station_id ..." lists the stations referable from other surveys. For example, survey main_passage should have the command *export 14 to make the station 14' referable in an "*equate" command of another survey. Or the global datafile can have the command "*export main_passage.14" before (or after?) including the datafile of the main_passage.

The command "*fix station_id X Y Z" specifies the coordinates of a station.

The command "*units measure [factor] unit" specifies the units used for a measure. For example, *units length 0.01 meter states that lengths are expressed in units of centimeters (0.01 m).

The command "*team person role(s)" list a surveyor team member and its role(s).

Here is a simple example, the complete file is included in the archive of sample data files data.tgz:

    *begin gm-01
    *export 24

    *units length metres
    *title "Grazie Mille"
    *team "..." compass clino

    *entrance 1

    *data normal from to length clino compass
    1 2    5.70   -52   190
    2 3    6.50   -50   205
    3 4    2.80   -90     0
    4 5    3.65   -50   193
    5 6    4.35   -33   228
    ...
    *end gm-01

Prev Up Next