The SurveyingCalculation plugin was created by the DigiKom Ltd (Hungary). It was supported by the SMOLE II for Niras Finland Oy. It was developed for the Land Parcel Cadastre of Zanzibar.
The SurveyingCalculation plug-in can be used on any computer on which QGIS 2.x can run. It was tested on Windows 7 and Fedora Linux, but it should work on other Windows versions or Linux distros . QGIS version 2.2, 2.4 and 2.6 were used for testing the plugin.
The network adjustment and the free station calculation in the plug-in is based on the GNU Gama open source project. GNU Gama must be installed separately to use these calculations.
Installing from QGIS Plug-in repo
Installing from GitHub
If you have a Git client on your machine (Git Bash or other clients):
If you don’t have a Git client:
After installing the plug-in you must enable it in the Manage and Install Plugins dialog. Then the menu and the toolbar of the plug-in will be visible.
Is the SurveyingCalculation plugin switched on?
GNU Gama project: gama-local
Beside installing the plug-in you also have to install gama-local (part of the GNU Gama project) for free station and adjustment calculations. See: https://www.gnu.org/software/gama
Settings described in this section are optional.
Check and change the settings in the config.py file. The following variables can be set in the config:
fontname: monospace font used in the calculation results widgets on Linux, the default courier font doesn’t exists on most Linux boxes fontsize: font size used in the calculation results widgets on Linux homedir: starting directory used for loading fieldbooks from log_path: full path to log file, the program must have write access right to the directory and the file line_tolerance: snapping to vertex tolerance used by line tool area_tolerance: area tolerance for area division, if the difference between the actual area and the requested area is smaller than this value, the iteration is stopped max_iteration: maximal number of iterations for area division
If you change any value in the config.py file, the QGIS plug-in have to be reloaded or QGIS must be restarted.
Set the default coordinate reference system (CRS) for new projects and new layers on the CRS tab in the Setting/Options menu to the local CRS.
Set the Representation for NULL values to empty string on the Data sources tab in the Setting/Options menu. It makes the Attribute Table (Fieldbook) more readable.
Most of the cases you need an open coordinate list to store calculation results. Open an existing QGIS project which contains a coordinate list (a point shape file whose name have to start with coord_) or create a new project and add an existing coordinate list to the project by the add vector layer icon or create a new project and create a new coordinate list from the SurveyingCalculation/New coordinate list ... menu.
Check the coordinate reference system (CRS) of your coordinate list (Properties from the popup menu of the layer) and the map.
After loading an existing one or creating a new Coordinate list shape file, you get a point layer in your project with the following columns in the attribute table (column names and types are mandatory):
point_id: point number (string 20) e: East coordinate (number 12.3) n: North coordinate (number 12.3) z: Z coordinate (elevation) (number 8.3) pc: point code (string 20) pt: point type (string 20)
The first three columns (point_id, e and n) are obligatory, you have to fill them. You mustn’t rename or erase these columns but you can add new columns to the attribute table.
You can edit the coordinate list if you push Toggle Editing Mode for this layer. Be careful:
do not edit the coordinates manually, because the point position won't change automatically
do not add new point by mouse click, because the coordinate columns in the table won't change automatically
Use the Add new point dialog to update coordinates and location together.
Only one coordinate list should be open in a project at a time.
Observations made by total stations and GPS are stored in electric fieldbooks. The files storing the fieldbook data have to be downloaded to the computer before you can use them in the plug-in. Different fieldbook types are supported:
Any number of electric fieldbooks can be opened/loaded into a QGIS project. You can even create a new empty fieldbook and fill it manually.
There must be an open coordinate list in your actual project (a point layer whose name starts with coord_). Otherwise coordinates read from the filedbook will be lost
Click on the Load fieldbook icon or select it from the SurveyingCalculation menu
Choose the type of the fieldbook (Geodimeter JOB/ARE; Leica GSI; Sokkia CRD, SurvCE RW5, STONEX DAT)
Select the output DBF file where your observations will be stored, the name will start with fb_, the program will add it to the name automatically if you forget it
After giving the path to the DBF file the new fieldbook will be added to your QGIS project. The name of the fieldbook always starts with “fb_”. This database table stores measurements only, it has no graphical (map) data. Fields in the table:
id: ordinal number of observation in fieldbook, sort by this field normally point_id: point number (max 20 characters) station: if record data belongs to a station it must be station otherwise empty hz: horizontal angle or orientation angle in station record v: zenith angle sd: slope distance (horizontal distance if zenith angle is empty) th: target height or instrument height in station record pc: point code
You musn’t change the name of columns or erase them, but you can add new columns to the table.
The loader adds an extra column to the observation data, the id column, sorting the table by this column gives the right order of the observations.
You can create an empty fieldbook for manual input using the New fieldbook from the SurveyingCalculation menu.
Both the 8 byte and 16 byte GSI files are supported. As there are no standard markers for station start in GSI files, you can use code block to mark a new station in observations or you have to have a record with station coordinates or instrument height to mark the start of a new station.
Code block to mark the start of a station:
410001+00000002 42....+12012502 43....+00001430
Data codes handled, loaded from GSI:
11: point id 21: horizontal angle (hz) 22: vertical angle (v) 31: slope distance (sd) 41: code block 42: station id 43: station height 71: point code (pc) 81: easting 82: northing 83: elevation 84: easting of station 85: northing of station 86: elevation of station 87: target height (th) 88: station height (overwrites 43 code)
The different units in the electric fieldbook are converted to GON and meters during the import.
JOB and ARE are separate data files. Observations and optional coordinates are stored in JOB file. Only coordinates are stored in ARE file. After loading a .JOB you can optionally load an .ARE file in the same way.
Data codes handled, loaded from JOB/ARE:
2: station id 3: instrument height 4: point code (pc) 5: point id 6: target height (th) 7: horizontal angle (hz) 8: zenith angle (v) 9: slope distance (sd) 23: units 37: northing 38: easting 39: elevation 62: orientation point id
The different units in the electric fieldbook are converted into GON and meters during the import.
Sokkia CRD loader can handle two softly different file format SDR33 and SDR20.
Data records handled, loaded from CRD:
00: header record 02: station record 03: target height 08: coordinates 09: observations
The different units in the electric fieldbook are converted into GON and meters during the import.
The SurvCE program RW5 format can store total station and GPS observations. Both type of data can be loaded into QGIS.
Data records handled, loaded from CRD:
GPS: latitude, longitude from GPS receiver –GS/SP: projected coordinates (overwrites latitude, longitude) OC: station record TR/SS/BD/BR/FD/FR: observation record BK: orientation record LS: instrument height and target height record MO: units record
The different units in the electric fieldbook are converted into GON and meters during the import.
Unfortunately we had no description for this fieldbook format, we reverse engineered information from the sample file we got. GON angle units and meters are supposed for the data in the DAT file.
Data records handled, loaded from DAT:
K: station and orientation angle E: observation record B/C: coordinate record L: orientation direction record
Angles are displayed in the fieldbook in Grads (Gon) units with four decimals. Distances, instrument and target heights are in meters.
Sort the fieldbook by the id column, to have the right order of observations.
Data in the loaded fieldbooks can be changed, records can be inserted, updated and deleted. You can use the standard QGIS tools to change or extend fieldbook data. Open the fieldbook Attribute Table, turn on Toggle Editing Mode.
Insert record: Click on the Add feature button and fill in the record. Use the right id (first column) for the row to get the right position in the fieldbook.
Delete record: Select the records to be deleted and click on the Delete selected features button.
Update record: Double click on the field you want to change and edit the data.
After editing the fieldbook data you have to save the changes, click the Save Edits or Toggle Editing Mode button.
In the Add new point dialog you can manually add new points to the coordinate list. The Add new point dialog can be opened from the SurveyingCalculation menu. The Point ID, East, North fields must be filled, the others are optional. Use the Add button to add the point to the coordinate list. The Add button saves the new point and resets the form. The Close button closes the dialog window.
This dialog can be used to overwrite existing coordinates in the coordinate list, too. If you input an existing point, a warning will be displayed and you can decide whether to continue to store point.
You can use the standard QGIS Add Delimited Text Layer button to bulk import coordinates from CSV or TXT files. The restrictions are
Sample CSVT file to load coordinate lists:
String(20),Real(12.3),Real(12.3),Real(8.3),String(20),String(20)
During the calculations the plug-in will use the data from the opened fieldbooks (fb_ tables) and from the opened coordinate list (coord_ layer).
In the single calculation dialog you can calculate coordinates of single points using trigonometric formulas.
All calculations can be repeated, the last calculated values will be stored, the previous values are lost.
A SurveyingCalculation plug-in maintains a log file, a simple text file. The details of calculations are written to the log. The location of the log file can be set in the config.py.
In the different lists of the dialog you can see the fieldbook name and the id beside the point name. These are neccessary to distinguis stations if the same station was occupied more then once, or directions if the same direction was measured from the same station more than once.
Orientation of stations is neccessary to solve intersection, radial survey and some type of traversing line. During the orientation no coordinates are calculated.
To calculate orientation angle on a station do the following:
Beside the horizontal coordinates the elevation is also calculated for polar points if the instrument height, the target height and the station elevation are given.
You can calculate horizontal coordinates for one or more points, which directions were observed from two known stations.
Before the intersection calculation the used stations must be oriented.
To calculate intersection do the following:
You can calculate horizontal coordinates of a station if at least three known points were observed from there.
To calculate resection do the followings
You can calculate the horizontal coordinates of a station from directions and distances using the least squares method.
To calculate free station do the following:
The result list of the adjustment is very long. Consult the GNU Gama documentation for further details.
Free station calculation uses the default standard deviations (3cc, 3mm+3ppm) for the adjustment.
During the traverse calculations the plug-in will use the data from the opened fieldbooks (fb_ tables) and from the opened coordinate list (coord_ layer).
It is possible to calculate three different types of traverse.
To calculate traverse do the following:
Click on the Traverse Calculations icon in the toolbar to open the Traverse Calculations dialog.
Select the type of traverse from Type group.
Select the start point of traverse from the Start Point list.
Select the end point from the End Point list.
- In case of closed traverse the End Point list is disabled and changes according to the Start Point list.
- In case of link traverse the End Point list contains all known stations.
- In case of open traverse the End Point list contains the points measured from the last point in the Order of points list. Therefore the end point should be selected after inserting and sorting all angle points in the Order of points list.
The Target Points list is filled automatically. The points in bold face have coordinates.
Add the traverse points from the Target Points list to the Order of Points list one by one.
The order of traverse points can be changed with Up and Down button. If you would like to correct, use the Remove button.
In case of open traverse select the end point now.
Click on the Calculate button.
Results of calculation are displayed automatically in result widget and sent to the log file.
You can change settings in the dialog and press Calculate button to make another calculation, use the Reset button to reset the dialog to its original state.
In the result of calculation you can find the angle and coordinate corrections, and the coordinates of the traversing points.
During the network adjusment the plug-in will use the data from the opened fieldbooks (fb_ tables) and from the opened coordinate list (coord_ layer).
Network adjustment is the best method to calculate the most probably position of observed points, when more observations were made than neccessary. By the help of GNU Gama adjustment the blunder errors can be detected, eliminated.
Free network can also be adjusted, when there are no fixed coordinates in the network. In this case some points have to have approximate coordinates.
To calculate network adjustment do the following:
The result list of the adjustment is very long. Consult the GNU Gama documentation for further details.
Besides the on the fly reprojection service of QGIS, the SurveyingCalculation plug-in provides coordinate transformation based on common points having coordinates in both coordinate systems. Two separate coordinate lists have to be created with the coordinates in the two coordinate systems before starting the coordinate transformation.
The plug-in provides different types of transformation. The calculation of the transformation parameters uses the least squares estimation if you select more common points than the minimal neccessary.
Orthogonal transformation: at least two common points Affine transformation: at least three common points 3rd order transformation: at least ten common points 4th order transformation: at least fifteen common points 5th order transformation: at least twenty-one common points
At the beginning of the result list you can find the used common points with the coordinates in both systems and the discrepancies between the target and transformed coordinates. If you find big discrepancies in the list, there are mistakes in the coordinates. At the end of the list you can find transformed points where the discrepancies are empty. These points are added to the target coordinate list.
The coordinates of those common points which were not selected for the transformation won’t be changed in the target coordinate list.
With the Polygon Division tool you can divide a parcel into two at a given area. There are two possible division types:
Paralel to a given line: the line will be shifted until the right side polygon of the division line will have the given area. Through the first given point: the line will be rotated around the first point until the right side polygon of the division line will have the given area.
If the given divider line does not intersect the polygon border, the plug-in will extend the line. You can give a divider line outside the selected polygon, in this case only parallel division is available in the Area Division dialog.
This utility was added to the plugin for the ability to plot land parcels or other polygon type features automatically. The plugin offers two ways to achieve this:
Templates can be created by the print composer of QGIS (Save as template from the menu). Look at the QGIS documentation for help.
With Plot by template command you can plot the actual map view at the given scale.
In the end a composer window will appear with the map composition and it can be printed to a system printer or exported to PDF file.
With the “Batch plotting” command you can plot selected polygons from one layer using a composer template file. Batch plotting creates a QGIS atlas composition, which is a multi-page composition. One polygon will be on one page. In the dialog you can choose the output of the plot.
There are three possible outputs of batch plot: