Total Open Station

Total Open Station (TOPS for friends) is a free software program for downloading and processing data from total station devices.

This is a task which is usually done by proprietary, dedicated and Windows™-only software, but TOPS is different by nature, because:

  • it is free software released under the GNU GPLv3 license;
  • it works on any operating system;
  • it is designed to support as many devices and formats as possible, all within the same program, opposed to having one program per device.

Every model has its own quirks, but TOPS uses a modular structure and keeps the downloading of data logically separated from its processing, thus enabling exporting data to a variety of output formats, even at a later moment. Archiving of raw data is made easy by using plain text files.

Users of Total Open Station are a growing number, you can be the next. See which Models are already supported.

Getting started with Total Open Station

Total Open Station 0.5 is now available and can be installed on all major operating systems. A development version could be build from source.

Detailed instructions are available at the Installing Total Open Station page.

If you are having problems with getting started, try first our Frequently Asked Questions (and some answers!). If that doesn’t help, get in touch with the development team through our dedicated support channel.

Documentation

User manual

Installing Total Open Station

There are a few different ways to install Total Open Station, depending on your operating system.

Warning

Version 0.4.0 of Total Open Station is the last version built on Python2.
Thus no support will be done on this version after 0.5 release as Python2 has reached his EOL.
Version 0.5+ will be Python3 only.

GNU/Linux distributions

Installing Total Open Station through your Linux package manager, if available, is the only way to get automatic updates to the most recent version. All other installation methods require you to keep track of new releases and manually update. Total Open Station will not notify you when a new release is available.

To install the latest release, see Using pip below.

OpenSUSE

Total Open Station is packaged for OpenSUSE. Installing is as easy as:

$ sudo zypper ar http://download.opensuse.org/repositories/Application:/Geo/openSUSE_Leap_15.1/ GEO
$ sudo zypper refresh
$ sudo zypper install TotalOpenStation

Change the OpenSUSE version as your wish.

Debian and Ubuntu

Total Open Station is included in Debian and Ubuntu, just:

sudo apt-get install totalopenstation

as usual. Please note that the version provided by your distribution may not be the latest release.

Mac OSX

Download Python3 from the official website, and follow this document on the Python.org website, that will help you choosing the correct version of Python to use (Python 3.6.8, 3.7.2 and later have builtin Tcl/Tk).

Warning

Do not use the pre-installed Python that comes with the OSX operating system which has serious bugs that can cause application crashes.

Then follow the section Using pip below.

Microsoft Windows

Download the most recent version of Total Open Station from Github download and run it.

The Windows version of Total Open Station is portable and everything is included in the executable, without need to install.

To upgrade to a newer version, just go to the Github download page again. No data will be lost!

Install the Prolific PL2032 drivers

(optional, but recommended).

Most USB-serial adapters are made with the Prolific chipset. If plugging the cable gives you errors about missing drivers for your hardware, drivers for Windows can be downloaded from the Prolific website.

Using pip

Until your operating system’s packaging tools (e.g. apt or yum) allow you to install Total Open Station along with other programs, the recommended way to install is using pip (a package manager for Python) and a virtual environment: basically you don’t mix packages installed system-wise with your package manager and user-installed software). Here follows a detailed step-by-step guide using a terminal.

Requirements

You need to have Python installed on your machine. Total Open Station runs on all supported Python versions (from 3.6 to 3.9).

On Linux, make sure that the python3-tk or python3-tkinter package is installed on your system, otherwise install it with your package manager, for example on Debian-based systems like Ubuntu:

sudo apt install python3-tk

or for ArchLinux:

pacman -S tk

Tkinter is the library used for the graphical interface of Total Open Station.

Create a virtual environment

Creating a virtual environment is as easy as typing in a terminal:

python3 -m venv tops-environment

A new directory named tops-environment has been created. It contains a minimal set of files needed to manage a Python installation that is isolated from the one installed on your system, helping to keep things clean.

Now, activate the environment with:

source tops-environment/bin/activate

(On Windows, this will be tops-environment/Scripts/activate)

From now on, all Python-related actions will be executed within the newly created environment, and not on the system-wide installation. You terminal should look a bit different when the virtual environment is active:

(tops-environment)steko@gibreel:$

You can change directory freely, the environment will remain active.

You deactivate the environment (that is, you exit from it), with the deactivate command.

Installing Total Open Station

Once the virtual environment is active, you’re ready to install Total Open Station, with:

pip install totalopenstation

This will automatically download the latest released version from the Python Package Index (PyPI), and install all the other required Python packages as well.

Installing development versions

Sometimes it is useful to install development versions before they are released, to help with testing of new features and making sure that there are no new bugs.

Using the procedure described above it is fairly easy to create another, separate environment. Once the new environment is active, the command for installing a development version is:

pip install -e git+https://github.com/totalopenstation/totalopenstation#egg=totalopenstation

Developers may ask you to install from another repository, but the concept stays the same. This mechanism is very flexible and allows to install and test different versions safely.

Running the program

When the program is installed, you can use it from the command line or with a graphical interface (recommended for new users).

From your terminal, type:

totalopenstation-gui.py

and the program should start.

Of course you can also run the command line programs:

  • totalopenstation-cli-connector.py downloads data from your total station
  • totalopenstation-cli-parser converts raw data in common formats like DXF and CSV

Please report any errors to the bug tracker.

The next time you want to run the program, follow these steps:

  1. open a terminal
  2. cd to the directory where the virtual environment was created
  3. source tops-environment/bin/activate to enter the virtualenv
  4. totalopenstation-gui.py will start the program

Using Total Open Station

There are two ways to use Total Open Station, from the command line or as a user-friendly program. Each mode of operation has its drawbacks, and both are constantly used and tested.

Graphical User Interface

If you followed the guide about Installing Total Open Station, you should be able to start Total Open Station.

The basic usage of Total Open Station is made of the following steps:

  1. download raw data from the total station
  2. save raw data (optional, but recommended)
  3. export raw data to an output format

Saving raw data enables you to open data files even at a later stage and process them when it’s more appropriate.

A complete manual of Total Open Station GUI

Command-line

After Installing Total Open Station, there will be three new executable programs in your path. Two of them are meant for being run in a terminal, and are extremely useful for batch operations and easy repeating of common tasks with minimum time effort.

Total Open Station CLI Connector and Total Open Station CLI Parser are two command line programs that make the same features of the graphical interface available to those who prefer working in a terminal. They are well documented, and they make it possible to process large amounts of data files via shell scripting, or to drastically reduce the time needed for downloading raw data.

These two programs also provide a basic but complete example of how to use Total Open Station as a programming library.

Total Open Station CLI Connector

This is a command line application to download raw data from total station devices.

Synopsis

totalopenstation-cli-connector.py [options]

Options
-h, --help show this help message and exit
-m MODEL, --model=MODEL
 select input MODEL
-p PORT, --port=PORT
 select input SERIAL PORT
-o FILE, --outfile=FILE
 select output FILE (do not specify for stdout)
Using totalopenstation-cli-connector

The --model and --port options are mandatory.

In most cases the default parameters for serial connection should work, but you should know how your total station is set, or alternatively you should be able to set serial parameters on the total station directly.

Output goes to stdout by default, but it is recommended to use the -o option.

Total Open Station CLI Parser

This is a command line application to convert raw data to common formats for use in CAD or GIS environments.

Synopsis

totalopenstation-cli-parser [options]

Options
-h, --help show this help message and exit
-i FILE, --infile=FILE
 select input FILE (do not specify for stdin)
-o FILE, --outfile=FILE
 select output FILE (do not specify for stdout)
-f FORMAT, --input-format=FORMAT
 select input FORMAT
--2d Exclude Z coordinates, output only 2D data
-t FORMAT, --output-format=FORMAT
 select input FORMAT
-r, --raw Enhanced parsed file process
--overwrite overwrite existing output file
--list list the available input and output formats
Using totalopenstation-cli-parser

If no input file is specified, input is read from stdin.

Output goes to stdout by default, but it is recommended to use the -o option.

Raw parsing

The --raw option is useful when exporting to CSV for processing in other programs, and will export all field records found in the raw data from the total station. It only makes sense for certain input formats where the original measurements are stored, namely:

  • Leica GSI
  • Nikon RAW
  • Carlson RW5
Total Open Station GUI
Downloading raw data

To download raw data, your total station must be connected to the computer you are using, and the connection parameters must be known and set in the program. Total Open Station saves certain parameters across work sessions, but not all of them are saved, yet.

The normal download procedure is a four-step operation:

  1. once the right parameters are set, click on the Connect button
  2. a small window appears, telling that the program is ready to start the download
  3. start the data transfer from the menu of the total station
  4. press the OK button in the small window (the order of these two last steps matters)

Downloaded data will be shown in real-time in the main program window. A short information dialog will appear at the end of the transfer. If any error blocks you in this procedure, please send a detailed description to the mailing list so we can help you.

Saving raw data

Raw data shown in the main program window can be edited if you need, and saved to disk clicking the Save raw data button. We highly recommend to save all data to disk before any other action, because it prevents data loss and it is a very convenient way to have a backup of your work. Plus, raw data files are generally very small in size if compared to the exported files.

By default saved files get a .tops extension, but it is absolutely optional to have this extension.

Opening previously saved data

The Open file button lets you open any ASCII file you have on your disk for processing with Total Open Station, either previously saved with TOPS itself or not.

Data can be edited in the text area. Editing patterns include:

  • removing lines of data that don’t need to be processed
  • correcting errors in data
  • pasting more than one data file together

Please note that if you do not know well the raw data format you are editing, data may become inconsistent, and it will not be possible to process them properly later. If you are unsure, do not edit raw data.

Exporting data

The main purpose of Total Open Station is to export raw data in formats that are not read by GIS and CAD programs, to common formats that are easy to import.

To start exporting data, make sure that the text area in the main program window contains the data you want to export. If this is not the case, you can either download data from your total station or open a previously-saved data file.

Click the Process data button. A window will appear, allowing you to choose two processing options:

  • the input format
  • the output format

Select the input format of the raw data you have (if you are using the same total station all the time, it will be probably the same – we are working on adding a way to save the last used formats across different working sessions).

Then select the output format you want to use, and proceed with the OK button. You will be asked where you want to save the exported file.

You can now open your exported data in the GIS or CAD program of choice for further processing. Should you need to go back to the original data, you can always repeat the above procedure starting from the saved raw data file.

Input formats

Total Open Station supports a number of input data formats, which are implemented separately from the device handling machinery (i.e. downloading data from your total station, see Models). This is because one device can output more than one format, and at the same time the same format can be used by more than one device (particularly this is the case for different models by the same manufacturer).

Generally speaking, data formats can be classified into two large groups:

  1. “raw” field data with polar coordinates
  2. processed data, with XY(Z) cartesian coordinates

The latter are far more easy to process, because they don’t require any computing of measurements.

XYZ formats

These formats were the first kind of survey data format supported by Total Open Station.

Cartesian coordinates just need to be extracted from ASCII data.

Implemented formats

Formats known are :

carlson_rw5 – Carlson SurvCE Raw Data File Format (RW5)

New in version 0.4.

Carlson RW5 is an exchange format used by the Carlson SurvCE software.

The official documentation about the format is provided on the Carlson website.

RW5 is a rich format for raw data about the entire field operation of total stations and even GPS.

For example:

OC,OP111,N 16556174.237,E 942130.662,EL 16.404
BK,OP111,BP108,BS0.00000,BC0.00000 LS,HI5.684,HR5.500
SS,OP111,FP108,AR0.00000,ZE0.00017,SD3.3566,--FENCE1

At the moment, a minimal subset of the specification is supported, consisting of the OC, BP, LS and SS record types.

Carlson Record Information

The format is a comma separated ASCII file containing record types, headers, recorded data and comments. The format is based on the Tripod Data System raw data specification with the exception of angle sets.

Angle sets are recorded as BD, BR, FD and FR records to allow reduction of all possible data that can be recorded by SurvCE using the “Set Collection” routine. Essentially, these records are identical to a sideshot record. With the exception of the aforementioned angle set records, if the Tripod Data System specification is modified to provide enhanced functionality, the added or modified data will reside in comment records to avoid incompatibility with existing software.

Each record is made of one line of text, with comma-separated fields of ASCII text format:

AH,DC%s,MA%s,ME%s,RA%s

The first field is a two-letter code of the type of record. All the following fields are composed with 1- or 2- letter field codes (such as OP, N or FP) and numeric values called an (ENUM). The “Notes” field is introduced by the -- code and contains a description of the record.

In practice, each point has a unique number and can be referenced for various purposes from other records.

Sideshot records (SS) reference the Occupy point record in the``OP`` field.

Record types
Record Type Explanation Applicable for
-- * Note General Raw Data
JB* Job  
MO* Mode Setup  
BD* Backsight Direct Conventional Raw Data
BK* Backsight  
BR* Backsight Reverse  
FD* Foresight Direct  
FR* Foresight Reverse  
GPS GPS Position in
Lat: dd.mmss
Lon: dd.mmss - Negative for West
WGS84 Ellipsoid Elevation
 
GS Reduced local coordinate from GPS record
and localization data
 
LS* Line of Sight  
OC* Occupy Point  
OF Off Center Shot  
SP* Store Point  
TR/SS* Traverse / Sideshot  

* implemented type

Field headers
Field header Explanation Applicable for
AD Azimuth Direction
0: North
1: South
 
AL* Angle-Left  
AR* Angle-Right  
AU* Angle Unit
0: 360° sexagesimal
1: 400 gon
 
AZ* Azimuth  
BC* Back Circle  
BP* Back Point  
BR* Bearing
[N123.4500W]
 
BS Backsight
when back point is not defined
 
CE* Change Elevation  
DL* Deflection-Left  
DR* Deflection-Right  
DT Local Date
[MM-DD-YYYY]
 
E* Easting
[E space]
 
EC Earth Curvature
0: off
1: on
 
EL* Elevation  
EO EDM Offset  
FE Foresight Elevation  
FP* Foresight Point  
HD* Horizontal Distance  
HI* Height of Instrument  
HR* Height of Rod  
N Northing
[N space]
 
OC Occupy Point  
OP Occupy Point  
PN Point Number  
SD* Slope Distance  
SF Scale Factor  
TM Local Time
[HH:MM:SS]
 
UN* Distance Unit
0: feet
1: meter
2: US feet
 
VA* Vertical Angle  
ZE* Zenith  
-- Note  

* Filed implemented

Definitions
Backsight Record
Record type:

BK

Field headers:

OP Occupy point
BP Back Point
BS Backsight
BC Back Circle

Sample(s):
BK,OP1,BP2,BS315.0000,BC0.0044
Job Record
Record type:

JB

Field headers:

NM Job name
DT Date
TM Time

Sample(s):
JB,NMSAMPLE,DT06-27-2003,TM14:21:53
Line of Sight Record
Record type:

LS

Field headers:

HI Height of Instrument
HR Height of Rod

Sample(s):
LS,HI5.000000,HR6.000000
LS,HR4.000000
Mode Setup Record

The mode setup will be recorded at the beginning of the raw data file.

Record type:

MO

Field headers:

AD Azimuth direction
UN Distance unit
SF Scale factor
EC Earth Curvature
EO EDM offset
AU Angle Unit

Sample(s):
MO,AD0,UN0,SF1.00000000,EC1,EO0.0,AU0
Occupy Record
Record type:

OC

Field headers:

PN Point number
N Northing
E Easting
EL Elevation
-- Note

Sample(s):
OC,OP1,N 5000.00000,E 5000.00000,EL100.000,--CP
Off Center Shot Record
Record type:

OF

Field headers:

AR Angle right
ZE Zenith (actual)
SD Slope Distance

Sample(s):
OF,AR90.3333,ZE90.0000,SD25.550000
OF,ZE90.3333,--Vert Angle Offset
Store Point Record
Record type:

SP

Field headers:

PN Point Number
N Northing
E Easting
EL Elevation
-- Note

Sample(s):
SP,PN100,N 5002.0000,E 5000.0000,EL100.0000,--PP
Traverse / Sideshot Record / Backsight Direct / Backsight Reverse / Foresight Direct / Foresight Reverse
Record type:

TR / SS / BD / BR / FD / FR

Field headers:

OP Occupy Point
FP Foresight Point
(one of the following)
- AZ Azimuth
- BR Bearing
- AR Angle-Right
- AL Angle-Left
- DR Deflection-Right
- DL Deflection-Left (one of the following)
- ZE Zenith
- VA Vertical angle
- CE Change Elevation
(one of the following)
- SD Slope Distance
- HD Horizontal Distance
-- Note

Sample(s):
TR,OP1,FP4,AR90.3333,ZE90.3333,SD25.550000,--CP
SS,OP1,FP2,AR0.0044,ZE86.0133,SD10.313750,--CP
BD,OP1,FP2,AR0.0055,ZE86.0126,SD10.320000,--CP
BR,OP1,FP2,AR180.0037,ZE273.5826,SD10.315000,--CP
FD,OP1,FP3,AR57.1630,ZE89.4305,SD7.393000,--CP
FR,OP1,FP3,AR237.1612,ZE270.1548,SD7.395000,--CP

TOPS is capable of converting raw measurement data into local coordinates, by performing a sequential processing of all records in their order.

Known limitations
Support for measurements is still incomplete, here is a list of TODO:
  • add all missing code
  • get comments
  • add the possibility to customize code

See also

Information on Carlson RW5
Carlson RW5 format
Documentation for Carlson RW5 from Carlson knowledgebase.

landxml – LandXML

New in version 0.6.

LandXML is committed to providing an non-proprietary data standard (LandXML), driven by an consortium of partners for the inter-operability of data utilized within the Land Development industry.

The official documentation about the format is provided on the LandXML website.

LandXML is a specialized XML (eXtensible Mark-up Language) data file format containing civil engineering and survey measurement data commonly used in the Land Development and Transportation Industries.

For example:

<?xml version="1.0" encoding="utf-8"?>
<LandXML xmlns="http://www.landxml.org/schema/LandXML-1.2" time="15:49:09" date="2006-06-19" version="0" language="English" readOnly="false">
<Units>
<Metric linearUnit="meter" temperatureUnit="celsius" volumeUnit="cubicMeter" areaUnit="squareMeter" pressureUnit="milliBars" angularUnit="decimal dd.mm.ss" directionUnit="decimal dd.mm.ss">
</Metric>
</Units>
<CgPoints>
<CgPoint oID="2748159" state="existing" pntSurv="boundary" name="Q">312.04999999981374 274.33400000003166</CgPoint>
<CgPoint oID="2748179" state="existing" pntSurv="boundary" name="W">308.8430000003427 277.0350000000326</CgPoint>
<CgPoint oID="2746236" state="existing" pntSurv="boundary" name="M">306.9670000001788 19.508999999961816</CgPoint>
</CgPoints>
<Survey>
<SurveyHeader name="IS185989" headOfPower="Survey and Mapping Infrastructure Act 2003" surveyFormat="Identification" surveyPurpose="Identification" desc="Plan of Identification Survey of Lots 26 &amp; 27 on RP726990 " type="surveyed" surveyStatus="Survey Records Only" fieldNoteFlag="false" submissionDate="2006-04-07" documentStatus="Captured">
<CoordinateSystem horizontalDatum="Local" verticalDatum="Arbitrary" />
</SurveyHeader>
<InstrumentSetup id="IS-7-IS185989" stationName="7-IS185989" instrumentHeight="0">
<InstrumentPoint pntRef="7-IS185989" />
</InstrumentSetup>
<InstrumentSetup id="IS-70-IS185989" stationName="70-IS185989" instrumentHeight="0">
<InstrumentPoint pntRef="70-IS185989" />
</InstrumentSetup>
<ObservationGroup id="OG-1">
<ReducedObservation name="3" setupID="IS-7-IS185989" targetSetupID="IS-70-IS185989" azimuth="302.504" horizDistance="10.81" distanceType="measured" azimuthType="measured" purpose="traverse" equipmentUsed="theodolite EDM" />
<ReducedObservation name="6" setupID="IS-72-IS185989" targetSetupID="IS-73-IS185989" azimuth="110.274" horizDistance="37.55" distanceType="measured" azimuthType="measured" purpose="traverse" equipmentUsed="theodolite EDM" />
<ReducedObservation name="4" setupID="IS-70-IS185989" targetSetupID="IS-71-IS185989" azimuth="359.512" horizDistance="52.12" distanceType="measured" azimuthType="measured" purpose="traverse" equipmentUsed="theodolite EDM" />
<ReducedObservation name="5" setupID="IS-71-IS185989" targetSetupID="IS-72-IS185989" azimuth="359.512" horizDistance="24.574" distanceType="measured" azimuthType="measured" purpose="traverse" equipmentUsed="theodolite EDM" />
</ObservationGroup>
</Survey>
<CoordinateSystem datum="OfPlan" desc="Vide IS185958" />
</LandXML>
LandXML structure

LandXML use a schema which specifies how to formally describe the elements of the document. The schema currently used is version 1.2.

Tags and attributs
Tag Attribut Parent tag formats.Feature
Units      
Metric   Units  
  linearUnit   dist_unit
  angularUnit   angle_unit
Imperial*   Units  
Survey      
SurveyHeader*   Survey  
Equipment*   Survey  
CgPoints   Survey “PT” in feature
CgPoint   CgPoints formats.Point
  name CgPoints point_name
Feature   CgPoint  
Property   Feature  
  values   attrib
InstrumentSetup   Survey “ST” in feature
  id   station_id
  stationName   point_name
  instrumentHeight   ih
  orientationAzimuth   hz0
  circleAzimuth   hz0
Feature   InstrumentSetup  
Property   Feature  
  values   attrib
ObservationGroup   Survey  
  setupID   station_id
Backsight   ObservationGroup  
  circle   circle
  setupID   “setup” + id
BacksightPoint   ObservationGroup  
  name    
RawObservation   ObservationGroup “PO” in feature
  setupID   station_id
  azimuth   azimuth
  horizAngle   angle
  zenithAngle   z_angle
  slopeDistance   dist
  horizDistance   dist
  targetHeight   th
TargetPoint   RawObservation formats.Point
  desc   point_name
  name   point_name
Feature   RawObservation  
Property   Feature  
  values   attrib

* Not implemented

Annotations
Units :
All angular and direction values default to radians unless otherwise noted. Angular values, expressed in the specified Units.angleUnit are measured counter-clockwise from east=0. Horizontal directions, expressed in the specified Units.directionUnit are measured counter-clockwise from 0 degrees = north.
CgPoints :
A collection of COGO points. (Cg = COGO = Cordinate Geometry).
InstrumentSetup :
The Instrument setup location is defined by either a coordinate text value (“north east” or “north east elev”) or a CgPoint number reference “pntRef” attribute.
ObservationGroup :
All observations to the same point in a group should be averaged together (they have consistant orientation).
TargetPoint :
Represents a 2D or 3D location for the target. It is defined by either a coordinate text value (“north east” or “north east elev”) or a CgPoint number reference “pntRef” attribute.
Known limitations
Support for all tags is still incomplete, here is a list of TODO:
  • add all missing tags
  • add the possibility to customize code
leica_gsi – GSI

New in version 0.4.

GEO Serial Interface (GSI) is a very popular data format, used by many Leica total stations (TPS) or Digital Levels (DNA). It is stored as ASCII text, with one line per measurement. In each line, there can be several blocks of data, with a blank space as a separation.

There are two variants of GSI:

  • GSI8
  • GSI16

but they only differ in the size of a single block.

GSI is a very rich format, and it can hold both cartesian and polar coordinates with a detailed recording of all commands executed by the device and with explicit indication of the measurement units.

GSI variants
GSI8

GSI8 has data information recorded in 8 bit words.

110001+0000A110 81..00+00005387 82..00-00000992
110002+0000A111 81..00+00007586 82..00-00003031
GSI6

GSI16 has data information recorded in 16 bit words.

110001+000000000PNC0055 21.002+0000000013384650 22.002+0000000005371500
110002+000000000PNC0056 21.002+0000000012802530 22.002+0000000005255000
110003+000000000PNC0057 21.002+0000000011222360 22.002+0000000005433800
110004+000000000PNC0058 21.002+0000000010573550 22.002+0000000005817600
110005+000000000PNC0059 21.002+0000000009983610 22.002+0000000005171400
GSI Block Information
Datablock structure

Each line is a datablock composed in a sequence of data words, ending with a terminator (CR or CR/LF). There is two types of datablocks specified by the first data word :

  • Block of measurement (beginning usually with 11)
  • Block of code (beginning usually with 41)
TPS
Data word structure

Every word starts with two characters specifying the data type within the word.

  • Pos.1-3: Word Index (WI)
  • Pos.4-6: Information related to data
  • Pos.7: Sign
  • Pos.8-15/8-23: GSI8/16 data
  • Pos.16/24: Blank (=separating character)
Position Explanation Applicable for
1-3 Word Index All words
4 AUTOMATIC INDEX INFORMATION
0: Automatic index OFF
1: Automatic index OPERATING
3: Automatic index OPERATING
All words containing angle information
5 INPUT MODE
0: Original measured values transferred from the instrument
1: Manual input from keyboard
2: Measured value, Hz-Correction ON
3: Measured value, Hz-Correction OFF
4: Result of special function
Measured data
6 UNITS
0: Meter (last digit: 1mm)
1: Feet (last digit: 1/1000ft)
2: 400 gon
3: 360° decimal
4: 360° sexagesimal
5: 6400 mil
6: Meter (last digit: 1/10mm)
7: Feet (last digit: 1/10‘000ft)
8: Meter (last digit: 1/100mm)
Measured data
7 SIGN
+: Positive value
-: Negative value
Measured data
8-15 (8-23) DATA
Data includes a sequence of 8(16) numerical or alphanumerical characters.
Note that certain data words are allowed to carry more than 1 value (e.g. PPM/MM). Those data are automatically transferred with a sign before each single value.
Measured data
16 (24) SEPARATING CHARACTER
_: Blank
All words
Word Index
WI FUNCTION Access/Example 1 2 3
11* Pointnumber 11… .+00000H66
PtNo=“H66“
x x x
12 Serial number 12….+00640054
S.No. “640054”
  x x
13 Instrument type 13….+00TCR305
Instr. “TCR305”
  x x
16 Station Pointnumbe 16….+00000100”
St.No. “100”
  x  
17 Date
[DD.MM.YYYY]
17….+08022000
“Feb. 8th 2000”
  x  
18 Year Second
[YY.SS.mSmSmS]
18….+01130000   x  
19 Time
[MM.DD.hh.mm]
19….+02081029
“Feb. 8th ; 10:29”
  x x
21* Horizontal Angle
Hz
21.102+17920860
Hz „179.086“ gon
x x x
22* Vertical Angle
V
22.102+07567500
V: „75.675“ gon
x x x
25* Horizontal circle difference
Hz0 - Hz
  ? ? ?
31* Slope distance 31..00+00003387
Sdist: „3.387“ m
x x x
32* Horizontal distance 32..00+00003198
Hdist: „3.198“ m
x x x
33* Height difference 33..00+00001119
Hdiff: „1.119“ m
x x x
41* Code-Block ID 41….+00000013
Code: „13“ m
  x x
42* Information 1 42….+000TREES
Info1: „TREES“
  x x
43* Information 2 43….+000004.5
Info2: „4.5“
  x x
44* Information 3 44….+00CAT.02
Info3: „CAT.02“
  x x
45* Information 4 45….+000000NN
Info4: „NN“
  x x
46* Information 5 46….+000000NN
Info5: „NN“
  x x
47* Information 6 47….+000000NN
Info6: „NN“
  x x
48* Information 7 48….+000000NN
Info7: „NN“
  x x
49* Information 8 49….+000000NN
Info8: „NN“
  x x
51* PPM and Prism constant 51… .+0220+002
PPM „220“ and Prism const „2“ mm
x   x
52 Measurement number Standard deviation   ? ? ?
53 Signal power   ? ? ?
58* Prism constant 58..16+00000020
Prism „2“ mm
x x x
59* PPM 59..16+02200000
PPM „220“
x x x
71* Remark1
(or Attribute 1)
71….+0000REM1
“REM1”
    x
72* Remark2
(or Attribute 2)
72….+0000REM2
“REM2”
    x
73* Remark3
(or Attribute 3)
73….+0000REM3
“REM13”
    x
74* Remark4
(or Attribute 4)
74….+0000REM4
“REM4”
    x
75* Remark5
(or Attribute 5)
75….+0000REM5
“REM5”
    x
76* Remark6
(or Attribute 6)
76….+0000REM6
“REM6”
    x
77* Remark7
(or Attribute 7)
77….+0000REM7 “REM7”     x
78* Remark8
(or Attribute 8)
78….+0000REM8
“REM8”
    x
79* Remark9
(or Attribute 9)
79….+0000REM9
“REM9”
    x
81* Target Easting (E) 81..00+01999507
E: “1999.507”m
x x x
82* Target Northing (N) 82..00-00213159
N: “-2139.159”m
x x x
83* Target Elevation (H) 83..00+00032881
H: “32.881”m
x x x
84* Station Easting (E0) 84..11+00393700
E: “393.700”m
x x x
85* Station Northing (N0) 85..11+06561220
N: “6561.220”m
x x x
86* Station Height (H0) 86..11+00065618
H: “65.618”m
x x x
87* Reflector height (hr) 87..11+00001700
hr: “1.700” m
x x x
88* Instrument height (hi) 88..11+00001550
hi: “1.550” m
x x x
531 Atmos. correction:
pressure
531.16+10130000
“1013”
  x  
538 Coefficient of refraction 538.16+00001300
1.300”
  x  
560 Time:
[hh.mm.ss]
560..6+00105018
“10:50:18”
  x  
561 Date:
[mm.dd]
561..6+00020800
“2.8.2000”
  x  
562 Year:
[yyyy]
562…+00002000
year “2000”
  x  
590 SW-Version:
Application
590..6+00021000
“V2.10”
  x  
591 SW-Version:
Operating system
591..6+00020000
“V2.00”
  x  
592 SW-Version:
OS interface
592..6+00010000
“V1.00”
  x  
593 SW-Version:
GEOCOM
593..6+00022000
“V2.20”
  x  
594 SW-Version:
Gsi communication
594..6+00010000
“V1.00”
  x  
595 SW-Version:
Edm Device
595..6+00011100
“V1.11”
  x  
913 Job 913…+BLDG.A12
“BLDG.A12”
  x  
914 Operator 914…+0MM-3519
“MM-3519”
  x  

* implemented WI

  1. TPS100 Series:
    TC403L, TC600, TC800,
    TC605/L, TC805/L TC905/L
  2. TPS300/700 Series:
    TC302, TC303, TC305, TC307,
    TCR302, TCR303, TCR305, TCR307,
    TC702, TC703, TC705,
    TCR702, TCR703, TCR705,
    TC(R)702 auto, TC(R)703 auto, TC(R)705 auto
  3. TPS1000/1100 Series:
    TC1100/L, TC1500/L, TC1700/L, TC1800/L,
    TCM1100/L, TCM1800/L,
    TCA1100/L, TCA1800/L· TC1101, TC1102, TC1103, TC1105,
    TCR1101, TCR1102, TCR1103, TCR1105,
    TCM1101, TCM1102, TCM1103, TCM1105,
    TCRM1101, TCRM1102, TCRM1103, TCRM1105,
    TCA1101, TCA1102, TCA1103, TCA1105,
    TCRA1101, TCRA1102, TCRA1103, TCRA1105
DNA

Only for DNA03/DNA10

Data word structure

Every word starts with two characters specifying the data type within the word.

  • Pos.1-3: Word Index (WI)
  • Pos.4-6: Information related to data
  • Pos.7: Sign
  • Pos.8-15/8-23: GSI8/16 data
  • Pos.16/24: Blank (=separating character)
Position Explanation Applicable for
1-3 Word Index All words
4 Empty, marked as dot (.) All words containing
5 Information about the measurement and earth-curvature correction.
0 = measured; without earth-curvature correction.
1 = entered manually; without earth-curvature correction.
2 = measured; with earth-curvature correction.
5 = entered manually; with earth-curvature correction.
Measured data
6 UNITS
0: Meter (last digit: 1mm)
1: Feet (last digit: 1/1000ft)
6: Meter (last digit: 1/10mm)
7: Feet (last digit: 1/10‘000ft)
8: Meter (last digit: 1/100mm)
Measured data
7-15 (7-23) DATA
Data includes a sequence of 8(16) numerical or alphanumerical characters.
Measured data
16 (24) SEPARATING CHARACTER
_: Blank
All words
Word Index
WI FUNCTION
11 PointID
12 Serial number
13 Instrument type
17 Date Year
19 Day time
32 Horizontal distance
35 Setting-out difference
41 Code-Block ID
42 Information 1
43 Information 2
44 Information 3
45 Information 4
46 Information 5
47 Information 6
48 Information 7
49 Information 8
71 Remark
83 Ground height (starting point height or measured height
95 Instrument temperature [°C]
330 Staff reading in “Meas Only”
331 Staff reading, backsight or B1
332 Staff reading, foresight or F1
333 Staff reading, intermediate sight
334 Staff reading, setting-out sight
335 Staff reading, B2
336 Staff reading, F2
374 Setting-out difference of height measurements
390 Count of repeated measurements
391 Mean mode: Standard deviation of the single measurement
392 Mean mode: Spread of measurements
560 Time: [hh.mm.ss]
561 Date: [mm.dd]
562 Year: [yyyy]
571 Station difference
572 Cumulative station difference
573 Distance balance
574 Total distance (=line length)
599 SoftWare Version
Units

The unit in position 6 of the word is used as following :

Unit Number of decimal Exemple
0: Meter (last digit: 1mm) 3 12345.678
1: Feet (last digit: 1/1000ft) 3 12345.678
2: 400 gon 5 123.45678
3: 360° decimal 5 123.45678
4: 360° sexagesimal 5 123.45678
5: 6400 mil 4 1234.5678
6: Meter (last digit: 1/10mm) 4 1234.5678
7: Feet (last digit: 1/10‘000ft) 4 1234.5678
8: Meter (last digit: 1/100mm) 5 123.45678
Default patterns

Most of the time, a GSI file is composed of three type of lines:

  • a station point with WI 11 [, 25], 84, 85, 86 [, 87], 88
  • a direct point with WI 11, 81, 82, 83
  • a measurement with WI 11, 21, 22, 31 or 32 [, 51], 87 [, 88] [, 81, 82, 83]
  • a comment with WI 41, [42, 43, 44, 45, 46, 47, 48, 49]

WI in [] are optional.

Known limitations
Support for raw measurements is still incomplete, here is a list of TODO:
  • get coordinates order (NEZ or ENZ)
  • add missing code for TPS (not with an asterisk on the WI list)
  • add DNA support
  • add an option to link comment(s) to either the previous or the next line
  • add an option to link attribut(s) with his point
  • add the possibility to customize code
  • add specific raise functions
Acknowledgements

Support for this format was added thanks to Anna Hodgkinson and Hannah Petten at the University of Liverpool. Some details of the implementation are based on the SurveyTools QGIS plugin developed by Stefan Ziegler.

See also

GSI Online for Leica TPS
Documentation for GSI from Leica.
leica_tcr_1205 – Leica TCR 1205

This format is used by the Leica TCR 1205 (and other similar devices), and contains both polar and cartesian coordinates. At the moment, only cartesian coordinates are used to obtain exported data.

Acknowledgements

Support for this format was added thanks to Joseph Reeves, OA Digital.

nikon_raw_v200 – Nikon RAW format V2.00

New in version 0.3.3.

This format contains polar data. It is the first polar format supported by Total Open Station.

Nikon RAW Record Information

Data are basically comma-separated values, but each row can have a different format and number of fields. Recorded points are in rows that start with the SS string, while fixed base points start with the ST string.

Definitions
Coordinate records
type , pt , (pt id) , northing , easting , elevation , code
type:One of the following codes
UP Uploaded point
MP Manually input point
CC Calculated coordinate
RE Resection point
pt:Point number
(pt id):(Point ID)
northing:Northing of the coordinate
easting:Easting of the coordinate
elevation:Elevation of the coordinate
code:Feature code
Station records
ST , stnpt , (stnid) , bspt , (bs id) , hi , bsazim , bsha
ST:Station record identifier (fixed text)
stnpt:Station point number
(stn id):(Station ID)
bspt:Backsight point number
(bs id):(Backsight ID)
hi:Height of instrument
bsazim:Backsight azimuth
bsha:Backsight horizontal angle
Control point records
CP , pt , (pt id) , ht , sd , ha , va , time , code
CP:Control point record identifier (fixed text)
pt:Point number
(pt id):(Point ID)
ht:Height of target
sd:Slope distance
ha:Horizontal angle
va:Vertical angle
time:24-hour time stamp
code:Feature code
Sideshot records
SS , pt , ht , sd , ha , va , time , code
SS:Sideshot record identifier (fixed text)
pt:Point number
ht:Height of target
sd:Slope distance
ha:Horizontal angle
va:Vertical angle
time:24-hour time stamp
code:Feature code
Stakeout records
SO , pt , (sopt) , ht , sd , ha , va , time ,
SO:Stakeout record identifier (fixed text)
pt:Recorded point number
(sopt):(Original number of point staked)
ht:Height of target
sd:Slope distance
ha:Horizontal angle
va:Vertical angle
time:24-hour time stamp
F1 records
face , pt , ht , sd , ha , va , time
face:One of the following
F1 Shot taken using Face-1 (fixed text)
Shot taken using Face-1 for Station setup (fixed text)
pt:Point number
ht:Height of target
sd:Slope distance
ha:Horizontal angle
va:Vertical angle
time:24-hour time stamp
Comment/note records
CO , text
CO:Comment record identifier (fixed text)
text:Comment text
Acknowledgements

Support for this format was added thanks to Cynthia Mascione, Università di Siena.

sokkia_sdr33 – Sokkia SDR 33

New in version 0.4.

Sokkia SDR33 is a format used by older models such as Sokkia SET 5F.

The format supports is based on fixed-position fields, with one record per line. SDR33 supports both polar (“raw”) measurements and cartesian coordinates (Northing, Easting, Elevation).

The first four characters of a line are useful to separate the various type of measurements:

  • prism height is marked by code 03NM
  • polar measurements are marked by the 09F1 code
  • cartesian measurements are marked by 08TP
  • base stations are marked by 02TP, because their coordinates are entered by hand as cartesian coordinates

It is uncommon for polar and cartesian measurements to be found in the same dataset.

trimble_are – Trimble AREA format
zeiss_r5 – Zeiss R5 format

New in version 0.4.

The R5 format is an evolution of the older R4 format and is similar to the zeiss_rec_500 REC 500 format. It can be used for both processed Cartesian data (Northing, Easting, Elevation) or for raw polar measurements, but currently we don’t have any sample data for the raw variant.

In each line of the data file, fields are separated by the | character:

For R5|Adr 0008|KR NTR1100|X       21.259 m   |Y       59.620 m   |Z       11.256 m   |

The first field is always For R5 and it indicates the format. Then the Adr field is a sequential id of the line, but not necessarily a surveyed point.

The third field is the most important, as it specifies different types of records with the first two characters, like TR or KR. Then a space character separates the next 7 characters, that are actually two separate pieces of information: the “text code” in the first 3 characters (that can be used to identify various points from the same feature or structure) and the point number in the next four characters.

The next fields are the X, Y and Z values.

zeiss_rec_500 – Zeiss REC 500

This was the first format supported by Total Open Station. For historical reasons, its documentation is far more extended than those of other formats. The step by step procedure is useful for anyone who wants to hack on TOPS itself.

Step-by-step download procedure

At the time I was doing the first tests, I found it useful to collect all steps. The program goes through them automatically:

>>> import serial
>>> ser = serial.Serial('/dev/ttyUSB0', \
    baudrate=9600, bytesize=serial.SEVENBITS, timeout=0, \
    parity=serial.PARITY_NONE, rtscts=1)
>>> ser.open()

At this point, you have to start the download from the device menu. When this operation has finished, it’s good practice to control if you have actually received any data:

>>> ser.inWaiting()
648L

A non-zero result means that something has been downloaded. Good enough.

This number can be saved to a variable and passed as parameter to the read() command:

>>> n = ser.inWaiting()
>>> result = ser.read(n)

The result object is a string that contains our data:

>>> print(result)
   0001 OR.COOR
   0002                   0S        X        0.000 Y         0.000 Z     0.000
   0003                                            Om     397.0370
   0004 POLAR
   0005 INPUT                       th       1.500 ih        0.000
   0006 INPUT                       th       0.000 ih        0.000 Z     0.000
   0007                   1         X       -0.472 Y         1.576 Z     0.004
END

So far, we can say that the downloaded file contains this information:

  • OR.COOR: but I don’t know if this line can take other values too
  • origin point defined by the OS string followed by its X, Y, Z coordinates
  • orientation angle Om: are these gradiants?
  • POLAR: but I don’t know if this line can take other values too
  • INPUT: are there always two INPUT lines?
    • th
    • ih
    • Z
  • points, expressed as N (starting from 1), X, Y, Z
  • END: after this line no more data
Other formats

The following is an other known format but not implemented.

Tripod Data System

TDS (Tripod Data Systems) is a technique designed to use your handheld devices as rough as you can to make it compatible with intense external environment. They also provide the versatility in the range of friendly software for the mobile computing and for various industries as well.

This format is designed to work with these devices and espacially with Survey Pro software.

The format is a comma separated ASCII file containing record types, headers, recorded data and comments.

Each record is made of one line of text, with comma-separated fields of ASCII text format:

AH,DC%s,MA%s,ME%s,RA%s
This format is the base of other formats :
Record type
General Raw Data
Record Type Explanation
Note
JB Job
MO Mode Setup
Conventional Raw Data
Record Type Explanation
AP Adjusted point
AT Attributes
BK Backsight
CF Cut Sheet
DE Design point / location
DL Define a Location
DP Deleted point
FC Feature Code
LS Line of Sight
MD Multiple Distances
OC Occupy Point
OE Offset delta
OF Off Center Shot
RB Repeat Backsight
RD Repeat Directional
RE Remote Elevation
RF Repeat Foresight
RS Resection
SD Deltas
SK Stake Out
SL Slope Staking
SP Store Point
SR Slope Staking Reference Offset
SU Sun Shot
TR/SS/OB Traverse / Sideshot / Observation
GPS Raw Data
Record Type Explanation
AH GPS Antenna Height
BL GPS Base Line
BP Set Base Receiver Position
CG COGO settings
CS Coordinate System Identity
CT Calibration Point
CV RMS Covariance of GPS Base Line
DG Datum Grid
DT Datum
EE GPS Edit Point
EP Geodetic position
EQ Equipment
ES Ellipsoid
GK GPS stakeout
GO GPS Offset Shot
GP GPS Point
GR GPS adjusted point
GS GPS Store Point
HA Horizontal Calibration (Adjust)
PE Extended Projection
PJ Projection
RP Local coordinates of calibration point
RX Receiver Setup
ST Local site settings
VA Vertical Calibration (Adjust)
Legacy Raw Data
Record Type Explanation
AA Accumulating Angle-right
not used in SPCE
BB Bench level, backsight
not used in SPCE
BG Base Point Geoid Model Elevation
no longer supported in SPCE 3.5
replaced by VA
BS Bench level, side shots
not used in SPCE
BT Bench level, traverse
not used in SPCE
HC Horizontal Control Point
not supported in SPro 3.5
replaced with CT
LE Vertical Ellipsoid Height Setup
LG Vertical Geoid Model Setup
no longer supported in SPCE3.5
LM Horizontal Mapping Plane Setup
no longer supported in SPCE3.5
LH Local transforming coefficients
for horizontal
no longer supported in SPCE3.5
replaced by Horizontal adjustment HA
LV Local transforming coefficients
for vertical
no longer supported in SPCE3.5
replaced by Vertical adjustment VA
VC Vertical Control point
not supported in SPro 3.5
replaced with C
Field headers
General and Conventional field list
Field header Explanation
-- Note
AD Azimuth Direction
AL Angle Left
AR Angle Right
AS Ahead on station
AU Angle Unit
AZ Azimuth
BC Back Circle
BD Backsight direct
BP Back point
BS Backsight
BV Backsight reverse
CE Change elevation
CF Slope used
CR Circular Reading
DE Declination
DS Design Slope
DT Date (JB Record)
DT Date (SU Record)
[MMDDYYYY]
E Adj. Easting
EC Earth Curvature
ED Delta easting
EG Sun Position
EL Elevation or Adj. Elevation
EO EDM offset
FD Foresight direct
FE Foresight elevation
FN Feature code name
FP Foresight point
FV Foresight reverse
GD Grade
GH Greenwich hour angle
HC Horizontal dist. to center line
HD Horizontal distance
HD Horizontal or relative horizontal dist.
HH Horizontal distance to hinge point
HI Height of Instrument
HR Height of Rod
LA Latitude
LD Delta elevation
LO Longitude
LR Left/Right Offset
N Adj. Northing
ND Delta northing
NM Job Name
OB Observed slope
OD Offset Direction
OE Offset Delta
OL Offset length
OP Occupy point
PN Point name
SD Slope Distance
SF Scale Factor
SM Semi-diameter of Sun
in DMS
ST Station
TM Time (JB – Record)
[HH:MM:SS]
TM Time (EP – Record)
[HHMMSS]
TM Time (SU – Record)
[HH.dddddd] in UTC Time
TN Attribute name
TV Attribute value in string form
UN Distance Unit
VC Vertical distance to center point
VD Vertical or relative vertical distance
VH Vertical distance to hinge point
ZD Zenith Direct
ZE Zenith or Zenith angle
ZV Zenith Reverse
General and Conventional enumerated field list
Field Type 0 1 2
AD enum North South  
AU enum degree grads  
CF bool cut fill  
EC enum off on  
OD int Center Right Left
UN enum Feet Meter US Survey Feet
EG string Left Trailing edge Right Trailing Edge center
GPS Field List
Field header Explanation
-- Description (Feature Code)
AE Location Indicator
AF Azimuth format
AI Antenna Index int (See Antenna.ini File)
AN Antenna Number int (See Antenna.ini File)
AO Azimuth Orientation
AT Antenna Type (name of antenna)
AZ Azimuth double Geodetic Angle
CL Classification
CO Coordinate System Option
CT Origin center
DA Datum Transformation Type
DC Derivation Code
DH HDOP from Rx
DM Dimensions Used
DN Datum name
DV VDOP from Rx
DX Base line Delta X
DY Base line Delta Y
DZ Base line Delta Z
E Easting
EL Elevation
EM Ellipse Name
FI File name
FO File name one
FT File name two
GF Geodetic Flags
GM GPS Measure Method
GN Geoid Model Name
GO Grid Orientation
HI Height of laser at GPS ref. Point
HO Horizontal Offset
HP Horizontal Precision
HR Height of laser target at store offset Pt.
HT Height or Ellipsoid Ht.
IF Ellipse inverse flattening
LA Latitude
LN Longitude
LX Translation x
LY Translation y
LZ Translation z
MA Measured antenna height
ME Measure Method
N Northing
OO Orientation one
OT Orientation two
OX Rotation x
OY Rotation y
OZ Rotation z
PN Point Name
PT GPS Point Type
PV Type of Vertical Adjustment
RA Reduced antenna height
RD Ellipsoid Radius
RE Recording interval
RH Horizontal RMS from Rx
RS Rx Serial Number
RT Rotation about origin
RV Vertical RMS from Rx
RX Rx Type
RY Rectify
SA Slope east
SC Error Scale or Scale Factor
SD Slope Distance
SF Scale factor at origin
SG Setup Group
SO Slope north
SP Scale factor
SV Min. # of SV during obs.
TA Tape Adjustment
TE Translation East
TH Translation North
TM System Time
TP Type of projection
TS Antenna Serial Number
VO Vertical Offset
VP Vertical Precision
XX Variance X
XY Covariance X,Y
XZ Covariance X,Z
YY Variance Y
YZ Covariance Y,Z
ZE Zenith Angle
ZG Zone Group (system) name
ZN Zone name
ZZ Variance Z
GPS Enumerated Fields List
AE:Location indicator for Denmark projections enum
• 1 = None
• 2 = Zeeland
• 3 = Jutland
• 4 = Bornholm
AF:Azimuth Format enum
• 0 = Geodetic
• 1 = Grid
AO:Azimuth Orientation WORD
• 1 = North
• 2 = South
CL:Classification enum
• 0 = UnknownClass
• 1 = Normal
• 2 = Control
• 3 = AsBuilt
• 4 = Check
• 5 = BackSight
• 6 = Deleted Normal
• 7 = Deleted Control
• 8 = Deleted AsBuilt
• 9 = DeletedCheck
• 10 = DeletedBackSight
CO:Coordinate System Option WORD
• 1 = None
• 2 = Scale only
• 3 = Keyed in
• 4 = Chosen from library
CT:Origin Center enum
• 0 = Equator
• 1 = Projection center
DA:Datum Transformation Type WORD
• 513 = csdMolodenskyDatum
• 514 = csdMultipleRegressionDatum
• 515 = csdSevenParameterDatum
• 516 = csdGridDatum
• 517 = csdWGS84Datum
DC:Derivation Code enum
• 1 = ModeBase (Base)
• 2 = ModeRover (Rover)
• 3 = ModeGetBase (GetBase)
• 4 = ModeStatic (Static)
DM:Number of Dimensions Used for a Calibration WORD
• 1 = 0D (None)
• 2 = 1D (Vertical only)
• 3 = 2D (Horizontal only)
• 4 = 3D (Both vertical and horizontal)
• 5 = Any
GF:Geodetic Flags Bit Flags
• Bit 0 = GPS Base Point
• Bit 1 = GPS Horizontal Control Point
• Bit 2 = GPS Veritcal Control Point
• Bit 3 = GPS Control Point
• Bit 4 = Local Map Plane Origin (Legacy, not used in Survey Pro 3.5 and beyond)
• Bit 5 = GPS Base Coordinate Invalid
GM:GPS Measure Method enum
• 0 = UnknownMethod
• 1 = UserInput
• 2 = Autonomous
• 3 = RTKFloat
• 4 = RTKFixed
• 5 = CopiedPoint
• 6 = RTCMCode
• 7 = WASS
GO:Grid Orientation WORD
• 1 = NE
• 2 = SW
• 3 = NW
• 4 = SE
ME:MeasureMethod enum
• 0 = Unknown
• 1 = True
• 2 = Uncorrected
PT:GPS Point Type enum
• 1 = Control
• 2 = Check
• 3 = DataCollect
• 4 = Offset
• 5 = RemoteElevation
• 6 = PostProcess
• 7 = UserInput
PV:Type of Vertical Adj. WORD
• 1 = inclined plane
• 2 = geoid model
• 3 = combined
TP:Type of Projection WORD
• 2049 = Albers Equal Area Conic
• 2050 = Cassini
• 2051 = Krovak
• 2052 = Lambert Conformal Conic One Parallel
• 2053 = Mercator
• 2054 = New Zealand Map Grid
• 2055 = Oblique Conformal Conic
• 2056 = Oblique Mercator Azimuth
• 2057 = Oblique Stereographic
• 2058 = Plane
• 2059 = Stereographic
• 2060 = RD Stereographic
• 2062 = Transverse Mercator
• 2063 = United Kingdom National Grid
• 2064 = Denmark
• 2065 = Hungarian EOV
• 2066 = Lambert Conformal Conic Two Parallel
• 2067 = Oblique Mercator Two Points
• 2068 = Double Stereographic
• 2069 = Grid
Legacy Field List
Field header Explanation
-- Description (Feature Code)
AR Angle right
Ba Base Latitude
BC Back circle
Bh Base Ellipsoid Height
Bo Base Longitude
CS Coordinate System
DA Datum
EL Elevation
FI Custome File Name
GI Geoid model index
GU Geoid Undulation at base
Ha Coefficient a
Hb Coefficient b
Hc Coefficient c
Hd Coefficient d
HE Hemisphere
HT Height
LA Latitude
LN Longitude
ME Method
PN Backsight point
RT Rotation
SC Scale
SD Slope Distance
Va Coefficient a
Vb Coefficient b
Vc Coefficient c
ZE Zenith
ZO Zone
Definitions
General Raw Data
Note Record
Job Record
Record type:

JB

Field headers:

NM: Job name
DT: Date
TM: Time

Sample(s):
“JB,NM%s,DT%s,TM%s”
Mode Setup Record

The mode setup will be recorded at the beginning of the raw data file and whenever it is changed.

Record type:

MO

Field headers:

AD: Azimuth direction (ENUM)
UN: Distance unit (ENUM)
SF: Scale factor
EC: Earth curvature (ENUM)
EO: EDM offset (inch) (Default string “0.0”)
AU: Angle unit (ENUM)

Sample(s):
“MO,AD%s,UN%s,SF%s,EC%s,EO0.0,AU%s”
Conventional Raw Data
Adjusted point record
Record type:

AP

Field headers:

PN: Point name
N : Adjusted northing
E : Adjusted easting
EL: Adjusted elevation
--: Description

Sample(s):
“AP,PN%s,N %s,E %s,EL%s,--%s”
Attributes
Record type:

AT

Field headers:

TN: Attribute name
TV: Attribute value in string form

Sample(s):
“AT,TN%s,TV%s”
Backsight Record
Record type:

BK

Field headers:

OP: Occupy point
BP: Back point
BS: Backsight
BC: Back circle

Sample(s):
“BK,OP%s,BP%s,BS%s,BC%s”
Cut Sheet Record
Record type:CF (cut or fill)

For an offset stakeout cut sheet.

Field headers:

ST: Station
OD: Offset direction (ENUM)
OL: Offset length
EL: Elevation
GD: Grade (design)

Sample(s):
“CF,ST%s,OD%s,OL%s,EL%s,GD%s”

For a point stakeout cut sheet.

Field headers:

PN: Point number
EL: Elevation
GD: Grade

Sample(s):
“CF,PN%s,EL%s,GD%s”

Note: From Survey Pro CE 3.5, the PN field and description field are removed from CF record for point stake out.

Design point / location record
Record type:

DE

Field headers:

PN: Point name (design point, may be blank)
N : Northing
E : Easting
EL: Elevation
--: Description (design point description, may be blank)

Sample(s):
“DE,PN%s,N %s,E %s,EL%s,--%s”
Define a Location Record
Record type:

DL

Field headers:

PN: Point name (POB)
HD: Relative horizontal distance
VD: Relative vertical distance
AZ: Azimuth
-- Description of the stored point.

Sample(s):
“DL,PN%s,HD%s,VD%s,AZ%s,--%s”
Deleted point record
Record type:

DP

Field headers:

PN : Point name

Sample(s):
“DP,PN%s”
Feature Code
Record type:

FC

Field headers:

PN: Point name
FN: Feature code name (may be blank)

Sample(s):
“FC,PN%s,FN%s”
Line of Sight Record
Record type:

LS

Field headers:

HI: Height of instrument
HR: Height of rod

Sample(s):
“LS,HI%s,HR%s”
Multiple Distance
Record type:

MD

Field headers:

SD: Slope distance

Sample(s):
“MD,SD %s:%s”
Occupy Point Record
Record type:

OC

Field headers:

OP: Point number
N : Northing (the header is N space)
E : Easting (the header is E space) EL: Elevation -- Description

Sample(s):
“OC,OP%s,N %s,E %s,EL%s,--%s”
Offset delta record
Record type:

OE

Field headers:

ST: Station
OE: Offset delta (actual offset – design offset)

Sample(s):
“OE,ST%s,OE%s”
Off Center Shot Record
Record type:

OF

Field headers:

AR: Angle right
ZE: Zenith
SD: Slope distance
OL: Offset length
HD: Horizontal distance
VD: Vertical distance
LR: Left/Right Offset

Sample(s):
“OF,AR%s,ZE%s,SD%s”
“OF,ZE%s,--Vert Angle Offset”
“OF,OL%s,--Right Angle Offset”
“OF,HD%s,--Horizontal Distance Offset”
“OF,LR%s,--Left / Right Offset”
“OF,VD%s,--Elevation Offset”
Repeat Backsight
Record type:

RB (repeat backsight)

Field headers:

OP: Occupied point
BP: Backsight point
AR: Angle right
ZE: Zenith angle
SD: Slope distance
HR: Height of rod at the backsight
-- Description

Sample(s):
“RB,OP%s,BP%s,AR%s,ZE%s,SD%s,HR%s,--%s”
Repeat Directional
Record type:

RD

Field headers:

BD: Backsight direct
FD: Foresight direct
ZD: Zenith direct
FV: Foresight reverse
ZV: Zenith reverse
BV: Backsight reverse

Sample(s):
“RD,FD %s:%s”
“RD,FV %s:%s”
“RD,BD %s:%s”
“RD,BV %s:%s”
“RD,ZD %s:%s”
“RD,ZV %s:%s”

The data before the colon (:) is the integer set number and the data after the colon is the angle measurement. See MO record for angle units.

Remote Elevation Record
Record type:

RE

Field headers:

OP: Occupied point
FE: Foresight elevation
ZE: Zenith angle
SD: Slope distance
-- ( always “Remote elev”)

Sample(s):
“RE,OP%s,FE%s,ZE%s,SD%s,--%s”
Repeat Foresight
Record type:

RF (repeat foresight)

Field headers:

OP: Occupied point
FP: Foresight point
AR: Angle right
ZE: Zenith angle
SD: Slope distance
HR: Height of rod at the foresight
-- Description

Sample(s):
“RF,OP%s,FP%s,AR%s,ZE%s,SD%s,HR%s,--%s”
Resection Record
Record type:

RS

Field headers:

PN: Point number
CR: Circular reading
ZE: Zenith (or VA, CE)
SD: Slope distance (or HD)

Sample(s):
“RS,PN%s,CR%s,ZE%s,SD%s” // A resection with angles and distance
“RS,PN%s,CR%s” // A resection with angles only
Deltas record
Record type:

SD

Field headers:

ND: Delta northing
ED: Delta easting
LD: Delta elevation

Sample(s):
“SD,ND%s,ED%s,LD%s”
Stake Out Record
Record type:

SK

Field headers:

OP: Occupy point
FP: Foresight point
AR: Angle right
ZE: Zenith
SD: Slope distance

Sample(s):
“SK,OP%s,FP%s,AR%s,ZE%s,SD%s,--%s”

Note: FP field used to record design point name. Starting from SPCE3.5, it records the actual point name. It also may be blank if there is no actual point stored.

Slope Staking Record
Record type:

SL

Field headers:

ST: Station
OD: Offset direction (ENUM)
EL: Actual catch point elevation
GD: Grade (design elevation of the catch point based on the slope line)
AS: Ahead on station (positive when rod is beyond design station, negative when before station)
HH: Horizontal distance to hinge point (always positive)
VH: Vertical distance to hinge point (positive when rod is above hinge)
HC: Horizontal distance to center line (always positive)
VC: Vertical distance to center point (positive when rod is above center point)
CF: Slope used (ENUM)
DS: Design slope
OB: Observed slope

Sample(s):
“SL,ST%s,OD%s,EL%s,GD%s,AS%s,HH%s,VH%s,HC%s,VC%s,CF%s,DS%s,OB%s”
Store Point Record
Record type:

SP

Field headers:

PN: Point number
N: Northing
E: Easting
EL: Elevation
-- Description

Sample(s):
“SP,PN%s,N %s,E %s,EL%s,--%s”
Slope Staking Reference Offset Record
Record type:

SR

Field headers:

ST: Station
OD: Offset direction (ENUM)
EL: Actual elevation
GD: Grade (design elevation, corresponds to the elevation of the found catch point)
AS: Ahead on station (positive when rod is beyond design station, negative when before station)
HH: Horizontal distance to hinge point (always positive). This distance includes the reference offset.
VH: Vertical distance to hinge point (positive when rod is above hinge)
HC: Horizontal distance to center line (always positive). This distance includes the reference offset.
VC: Vertical distance to center point (positive when rod is above center point)
CF: Slope used (ENUM)
DS: Design slope
OB: Observed slope at the catch point
OL: Offset length from the catch point

Sample(s):
“SR,ST%s,OD%s,EL%s,GD%s,AS%s,HH%s,VH%s,HC%s,VC%s,CF%s,DS%s,OB%s,OL%s”
Sun Shot Record
Record type:SU

For a sun shot setup

Field headers:GH: Greenwich hour angle (GHA 0)
GH: Greenwich hour angle (GHA 24)
DE: Declination (DECL 0)
DE: Declination (DECL 24)
SM: Semi-diameter of Sun (in DMS)
DT: Local date (See General and Conventional Field List)
TM: Local time (See General and Conventional Field List)

For the actual sun shot

Field headers:

BD: Backsight direct
FD: Foresight direct
FV: Foresight reverse
BV: Backsight reverse
LA: Latitude
LO: Longitude
EG0: Left trailing edge sun position
EG1: Right trailing edge sun position
EG2: Center sun position

Sample(s):
“SU,GH%s,GH%s,DE%s,DE%s,SM%s”
“SU,DT%02s%02s%04s”
“SU,LA%s,LO%s,EG%s”
“SU,TM%s”
“SU,%s%s%s” // Will write BD,BV or FD,FV with an angle measurement. See MO
record for angle units.
Traverse / Sideshot / Observation Record
Record type:

TR / SS / OB

Field headers:

OP: Occupy point
FP: Foresight point
(one of the following)
- AZ: Azimuth
- AR: Angle right
- AL: Angle left
(one of the following pair)
- ZE: Zenith
- SD: Slope distance
(or)
- CE: Change elevation
- HD: Horizontal distance
-- Description

Sample(s):
“TR,OP%s,FP%s,AR%s,ZE%s,SD%s,--%s”
“SS,OP%s,FP%s,AR%s,ZE%s,SD%s,--%s”
“OB,OP%s,FP%s,AR%s,ZE%s,SD%s,--%s”
GPS Raw Data Record Definitions
GPS Antenna Height
Record type:

AH

Field headers:

DC: Derivation Code (ENUM)
MA: Measured antenna height
ME: Measure Method (ENUM)
RA: Reduced antenna height (to phase center)

Sample(s):
“AH,DC%s,MA%s,ME%s,RA%s”
GPS Base Line
Record type:

BL

Field headers:

DC: Derivation
PN: Point Name
DX: Base line Delta X
DY: Base line Delta Y
DZ: Base line Delta Z
--: Description (Feature Code)
GM: GPS Measure Method (ENUM)
CL: Classification
HP: Horizontal Precision
VP: Vertical Precision

Sample(s):
“BL,DC%s,PN%s,DX%s,DY%s,DZ%s,--%s,GM%s,CL%s,HP%s,VP%s”
Set Base Receiver Position
Record type:

BP

Field headers:

PN : Point Name
LA: Latitude
LN: Longitude
HT: Ellipsoid Height
SG: Setup Group (default = 0)

Sample(s):
“BP,PN%s,LA%s,LN%s,HT%s,SG%s”
COGO Settings record
Record type:

CG

Field headers:

AO: Azimuth Orientation (ENUM)
GO: Grid Orientation (ENUM)

Sample(s):
“CG,AO%s,GO%s”
Coordinate System Identity
Record type:

CS

Field headers:

CO: Coordinate system option (ENUM)
ZG: Zone group (system) name
ZN: Zone name
DN: Datum name

Sample(s):
“CS,CO%s,ZG%s,ZN%s,DN%s”
Calibration Point
Record type:

CT

Field headers:

PN: Point Name
DM: Dimensions used (ENUM)
RH: Horizontal residual
RV: Vertical residual

Sample(s):
“CT,PN%s,DM%s,RH%s,RV%s”
RMS Covariance of GPS Position
Record type:

CV

Field headers:

DC: Derivation (ENUM)
SV: Minimum number of SV during observation
SC: Error Scale
XX: Variance X
XY: Covariance X,Y
XZ: Covariance X,Z
YY: Variance Y
YZ: Covariance Y,Z
ZZ: Variance Z

Sample(s):
“CV,DC%s,SV%s,SC%s,XX%s,XY%s,XZ%s,YY%s,YZ%s,ZZ%s”
Datum Grid Record
Record type:

DG

Field headers:

FI: File name

Sample(s):
“DG,FI%s”
Datum Record
Record type:

DT

Field headers:

DA: Type of datum (ENUM)
RD: Ellipsoid radius
IF: Ellipse inverse flattening
OX: Rotation x
OY: Rotation y
OZ: Rotation z
LX: Translation x
LY: Translation y
LZ: Translation z
SP: Scale factor in ppm

Sample(s):
“DT,DA%s,RD%s,IF%s,OX%s,OY%s,OZ%s,LX%s,LY%s,LZ%s,SP%s”
GPS Edit Point Record
Record type:

EE

Field headers:

GF: Geodetic Flags (ENUM)
SG: Setup Group

Sample(s):
“EE,GF%s,SG%s”
Geodetic position

When a point is stored, its geodetic position is recorded.

Record type:

EP

Field headers:

TM: Time
LA: Latitude
LN: Longitude
HT: Ellipsoid Height
RH: Horizontal RMS returned from receiver
RV: Vertical RMS returned from receiver
DH: HDOP if receiver returns this info
DV: VDOP if receiver returns this info
GM: GPS Method (ENUM)
CL: Classification (ENUM)

Sample(s):
“EP,TM%s:%s:%s,LA%s,LN%s,HT%s,RH%s,RV%s,DH%s,DV%s,GM%s,CL%s”
“EP,TM%s:%s:%s,LA%s,LN%s,HT%s,RH%s,RV%s,GM%s,CL%s”
Equipment Record
Record type:

EQ

Field headers:

DC: Derivation Code (ENUM)
RX: Rx Type
RS: Rx Serial Number
AN: Antenna Number (from Antenna.ini)
AI: Antenna Index (measure to index from antenna.ini)
AT: Antenna Type (name of antenna)
TS: Antenna Serial Number
TA: Tape Adjustment
HO: Horizontal Offset
VO: Vertical Offset

Sample(s):
“EQ,DC%s,RX%s,RS%s,AN%s,AI%s,AT%s,TS%s,TA%s,HO%s,VO%s”
Ellipsoid Record
Record type:

ES

Field headers:

RD : a - radius of semi major
IF: 1/f - inverse flattening
EM: Name - ellipse name

Sample(z:
“ES,RD%s,IF%s,EM%s”
GPS stakeout record
Record type:

GK

Field headers:

PN: Point name (actual point, may be blank)
N : Northing
E : Easting
EL: Elevation
-- Description (actual point description, may be blank)

Sample(s):
“GK,PN%s,N %s,E %s,EL%s,--%s”
GPS Offset Shot Record
Record type:

GO

Field headers:

PN: Point Name
AZ: Azimuth
ZE: Zenith Angle
SD: Slope Distance
HI: Height of laser at GPS reference point
HR: Height of laser target at store offset point
-- Description

Sample(s):
“GO,PN%s,AZ%s,ZE%s,SD%s,HI%s,HR%s,--%s”
GPS Point Record
Record type:

GP

Field headers:

PN: Point Name
PT: Point Type (ENUM)

Sample(s):
“GP,PN%s,PT%s”
GPS adjusted point record
Record type:

GR

Field headers:

N : Northing
E : Easting
EL: Elevation
--: Description

Sample(s):
“GR,PN%s,N %s,E %s,EL%s,--%s”
GPS Store Point

The GS record is similar to the SP record, which records the coordinate of a point. This record identifies the point is created by GPS.

Record type:

GS

Field headers:

PN: Point Name
N : Local Northing
E : Local Easting
EL: Local Elevation
--: Description

Sample(s):
“GS,PN%s,N%s,E%s,EL%s,--%s”
Horizontal Calibration (Adjust)
Record type:

HA

Field headers:

N : Origin north
E : Origin east
TH: Translation north
TE: Translation east
RT: Rotation about origin
SF: Scale factor at origin

Sample(s):
“HA,N %s,E %s,TH%s,TE%s,RT%s,SC%s”

Note: all the fields may be blank if there is no adjustment done.

Extended Projection Record
Record type:

PE

Field headers:

TP: Type of projection (ENUM)
LA: Latitude of origin
LN: Longitude of origin
HT: Height of origin
N : Origin north
E : Origin east
EL: Origin elevation
SC: Scale factor
OO: Orientation one
OT: Orientation two
CT: Origin center (ENUM)
AF: Azimuth format (ENUM)
RY: Rectify
AE: Area (ENUM)
FO: File name one
FT: File name two

Sample(s):
“PE,TP%s,LA%s,LN%s,HT%s,N %s,E %s,EL%s,SC%s,OO%s,OT%s, CT%s,AF%s,RY%s,AE%s,FO%s,FT%s”
Projection Record
Record type:

PJ

Field headers:

TP: Type of projection (ENUM)
LA: Latitude of origin
LN: Longitude of origin
HT: Height of origin
N : Origin north
E : Origin east
EL: Origin elevation
SC: Scale factor
OO: Orientation one
OT: Orientation two

Sample(s):
“PJ,TP%s,LA%s,LN%s,HT%s,N %s,E %s,EL%s,SC%s,OO%s,OT%s”
Local coordinates of calibration point
Record type:

RP

Field headers:

N : Northing
E : Easting
EL: Elevation
--: Description

Sample(s):
“RP,PN%s,N %s,E %s,EL%s,--%s”
Receiver Setup
Record type:

RX

Field headers:

DC: Derivation Code (ENUM)
RA: Reduced antenna height (to phase centre)
RE: Recording interval in seconds
FI: Name of post processing file opened

Sample(s):
“RX,DC%s,RA%s,RE%s,FI%s”
Local site settings
Record type:

ST

Field headers:

LA: Latitude
LN: Longitude
HT: Height
SC: Scale factor
N : Northing offset
E : Easting offset

Sample(s):
“ST,LA%s,LN%s,HT%s,SC%s,N %s,E %s”
Vertical Calibration (Adjust)
Record type:

VA

Field headers:

PV: Type of vertical adjustment (ENUM)
N : Origin north (may be blank)
E : Origin east (may be blank)
LZ: Constant adjustment – translation Z (may be blank)
SO: Slope north (may be blank)
SA: Slope east (may be blank)
GN: Geoid Model Name

Sample(s):
“VA,PV%s,N %s,E %s,LZ%s,SO%s,SA%s,GN%s”
Legacy Raw Data Record Definitions

These records are not used in Survey Pro version 3.5 and beyond.

Accumulating Angle-right
Record type:

AA

Field headers:

BC: Back circle
AR: Angle right
ZE: Zenith
SD: Slope distance

Sample(s):
“AA,BC%s,AR%s,ZE%s,SD%s”
Bench level, backsight
Record type:

BB

Field headers:

PN: Backsight point
EL: BS elevation
ZE: Zenith
SD: Slope distance
--: Description

Sample(s):
“BB,PN%s,EL%s,ZE%s,SD%s,--%s”
Base Point Geoid Model Elevation

Replaced by Vertical adjustment record VA.

Record type:

BG

Field headers:

PN: Point Name
HT: Ellipsoid Height
GU: Geoid Undulation at base
EL: Elevation of base

Sample(s):
“BG,PN%s,HT%s,GU%s,EL%s”
Bench level, side shots
Record type:

BS

Field headers:

PN: FS point
ZE: Zenith
SD: Slope distance
--: Description

Sample(s):
“BS,PN%s,ZE%s,SD%s,--%s”
Bench level, traverse
Record type:

BT

Field headers:

PN: FS point
ZE: Zenith
SD: Slope distance
--: Description

Sample(s):
“BT,PN%s,ZE%s,SD%s,--%s”
Horizontal Control Point

When solving local transformation, each control point’s lat, long and height will be recorded.

Record type:

HC

Field headers:

PN: Point Name
LA: Latitude
LN: Longitude
HT: Ellipsoid Height
--: Description

Sample(s):
“HC,PN%s,LA%s,LN%s,HT%s,--%s”
Vertical Ellipsoid Height Setup

Replaced by the vertical adjust record VA.

Record type:

LE

Field headers:

--: Description string

Sample(s):
“LE,--%s”
Vertical Geoid Model Setup

Replaced by the vertical adjust record VA.

Record type:

LG

Field headers:

GI: Geoid model index

Sample(s):
“LG,GI%s”
Horizontal Mapping Plane Setup

Replaced by the projection records (ES,PJ,DT,CS).

Record type:

LM

Field headers:

ME: Method
CS: Coordinate System
DA: Datum
ZO: Zone
HE: Hemisphere
FI: Custom file name (cs5 or pj5)

Sample(s):
“LM,ME%s,CS%s,DA%s,ZO%s,HE%s,FI%s”
Local transforming coefficients for horizontal

Replaced by Horizontal adjustment record HA.

Record type:

LH

Field headers:

PN: Point Name
Ha: Coefficient a
Hb: Coefficient b
Hc: Coefficient c
Hd : Coefficient d
SC: Scale
RT: Rotation

Sample(s):
“LH,PN%s,Ha%s,Hb%s,Hc%s,Hd%s,SC%s,RT%s”
Local transforming coefficients for vertical

Replaced by Vertical adjustment record VA.

Record type:

LV

Field headers:

PN: Point Name
Va: Coefficient a
Vb: Coefficient b
Vc: Coefficient c
Ba: Base Latitude
Bo: Base Longitude
Bh: Base Ellipsoid Height

Sample(s):
“LV,PN%s,Va%s,Vb%s,Vc%s,Ba%s,Bo%s,Bh%s”
Vertical Control point

When solving local transformation, each control point’s lat, long and height will be recorded.

Record type:

VC

Field headers:

PN: Control point number
LA: Latitude of control point
LN: Longitude of control point
HT: Ellipsoid height of control point
--: Description

Sample(s):
“VC,PN%s,LA%s,LN%s,HT%s,--%s”
Unknown formats

Unimplemented formats can be added to Total Open Station.

The best way to have your format included in the next version of Total Open Station is to fill a support request in the bug tracker and attach some sample data dumps obtained following Getting sample data.

If you can write Python code, you can also write a module by yourself using an existing one as a guide and the Adding a new format directive. If you write a module, we will be happy to receive it and include it in the Total Open Station source tree.

See also

The Contributing to Total Open Station page to find out how to join the project and participate actively to the development.

Output formats

Total Open Station supports a number of output formats.

As input formats, data formats can be classified into two groups:

  1. “raw” data with polar coordinates and lots of information
  2. processed data with cartesian coordinates
Implemented formats

Output formats are:

..rubric:: Foreword

In this page, formats are described using labels which are:

Label Explanation
PID Point number or referenc
type Point type (see below)
angle Horizontal angle or azimuth
z_angle zenithal angle
distance Horizontal or slope distance
th Target heigh
ih Instrument heigh
circle Angle on the circle
station Station point for reference
TEXT Some descriptive text

Point type

Type Explanation
PT Simple point with only coordinates
ST Station
BS Backsight point
PO Point with polar coordinates and more
tops_csv – CSV
Description

This is a standard file format for spreadsheet and transfer between softwares.
The file is comma separated.

Data format

Yet, this format is not parametric and values return are the following:

PID, type, Point Name, x, y, angle, z_angle, distance, th, ih, circle, station
tops_dat – DAT
Description

This format is used in Archis software for photorectification, photo mosaic and photogrammetric survey.

Data format

Return format is points coordinates:

PID, x, y, z, TEXT
tops_dxf – DXF
Description

This format is a standard format for CAD softwares like AutoCAD, QCAD, LibreCAD…

Data format

The format is based on the official DXF R15 (2000) documentation.
Layers can be separated for each point or not.
This format can describe points or lines.

tops_geojson – GeoJSON
Description

This format follow the GeoJSON standard RFC 7946.
Moreover, this format is the internal format used in Total Open Station.
It is supported by numerous mapping and GIS software.

Data format

GeoJSON features collections.

tops_sql – SQL
Description

This format is used by PostGIS which adds support for geographic objects to the PostgreSQL object-relational database.|br| SQL Reference

Data format

Format is points coordinates:

PID, x, y, z, TEXT
tops_txt – Txt
Description

A simple ASCII format to export points coordinates.

Data format

Format is points coordinates:

x, y, z
tops_landxml – LandXML

New in version 0.6.

Description

LandXML is committed to providing an non-proprietary data standard (LandXML), driven by an consortium of partners for the inter-operability of data utilized within the Land Development industry.

The official documentation about the format is provided on the LandXML website.

LandXML is a specialized XML (eXtensible Mark-up Language) data file format containing civil engineering and survey measurement data commonly used in the Land Development and Transportation Industries.

LandXML structure

LandXML use a schema which specifies how to formally describe the elements of the document. The schema currently used is version 1.2.

Units tag

Currently, the header of the XML file will always be:

<?xml version="1.0"?>
<LandXML xmlns="http://www.landxml.org/schema/LandXML-1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.landxml.org/schema/LandXML-1.2 http://www.landxml.org/schema/LandXML-1.1/LandXML-1.1.xsd" date="" time="" version="1.1">
    <Units>
        <Metric areaUnit="squareMeter" linearUnit="meter" volumeUnit="cubicMeter" temperatureUnit="celsius" pressureUnit="milliBars" angularUnit="grads" directionUnit="grads"></Metric>
    </Units>
    <Project name="Template"></Project>
    <Application name="TotalOpen Station" desc="TOPS" manufacturer="" version="" manufacturerURL="http://tops.iosa.it/" timeStamp=""></Application>
</LandXML>

Metric is choosed as the default unit system. If one need Imperial, ask for it in the bug tracker.

Tags and attributs
Tag Attribut Value Parent tag
Survey      
SurveyHeader     Survey
  name “from TOPS” Survey
Equipment     Survey
CgPoints     Survey
CgPoint   x y [z] CgPoints
  name point_name  
  pntRef pid  
  featureRef “feature” + point_name  
Feature     CgPoint
  name “feature” + point_name CgPoint
Property     Feature
  “attrib” + index attrib[index]  
InstrumentSetup     Survey
  id “setup” + id  
  stationName point_name  
  instrumentHeight ih  
  orientationAzimuth hz0  
Feature     InstrumentSetup
  name “feature” + point_name CgPoint
Property     Feature
  “attrib” + index attrib[index]  
InstrumentPoint   instru_x instru_y instru_z InstrumentSetup
  pntRef pid  
ObservationGroup     Survey
  id “o” + id  
  setupID “setup” + id  
Backsight     ObservationGroup
  circle circle  
BacksightPoint   back_x back_y back_z Backsight
  name back_name  
RawObservation     ObservationGroup
  setupID* “setup” + id  
  azimuth azimuth  
  horizAngle angle  
  zenithAngle z_angle  
  slopeDistance dist  
  horizDistance dist  
  targetHeight th  
TargetPoint   x y [z] RawObservation
  desc point_name  
  pntRef pid  
Feature     RawObservation
Property     Feature
  instrumentHeight ih  
  edmAccuracyppm ppm  
  edmAccuracyConstant prism_constant  
  “attrib” + index attrib[index]  

/* Not implemented

Annotations
Units :
All angular and direction values default to radians unless otherwise noted. Angular values, expressed in the specified Units.angleUnit are measured counter-clockwise from east=0. Horizontal directions, expressed in the specified Units.directionUnit are measured counter-clockwise from 0 degrees = north.
CgPoints :
A collection of COGO points. (Cg = COGO = Cordinate Geometry).
InstrumentSetup :
The Instrument setup location is defined by either a coordinate text value (“north east” or “north east elev”) or a CgPoint number reference “pntRef” attribute.
ObservationGroup :
All observations to the same point in a group should be averaged together (they have consistant orientation).
TargetPoint :
Represents a 2D or 3D location for the target. It is defined by either a coordinate text value (“north east” or “north east elev”) or a CgPoint number reference “pntRef” attribute.
Unknown formats

Unimplemented formats can be added to Total Open Station.

The best way to have your format included in the next version of Total Open Station is to fill a support request in the bug tracker and attach some sample data dumps obtained from your original software.

If you can write Python code, you can also write a module by yourself using an existing one as a guide and the Adding a new format directive. If you write a module, we will be happy to receive it and include it in the Total Open Station source tree.

See also

The Contributing to Total Open Station page to find out how to join the project and participate actively to the development.

Models

Total Open Station handle the retrieving of data from stations by serial link. Parameters of connection for some models are directly implemented in Total Open Station.

Other models could be linked using the connect window (GUI only).

Implemented models

Those following models have there connection tested and data are retrieved correctly.

leica_tcr_1205 – Leica TCR 1205
Description

This is a quite recent total station. Data were provided by Joseph Reeves of Oxford Archaeology.

Connection
Baudrate:higher than 19200
Bytesize:8
StopBits:1
Parity:None
Data format

The data format is ASCII, quite simple.

The only thing to note is that data dumps contain both relative and absolute measures.

leica_tcr_1205 – Leica TCR 1205

nikon_npl_350 – Nikon NPL-350
Description
Connection

Even the brute method cat /dev/ttyS0 > file creates an ASCII file without any problem, so probably the default parameters for the serial port are OK.

Baudrate:higher than 19200
Bytesize:8
StopBits:1
Parity:None
Data format

The data format is in ASCII format.

nikon_raw_v200 – Nikon RAW format V2.00

trimble – Trimble
Description
Connection
Baudrate:9600
Bytesize:8
StopBits:1
Parity:None
Data format

The data format is ASCII, quite simple.

trimble_are – Trimble AREA format

zeiss_elta_r55 – Zeiss Elta R55
Description

This is a quite old device, in use at the University of Siena. The first steps in TOPS development were achieved with it.

Connection

The hardware interface consists of a serial RS232 cable, that works also with a common serial-USB adapter .

Baudrate:9600
Bytesize:7
Parity:None
Output formats

The Zeiss Elta R55 total station can output data in four different formats, only one of which is currently supported:

Other models

A connect window is available in the GUI to be able to set parameters and retrieve data from non implemented models.

Unimplemented models can be integrated to Total Open Station.

The best way to have your model included in the next version of Total Open Station is to fill a issue in the bug tracker and attach the values obtained following the Getting sample data guide.

If you can write Python code, you can also write a module by yourself using the existing ones as a guide and submit a pull request. If you write a module, we will be happy to receive it and include it in the Total Open Station source tree.

Getting sample data

Even when your device is not listed among the supported ones, Total Open Station can still be useful, particularly for:

  1. finding the right serial connection parameters from an unknown device. You can play with the 8 options and see the results in a text area. Once the downloaded results look good, you can be almost sure that you have used the right parameters, and we can add the tested model parameters to the program database;
  2. retrieving sample data from unknown models and submit them to allow support of those models in future releases of the program.

To do this, you can just use the main Total Open Station executable.

Warning

Remember: Total Open Station has no wizard, and you have to tune the serial port options using your prior knowledge of your total station (e.g. read the manual that came with it, look at other programs’ options).

See also

The Contributing to Total Open Station page to find out how to join the project and participate actively to the development.

Users of Total Open Station

So far, Total Open Station has been successfully used by:

If you’re in the number of happy users, let us know.

Glossary

input format
An input format is the way data downloaded from the total station are encoded. This might include a default order for X, Y and Z coordinates, particular ways of prefixing each point with some distinctive text string and other features. Each input format is unique, and it requires a dedicated module. Input formats are not readable by common CAD or GIS software packages, and it is TOPS’s work to export them. These formats have a standard name, either given by the manufacturer or by the TOPS development team.
model
When we refer to a model we mean all total stations that have the same brand name and manufacturer (e.g. all those labeled “Trimble Geodimeter 600”).
output format
A format readable by GIS, CAD or any sort of common software, like CSV or DXF.
serial-USB adapter
While most total stations have a serial interface (port and cable), modern PCs and laptops tend to have just USB ports. In such cases, it is possible to use a serial-USB adapter cable, that enables you to connect the total station to one of your USB ports. Depending on your platform, the device might be identified as /dev/ttyUSB0 or COM5.

Frequently Asked Questions (and some answers!)

I cannot connect to the COM port on Windows

If you get errors like:

SerialException: could not open port COM4: [Error 5] Access denied

try disabling and enabling again the COM port from the control panel. Often these errors show a flip-flop behavior: opening a serial port works fine the first time, but not the second. This is because serial ports need to be explicitly closed by programs, otherwise they will remain blocked.

Also, tools like Portmon help with troubleshooting problems with serial ports on Windows.

Development

Contributing to Total Open Station

Total Open Station is free software, released under the GNU General Public License v3 or (at your option) any later version.

Development is tracked with git. The main development repository is at GitHub where it’s easy to fork the source code.
Experiments are welcome. Git allows for easy branching: you are encouraged to clone our repository and go crazy with new features, formats.

Coding guidelines

We try to follow as much as possible PEP-8

String formatting

A lot of the functionality of Total Open Station is centered around text manipulation, both when parsing input data and exporting to output formats. For this reason the maintainters decided to standardize on usage of string formatting with the aim of making the code more readable and consistent.

In short:

  • use f-strings everywhere in the totalopenstation package
  • the scripts in the scripts directory are the three user-facing programs that need their messages translated (see translations below): use old-style string formatting (also known as %-formatting or printf-style string formatting) for all string formatting in these scripts
  • do not use the str.format() method

F-strings were introduced in Python 3.6, they are faster than other methods and allow writing code that is both more readable and less verbose. However f-strings are not compatible with gettext, the module used for translation.

Translations
Helping

The main tool we use for translating Total Open Station is Transifex.

We are happy to accept translations for Total Open Station. Translations can be easily submitted and reviewed at our Transifex page. Translators get recognition for their valuable work.

If your native language is missing, why don’t you start translating Total Open Station right now?

Releasing

When the release is approaching and the source strings are not going to change, declare string freeze. Source messages should be updated with one of xgettext, pygettext or Babel (with the extract_messages command), producing totalopenstation.pot, e.g.:

xgettext  scripts/*.py -o locale/totalopenstation.pot

The resulting PO template file mut be uploaded to Transifex for translators to work with:

tx push -s

If there is an existing translation, msgmerge or Babel update_catalog should be used to update.

Translators should be invited to submit new translations, either via .po files or Transifex.

When the translation period is over, pull the updated .po files from Transifex with:

tx pull -r totalopenstation.totalopenstation-app -a

and check that the files are updated. Commit new files separately from updates.

If using Babel, compile the translated messages with:

python setup.py compile_catalog -d locale

Using Total Open Station as a library

All the functionality implemented in Total Open Station can be used independently, with the exception of the user interfaces.

In other words, the classes for reading specific formats and those for writing well-known formats are entirely usable on their own.

This is a feature.

Example: a web app for converting total station data

If you want to see how to write a web app to convert total station data in 50 lines of Python code, check out TOPS in the Cloud. It is made with Flask and shows how to use Total Open Station as a programming library.

Warning

TOPS in the Cloud is not maintained and does not receive security updates. Please don’t use it in production.

Developing with Total Open Station

General remarks
Adding a new format

There are hundreds of survey data formats out there. One by one, we will get them added into Total Open Station. Here’s a general process that defines some minimum requirements when implementing new formats as input or output.

Documentation

Always write documentation for the format. Add a new document in the docs/input_formats/ directory or amend the docs/output_formats/of_implemented.rst file of the source tree with a bare description, including:

  • raw (polar) or processed (cartesian) format
  • fixed-position based or fluid – this changes the way the parser should work (input format)
  • which devices, manufacturers or software use this format
  • name of contributors
  • reference to the format if available

Shortcomings of Total Open Station that the format exposes shouldn’t be hidden, but rather made explicit both in code and documentation.

Sample data

Never commit support for a new format without including the relevant sample data in the sample_data directory. Generally speaking, sample data files should follow these simple rules:

  • quality is better than quantity, so prefer a smaller file with many different corner cases rather than a larger file with a bulk of ordinary data
  • multiple files are OK, if they serve the purpose of showing different issues with the format
  • files should be named with the same name of the Python module that implements the format, using a .tops extension, like topcon_gts.tops for a format implemented in a module named topcon_gts.py – this will allow for simple automated tests
Code

When you have fulfilled the two previous tasks, you can start writing code (or at least you should pretend doing that). New code is always better than old code, because you have learned better programming techniques, or because you are more confident with Total Open Station. Writing tests for your code isn’t (yet) required, but it’s highly encouraged. Don’t break current practice.

All code implementing new formats should not break the existing API. Changing the API should be done at the scale of the entire library, to take into account the many different needs of each format and parser. The development of Total Open Station is not in a stable shape, so expect the API to change in future versions. However, please understand that a new format parser is not the right place to do that.

Processing data

Total Open Station use GeoJSON as its internal processing data following the RFC 7946 standard.
The library used to handle this format is PyGeoif.

Thus, all data are build around a formats.Feature class.
To be able to evaluate which type of data a formats.Feature holds, a descriptor has been added as a property.
Those descriptors are:

Descriptor Explanation Construction
PT
Simple point
only coordinates
Feature(point,
        desc='PT',
        id=pid,
        point_name=point_name,
        dist_unit=dist_unit,
        attrib=attrib)
PO
Complexe point
all information needed to compute coordinates
Feature(point,
        desc='PO',
        id=pid,
        point_name=point_name,
        angle_unit=angle_unit,
        z_angle_type=z_angle_type,
        dist_unit=dist_unit,
        dist_type=dist_type,
        azimuth=azimuth,
        angle=angle,
        z_angle=z_angle,
        dist=dist,
        th=th,
        ih=ih,
        ppm=ppl,
        prism_constant=prism_constant,
        station_name=station_name,
        attrib=attrib)
ST Station point data
Feature(point,
        desc='ST',
        id=pid,
        point_name=station_name,
        angle_unit=angle_unit,
        dist_unit=dist_unit,
        ih=ih,
        hz0=hz0,
        attrib=attrib)
BS Backsight information
Feature(point,
        desc='BS',
        id=pid,
        point_name=point_name,
        angle_unit=angle_unit,
        circle=circle)

Types of values passed to the formats.Feature class are :

Feature(Point class,
        desc=str,
        id=int,
        point_name=str,
        angle_unit=str,
        z_angle_type=str,
        dist_unit=str,
        dist_type=str,
        angle=float,
        z_angle=float,
        dist=float,
        th=float,
        ih=float,
        hz0=float,
        circle=float,
        ppm=float,
        prism_constant=float,
        station_name=str,
        attrib=list)

Those values are properties of the formats.Feature class.

Modules

For more in-depth knowledge of classes, we encourage reading the code @ Github.

Input Formats

This module is used as a base for parsing input files.

The main class is formats.Parser.

Each input format module has a child class named FormatParser(Parser).

Classes
class formats.Point(*args)

Bases: pygeoif.geometry.Point

class formats.LineString(coordinates)

Bases: pygeoif.geometry.LineString

class formats.Feature(geom, desc, id=None, **properties)

Bases: pygeoif.geometry.Feature

A GeoJSON-like Feature object.

geometry
desc

Return the desc property

point_name

Return the point_name property

class formats.FeatureCollection(features)

Bases: pygeoif.geometry.FeatureCollection

class formats.Parser(data)

Bases: object

Parses a single string of raw data.

This means that if you plan to load data from a file you have to pass the output of open(file).read() to this class.

Parameters:data (str) – A string representing the file to be parsed.
Variables:data (str) – A string representing the file to be parsed could be overridden by the init method.
is_point(line)

Action for finding which parts of the source file are points.

This method must be overridden in the child class to have a working parser.

Returns:A boolean
get_point(line)

Action for getting points from source file.

This method must be overridden in the child class to have a working parser.

Returns:A formats.Feature object.
split_points()

Action for splitting points.

Defaults to splitlines() because most formats have one point per line.

Override this method if the format is different.

build_linestring()

Join all Point objects into a LineString.

Returns:A formats.LineString object.
points

Action for parsing a source file and for finding points.

This method could be overridden in the child class to have a working parser.

Returns:A list of GeoJSON-like Feature object representing points coordinates.
raw_line

Action for parsing a source file and for retrieving raw data.

This method must be overridden in the child class to have a working parser.

Returns:A list of GeoJSON-like Feature object representing representing raw data i.e. polar coordinates and other informations.
formats.check_coordorder(coordorder)

Check if coordinates order is valid.

Parameters:coordorder (str) – A string representing the type of coordinates i.e. NEZ or ENZ.
Constants
  • formats.BUILTIN_INPUT_FORMATS

    Dictionnary that holds all input formats available in Total Open Station.

    Form of the dictionnary :

    {
    ‘parser_name’: (‘module_parser_name’, ‘FormatParser’, ‘Parser Name’),
    }

  • formats.UNITS_CIRCLE

    Dictionnary that holds angle corresponding to the complet ride of a circle per units.

    Form of the dictionnary :

    {
    ‘name’: numeric value of complet ride,
    }

  • formats.UNKNOWN_STATION

    formats.Point that holds arbitary coordinates of an unknown station.
    These coordinates are not egals to zero to avoid negativ coordinates during computation.

    Point(10000, 10000, 100)

  • formats.UNKNOWN_POINT

    formats.Point that holds arbitary coordinates of an unknown point.
    These coordinates are negatives to be able to check them during computation.

    Point(-1, -1, -1)

  • formats.COORDINATE_ORDER

    tuple that holds possible coordinates order in some input formats.

    (‘NEZ’, ‘ENZ’)

Models

This module is used as a base for models submodules.

The main class is models.Connector.

Each model module has a child class named ModelConnector(Connector).

Classes
Constants
  • BUILTIN_MODELS

    Dictionnary that holds all models available in Total Open Station.

    Form of the dictionnary :

    {
    ‘model_name’: (‘module_name’, ‘ModelConnector’ or ‘CustomConnector’, ‘Model Name’),
    }

Output Formats

There is not yet a main module with a parent class for output formats.

By the way, the main class is output.Builder.

Each output format module has a child class named OutputFormat(Builder).

Classe
class output.Builder(data)

Bases: object

process()

Action for building the output string.

This method must be overridden in the child class to have a working builder.

Process the input data (processing data). This is because we want to keep the generation of output separated from saving it to disk.

Returns:A string representing the value to output.
Return type:str
Constants
output.BUILTIN_OUTPUT_FORMATS

Dictionnary that holds all output formats available in Total Open Station.

{
‘dxf’: (‘tops_dxf’, ‘OutputFormat’, ‘DXF’),
‘csv’: (‘tops_csv’, ‘OutputFormat’, ‘CSV’),
‘sql’: (‘tops_sql’, ‘OutputFormat’, ‘OGC-SQL’),
‘dat’: (‘tops_dat’, ‘OutputFormat’, ‘DAT’),
‘txt’: (‘tops_txt’, ‘OutputFormat’, ‘Text’),
‘geojson’: (‘tops_geojson’, ‘OutputFormat’, ‘GeoJSON’),
}

Test suits

This module is used for test purpose.

Each new format or new function should have a test suits.

Classes

Releasing a new Total Open Station version

Documentation

The documentation is included in the source tree, and is published online at http://totalopenstation.readthedocs.org/.

Manual pages for the three scripts provided with TOPS are not available at the moment.

Release

The version number is declared in totalopenstation/__init__.py and is propagated in other places from there, including setup.py and the “About” dialog.

A source distribution is made using:

python setup.py sdist

A built distribution is made using (e.g. for Windows installer):

python setup.py bdist --formats wininst

We are currently following the Python Packaging User Guide and distributing sources and wheels.

Windows portable app

A portable Windows app is built with PyInstaller. From the root directory of the source repository of Total Open Station:

` python.exe -m venv pyinst-env source pyinst-env/Scripts/activate pip.exe install -e . pip.exe install PyInstaller pyinstaller.exe totalopenstation-gui.spec `

This will create the file dist/totalopenstation.exe, a portable single-file executable that will run from any compatible Windows system, even from USB sticks

Warning

An executable built on 64 bit systems will not run on 32 bit systems

Who is doing this?

Total Open Station is mainly developed as part of the IOSA project by Stefano Costa and Luca Bianconi, archaeologists.

Damien Gaignon, land surveyor, has joined the project in september 2015.

Total Open Station is licensed under the GNU General Public License version 3 or, at your option, any later version.

The application icons are copyright by Lapo Calamandrei 2008.