Survex data files

Survey data is entered in the form of text files. You can use any text editor you like for this, so long as it has the capability of writing a plain ASCII text file. The data format is very flexible; unlike some other cave surveying software, Survex does not require survey legs to be rearranged to suit the computer, and the ordering of instrument readings on each line is fully specifiable. So you can enter your data much as it appears on the survey notes, which is important in reducing the opportunities for transcription errors.

Also all the special characters are user-definable - for example, the separators can be spaces and tabs, or commas (e.g. when exporting from a spreadsheet), etc; the decimal point can be a slash (for clarity), a comma (as used in continental Europe), or anything else you care to choose. This flexibility means that it should be possible to read in data from almost any sort of survey data file without much work.

Survex places no restrictions on you in terms of the ordering of survey legs. You can enter or process data in any order and Survex will read it all in before determining how it is connected. You can also use the hierarchical naming so that you do not need to worry about using the same station name twice.

The usual arrangement is to have one file which lists all the others that are included (e.g., 161.svx). Then cavern 161 will process all your data. To just process a section use the filename for that section, e.g. cavern dtime will process the dreamtime file/section of Kaninchenhöhle. To help you out, if all legs in a survey are connected to one another but the survey has no fixed points, cavern will 'invent' a fixed point and print a warning message to this effect.

It is up to you what data you put in which files. You can have one file per trip, or per area of the cave, or just one file for the whole cave if you like. On a large survey project it makes sense to group related surveys in the same file or directory.

Readings

Blank lines (i.e. lines consisting solely of BLANK characters) are ignored. The last line in the file need not be terminated by an end of line character. All fields on a line must be separated by at least one BLANK character. An OMIT character (default '-') indicates that a field is unused. If the field is not optional, then an error is given.

Survey Station Names

Survex has a powerful system for naming stations. It uses a hierarchy of survey names, similar to the nested folders your computer stores files in. So point 6 in the entrance survey of Kaninchenhöhle (cave number 161) is referred to as: 161.entrance.6

This seems a natural way to refer to station names. It also means that it is very easy to include more levels, for example if you want to plot all the caves in the area you just list them all in another file, specifying a new prefix. So to group 3 nearby caves on the Loser Plateau you would use a file like this:

*begin Loser
*include 161
*include 2YrGest
*include 145
*end Loser

The entrance series point mentioned above would now be referred to as: Loser.161.entrance.6

You do not have to use this system at all, and can just give all stations unique identifiers if you like:

1, 2, 3, 4, 5, ... 1381, 1382

or

AA06, AA07, P34, ZZ6, etc.

Station and survey names may contain any alphanumeric characters and additionally any characters in NAMES (default `_' and `-'). Alphabetic characters may be forced to upper or lower case by using the *case command. Station names may be any length - if you want to only treat the first few characters as significant you can get cavern to truncate the names using the *truncate command.

Numeric fields

[<MINUS>|<PLUS>] <integer part> [ <DECIMAL> [ <decimal fraction> ] ]

or [<MINUS>|<PLUS>] <DECIMAL> <dec fraction>

i.e. optional PLUS or MINUS sign in front, with optional DECIMAL character (default '.'), which may be embedded, leading or trailing. No spaces are allowed between the various elements.

All of these are valid examples: +47, 23, -22, +4.5, 1.3, -0.7, +.15, .4, -.05

Accuracy

Accuracy assessments may be provided or defaulted for any survey leg. These determine the distribution of loop closure errors over the legs in the loop. See *SD for more information.

Cavern Commands

Commands in .svx files are introduced by an asterisk (by default - this can be changed using the set command).

The commands are documented in a common format:

BEGIN

Syntax

*begin [<survey>]

Example

*begin littlebit
1 2 10.23 106 -02
2 3  1.56 092 +10
*end littlebit
; length of leg across shaft estimated
*begin
*sd tape 2 metres
9 10 6.   031 -07
*end

Description

*begin stores the current values of the current settings such as instrument calibration, data format, and so on. These stored values are restored after the corresponding *end. If a survey name is given, this is used inside the *begin/*end block, and the corresponding *end should have the same survey name. *begin/*end blocks may be nested to indefinite depth.

See Also

*end, *prefix

CALIBRATE

Syntax

*calibrate <quantity list> <zero error> [<scale>]

*calibrate default

Example

*calibrate tape +0.3

Description

*calibrate is used to specify instrument calibrations.

<quantity> is one of TAPE|COMPASS|CLINO|COUNTER|DEPTH|DECLINATION|X|Y|Z

Several quantities can be given in <quantity list>

Value = ( Reading - ZeroError ) * Scale (Scale defaults to 1.0)

You need to be careful about the sign of the ZeroError. The value of ZeroError is what the the instrument would read when measuring a reading which should be zero. So for example, if your tape measure has the end missing, and you are using the 30cm mark to take all measurements from, then a zero distance would be measured as 30cm and you would correct this with:

*CALIBRATE tape +0.3

If you tape was too long, starting at -20cm (it does happen!) then you can correct it with:

*CALIBRATE tape -0.2

Note: ZeroError is irrelevant for Topofil counters and depth gauges since pairs of readings are subtracted.

The magnetic deviation varies from year to year and it is often desirable to keep the compass zero error and the magnetic deviation separate. cavern calculates the true bearing as follows:

(magnetic bearing) = ((reading)-(compass zero err)) * (compass scale factor)

(true bearing) = ((bearing)-(declination zero err))

The scale factor for DECLINATION must be 1.0, otherwise an error is given.

The default is all quantities calibrated to scale factor 1.0, zero error 0.0

See Also

*units

CASE

Syntax

*case preserve|toupper|tolower

Example

*begin bobsbit
; Bob insists on using case sensitive station names
*case preserve
1 2   10.23 106 -02
2 2a   1.56 092 +10
2 2A   3.12 034 +02
2 3    8.64 239 -01
*end bobsbit

Description

*case determines how the case of letters in survey names is handled. By default all names are forced to lower case (which gives a case insensitive match, but you can tell cavern to force to upper case, or leave the case as is (in which case '2a' and '2A' will be regarded as different).

COPYRIGHT

Syntax

*copyright <date> <text>

Example

*begin littlebit
*copyright 1983 CUCC
1 2 10.23 106 -02
2 3  1.56 092 +10
*end littlebit

Validity

valid at the start of a *begin/*end block.

Description

*copyright allow the copyright information to be stored in a way that can be automatically collated.

See Also

*begin

DATA

Syntax

*data <style> <ordering>

Example

*data normal from to compass tape clino

*data normal station ignoreall newline compass tape clino

Description

<style> = DEFAULT|NORMAL|DIVING|CARTESIAN|TOPOFIL|CYLPOLAR|NOSURVEY

<ordering> = ordered list of instruments - which are valid depends on the style.

In Survex 1.0.2 and later, TOPOFIL is simply a synonym for NORMAL, left in to allow older data to be processed without modification. Use the name NORMAL by preference.

There are two variants of each style - interleaved and non-interleaved. Non-interleaved is "one line per leg", interleaved has a line for the data shared between two legs (e.g. STATION=FROM/TO, DEPTH=FROMDEPTH/TODEPTH, COUNT=FROMCOUNT/TOCOUNT). Note that not all interleavable readings have to be interleaved - for example:

*data diving station newline fromdepth compass tape todepth
In addition, interleaved data can have a DIRECTION reading, which can be "F" for a foresight or "B" for a backsight.

In NORMAL, DIVING, and CYLPOLAR data styles, TAPE may be replaced by FROMCOUNT/TOCOUNT (or COUNT in interleaved data) to allow processing of surveys performed with a Topofil instead of a tape.

DEFAULT

Select the default data style and ordering (NORMAL style, ordering: from to tape compass clino).

NORMAL

The usual tape/compass/clino centreline survey. For non-interleaved data the allowed readings are: FROM TO TAPE COMPASS CLINO BACKCOMPASS BACKCLINO; for interleaved data the allowed readings are: STATION DIRECTION TAPE COMPASS CLINO BACKCOMPASS BACKCLINO. The CLINO/BACKCLINO reading is not required - if it's not given, the vertical standard deviation is taken to be proportional to the tape measurement. Alternatively, individual clino readings can be given as OMIT (default "-") which allows for data where only some clino readings are missing. E.g.:

*data normal from to compass clino tape
1 2 172 -03 12.61
*data normal station newline direction tape compass clino
1
 F 12.61 172 -03
2
*data normal from to compass clino fromcount tocount
1 2 172 -03 11532 11873
*data normal station count newline direction compass clino
1 11532
 F 172 -03
2 11873

DIVING

An underwater survey where the vertical information is from a diver's depth gauge. This style can also be also used for an above water where the alititude is measured with an altimeter. DEPTH is defined as the altitude (Z) so increases upwards by default. So for a diver's depth guage, you'll need to use *CALIBRATE with a negative scale factor (e.g. *calibrate depth 0 -1).

For non-interleaved data the allowed readings are: FROM TO TAPE COMPASS BACKCOMPASS FROMDEPTH TODEPTH DEPTHCHANGE (the vertical can be given as readings at each station, (FROMDEPTH/TODEPTH) or as a change along the leg (DEPTHCHANGE)).

For interleaved data the allowed readings are: STATION DIRECTION TAPE COMPASS BACKCOMPASS DEPTH DEPTHCHANGE. (the vertical change can be given as a reading at the station (DEPTH) or as a change along the leg (DEPTHCHANGE)).

*data diving from to tape compass fromdepth todepth
1 2 14.7 250 -20.7 -22.4
*data diving station depth newline tape compass
1 -20.7
 14.7 250
2 -22.4
*data diving from to tape compass depthchange
1 2 14.7 250 -1.7

CARTESIAN

Cartesian data style allows you to specify the (x,y,z) changes between stations. It's useful for digitising surveys where the original survey data has been lost and all that's available is a drawn up version.

*data cartesian from to northing easting altitude
1 2 16.1 20.4 8.7
*data cartesian station newline northing easting altitude
1
 16.1 20.4 8.7
2

Note

Cartesian data are relative to true North not magnetic North (i.e. they are unaffected by *calibrate declination).

CYLPOLAR

A CYLPOLAR style survey is very similar to a diving survey, except that the tape is always measured horizontally rather than along the slope of the leg.

*data cypolar from to tape compass fromdepth todepth
1 2 9.45 311 -13.3 -19.0
*data cylpolar station depth newline tape compass
1 -13.3
 9.45 311
2 -19.0
*data cylpolar from to tape compass depthchange
1 2 9.45 311 -5.7

NOSURVEY

A NOSURVEY survey doesn't have any measurements - it merely indicates that there is line of sight between the pairs of stations.

*data nosurvey from to
1 7
5 7
9 11
*data nosurvey station
1
7
5

*data nosurvey station
9
11

IGNORE skips a field (it may be used any number of times), and IGNOREALL may be used last to ignore the rest of the data line.

LENGTH is a synonym for TAPE; BEARING for COMPASS; GRADIENT for CLINO; COUNT for COUNTER.

The units of each quantity may be set with the UNITS command.

DATE

Syntax

*date <year>[.<month>[.<day>]][-<year>[.<month>[.<day>]]]

Example

*date 2001
*date 2000.10
*date 1987.07.27
*date 1985.08.12-1985.08.13

Validity

valid at the start of a *begin/*end block.

Description

*date specifies the date that the survey was done. A range of dates can be specified (useful for overnight or multi-day surveying trips).

See Also

*begin, *instrument, *team

DEFAULT

Syntax

*default <settings list>|all

Description

The valid settings are CALIBRATE, DATA, and UNITS.

*default restores defaults for given settings. This command is deprecated - you should instead use: *calibrate default, *data default, *units default.

See Also

*calibrate, *data, *units

END

Syntax

*end [<survey>]

Validity

valid for closing a block started by *begin in the same file.

Description

Closes a block started by *begin.

See Also

*begin

ENTRANCE

Syntax

*entrance <station>

Example

*entrance P163

Description

*entrance sets the entrance flag for a station. This information is used by aven to allow entrances to be highlighted.

EQUATE

Syntax

*equate <station> <station>...

Example

*equate chosspot.1 triassic.27

Description

*equate specifies that the station names in the list refer to the same physical survey station. An error is given if there is only one station listed.

See Also

*infer equates

EXPORT

Syntax

*export <station>...

Example

*export 1 6 17

Validity

valid at the start of a *begin/*end block.

Description

*export marks the stations named as referable to from the enclosing survey. To be able to refer to a station from a survey several levels above, it must be exported from each enclosing survey.

See Also

*begin, *infer exports

FIX

Syntax

*fix <station> [reference] [ <x> <y> <z> [ <x std err> <y std err> <z std err> [ <cov(x,y)> <cov(y,z)> <cov(z,x)> ] ] ]

Example

*fix entrance.0 32768 86723 1760
*fix KT114_96 reference 36670.37 83317.43 1903.97

Description

*fix fixes the position of <station> at the given coordinates. If the position is omitted it defaults to (0,0,0). The standard errors default to zero (fix station exactly). cavern will give an error if you attempt to fix the same survey station twice at different coordinates, or a warning if you fix it twice with matching coordinates.

You can also specify just one standard error (in which case it is assumed equal in X, Y, and Z) or two (in which case the first is taken as the standard error in X and Y, and the second as the standard error in Z).

If you have covariances for the fix, you can also specify these - the order is cov(x,y) cov(y,z) cov(z,x).

You can fix as many stations as you like - just use a *fix command for each one. Cavern will check that all stations are connected to at least one fixed point so that co-ordinates can be calculated for all stations.

By default cavern will warn about stations which have been FIX-ed but not used otherwise. This is unhelpful if you want to include a standard file of benchmarks, some of which won't be used. In this sort of situation, specify "REFERENCE" after the station name in the FIX command to suppress this warning for a particular station.

Note

X is Easting, Y is Northing, and Z is altitude. This convention was chosen since on a map, the horizontal (X) axis is usually East, and the vertical axis (Y) North. The choice of altitude (rather than depth) for Z is taken from surface maps, and makes for less confusion when dealing with cave systems with more than one entrance. It also gives a right-handed set of axes.

FLAGS

Syntax

*flags <flags>

Example

*flags duplicate not surface

Description

*flags updates the current flag settings. Flags not mentioned retain their previous state. Valid flags are DUPLICATE, SPLAY, and SURFACE, and a flag may be preceded with NOT to turn it off.

Survey legs marked SURFACE are hidden from plots by default, and not included in cave survey length calculations. Survey legs marked as DUPLICATE or SPLAY are also not included in cave survey length calculations; legs marked SPLAY are ignored by the extend program. DUPLICATE is intended for the case when if you have two different surveys along the same section of passage (for example to tie two surveys into a permanent survey station); SPLAY is intended for cases such as radial legs in a large chamber.

See Also

*begin

INCLUDE

Syntax

*include <filename>

Example

*include mission
*include "the pits"

Description

*include processes <filename> as if it were inserted at this place in the current file. (i.e. The current settings are carried into <filename>, and any alterations to settings in <filename> will be carried back again). There's one exception to this (for obscure historical reasons) which is that the survey prefix is restored upon return to the original file. Since *begin and *end nesting cannot cross files, this can only make a difference if you use the deprecated *prefix command.

If <filename> contains spaces, it must be enclosed in quotes.

An included file which does not have a complete path is resolved relative to the directory which the parent file is in (just as relative HTML links do). Cavern will try adding a .svx extension, and will also try translating "\" to "/" (or other appropriate tricks on RISC OS). And as a last resort, it will try a lower case version of the filename (so if you use Unix and someone sends you a DOS/Windows dataset with mismatched case, unzip it with "unzip -L" and unix cavern will process it).

The depth to which you can nest include files may be limited by the operating system you use. Usually the limit is fairly high (>30), but if you want to be able to process your dataset with Survex on any supported platform, it would be prudent not to go overboard with nested include files.

INFER

Syntax

*infer plumbs on|off

*infer equates on|off

*infer exports on|off

Description

"*infer plumbs on" tells cavern to interpret gradients of +/- 90 degrees as UP/DOWN (so it will not apply the clino correction to them). This is useful when the data has not been converted to have UP and DOWN in it.

"*infer equates on" tells cavern to interpret a leg with a tape reading of zero as a *equate. this prevents tape corrections being applied to them.

"*infer exports on" is necessary when you have a dataset which is partly annotated with *export. It tells cavern not to complain about missing *export commands in part of the dataset. Also stations which were used to join surveys are marked as exported in the 3d file.

INSTRUMENT

Syntax

*instrument <instrument> <identifier>

Example

*instrument compass "CUCC 2"
*instrument clino "CUCC 2"
*instrument tape "CUCC Fisco Ranger open reel"

Validity

valid at the start of a *begin/*end block.

Description

*instrument specifies the particular instruments used to perform a survey.

See Also

*begin, *date, *team

PREFIX

Syntax

*prefix <survey>

Example

*prefix flapjack

Description

*prefix sets the current survey.

Caveats

*prefix is deprecated - you should use *begin and *end instead.

See Also

*begin, *end

REQUIRE

Syntax

*require <version>

Example

*require 0.98

Description

*require checks that the version of cavern in use is at least <version> and stops with an error if not. So if your dataset requires a feature introduced in a particular version, you can add a *require command and users will know what version they need to upgrade to, rather than getting an error message and having to guess what the real problem is.

SD

Syntax

*sd <quantity list> <standard deviation>

Example

*sd tape 0.15 metres

Description

*sd sets the standard deviation of a measurement.

<quantity> is one of TAPE|COMPASS|CLINO|COUNTER|DEPTH|DECLINATION|DX|DY|DZ

<standard deviation> must include units and thus is typically "0.05 metres", or "0.02 degrees". See *units below for full list of valid units.

To utilise this command fully you need to understand what a standard deviation is. It gives a value to the 'spread' of the errors in a measurement. Assuming that these are normally distributed we can say that 95.44% of the actual lengths will fall within two standard deviations of the measured length. i.e. a tape SD of 0.25 metres means that the actual length of a tape measurement is within + or - 0.5 metres of the recorded value 95.44% of the time. So if the measurement is 7.34m then the actual length is very likely to be between 6.84m and 7.84m. This example corresponds to BCRA grade 3. Note that this is just one interpretation of the BCRA standard, taking the permitted error values as 2SD 95.44% confidence limits. If you want to take the readings as being some other limit (e.g. 1SD = 68.26%) then you will need to change the BCRA3 and BCRA5 files accordingly. This issue is explored in more detail in various surveying articles.

See Also

*units

SET

Syntax

*set <item> <character list>

Example

*set blank x09x20
*set decimal ,
Note that you need to eliminate comma from being a blank before setting it as a decimal - otherwise the comma in "*set decimal ," is parsed as a blank, and you set decimal to not have any characters representing it.

Description

*set sets the specified <item> to the character or characters given in <character list>. The example sets the decimal separator to be a comma.

xAB means the character with hex value AB. Eg x20 is a space.

The complete list of items that can be set, the defaults (in brackets), and the meaning of the item, is:

  • BLANK (x09x20,) Separates fields

  • COMMENT (;) Introduces comments

  • DECIMAL (.) Decimal point character

  • EOL (x0Ax0D) End of line character

  • KEYWORD (*) Introduces keywords

  • MINUS (-) Indicates negative number

  • NAMES (_-) Non-alphanumeric chars permitted in station names (letters and numbers are always permitted).

  • OMIT (-) Contents of field omitted (e.g. in plumbed legs)

  • PLUS (+) Indicates positive number

  • ROOT (\) Prefix in force at start of current file (use of ROOT is deprecated)

  • SEPARATOR (.) Level separator in prefix hierarchy

The special characters may not be alphanumeric.

SOLVE

Syntax

*solve

Example

*include 1997data
*solve
*include 1998data

Description

Distributes misclosures around any loops in the survey and fixes the positions of all existing stations. This command is intended for situations where you have some new surveys adding extensions to an already drawn-up survey which you wish to avoid completely redrawing. You can read in the old data, use *SOLVE to fix it, and then read in the new data. Then old stations will be in the same positions as they are in the existing drawn up survey, even if new loops have been formed by the extensions.

TEAM

Syntax

*team <person> <role>...

Example

*team "Nick Proctor" compass clino tape
*team "Anthony Day" notes pictures tape

Validity

valid at the start of a *begin/*end block.

Description

*team specifies the people involved in a survey and what role they filled during that trip.

See Also

*begin, *date, *instrument

TITLE

Syntax

*title <title>

Example
*title Dreamtime
*title "Mission Impossible"
Description

*title allows you to set the descriptive title for a survey. If the title contains spaces, you need to enclose it in quotes (""). If there is no *title command, the title defaults to the survey name given in the *begin command.

TRUNCATE

Syntax

*truncate <length>|off

Description

Station names may be of any length in Survex, but some other (mostly older) cave surveying software only regard the first few characters of a name as significant (e.g. "entran" and "entrance" might be treated as the same). To facilitate using data imported from such a package Survex allows you to truncate names to whatever length you want (but by default truncation is off).

Figures for the number of characters which are significant in various software packages: Compass currently has a limit of 12, CMAP has a limit of 6, Surveyor87/8 used 8. Survex itself used 8 per prefix level up to version 0.41, and 12 per prefix level up to 0.73 (more recent versions removed this rather archaic restriction).

UNITS

Syntax

*units <quantity list> [<factor>] <unit>

*units default

Example

*units tape metres
*units compass backcompass clino backclino grads
*units dx dy dz 1000 metres ; data given as kilometres

Description

<quantity> is one of TAPE|LENGTH|COMPASS|BEARING|CLINO|GRADIENT|COUNTER|DEPTH|DECLINATION|X|Y|Z

Changes current units of all the quantities listed to [<factor>] <unit>. Note that quantities can be expressed either as the instrument (e.g. COMPASS) or the measurement (e.g. BEARING).

<factor> allows you to easy specify situations such as measuring distance with a diving line knotted every 10cm (*units distance 0.1 metres). If <factor> is omitted it defaults to 1.0. If specified, it must be non-zero.

Valid units for listed quantities are:

TAPE, LENGTH, COUNTER, COUNT, DEPTH, dX, dY, dZ in YARDS|FEET|METRIC|METRES|METERS

CLINO, BACKCLINO, GRADIENT, BACKGRADIENT in DEG|DEGREES|GRADS|MILS|PERCENT|PERCENTAGE

COMPASS, BACKCOMPASS, BEARING, BACKBEARING, DECLINATION in DEG|DEGREES|GRADS|MILS|MINUTES

(360 degrees = 400 grads (also known as Mils))

Defaults are: Metres, Degrees, Degrees respectively.

See Also

*calibrate