SurveyingCalculation developer’s documentation

A QGIS plugin to solve surveying calculations.

  1. 2014 by DigiKom Ltd <mail@digikom.hu>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This script initializes the plugin, making it known to QGIS.

SurveyingCalculation.classFactory(iface)[source]

Load SurveyingCalculation class from file SurveyingCalculation.

Parameters:iface – a QGIS interface instance (QgsInterface)

Entry modul for the QGIS plug-in

Platforms: Linux, Windows

class SurveyingCalculation.surveying_calculation.SurveyingCalculation(iface)[source]

SurveyingCalculation QGIS Plugin Implementation.

about()[source]

About box of the plugin

add_action(icon_path, text, callback, enabled_flag=True, add_to_menu=True, add_to_toolbar=True, status_tip=None, whats_this=None, parent=None)[source]

Add a toolbar icon to the InaSAFE toolbar.

Parameters:
  • icon_path – path to the icon for this action. Can be a resource path (e.g. ‘:/plugins/foo/bar.png’) or a normal file system path (str)
  • text – text that should be shown in menu items for this action (str)
  • callback – function to be called when the action is triggered (function)
  • enabled_flag – a flag indicating if the action should be enabled by default (bool). Defaults to True.
  • add_to_menu – flag indicating whether the action should also be added to the menu (bool). Defaults to True.
  • add_to_toolbar – flag indicating whether the action should also be added to the toolbar (bool). Defaults to True.
  • status_tip – optional text to show in a popup when mouse pointer hovers over the action (str)
  • parent – parent widget for the new action (QWidget). Defaults None.
  • whats_this – optional text to show in the status bar when the mouse pointer hovers over the action (str)
Returns:

the action that was created (Qaction). Note that the action is also added to self.actions list.

addp()

Add point(s) to coordinate list entering coordinates

batch_plotting()

Batch plots selected geometry items using the selected template and scale.

calculations()[source]

Single point calculations (orientation, intersection, resection, freestation)

create_coordlist()[source]

Create a new coordinate list from template and add to layer list. Layer/file name changed to start with ‘coord_’ if neccessary.

create_fb()

Create a new empty fieldbook from template and add to layer list. Layer/file name changed to start with ‘fb_’ if neccessary.

help()[source]

Open user’s guide of the plugin in the default web browser.

initGui()[source]

Create the menu entries and toolbar icons inside the QGIS GUI.

load_fieldbook()[source]

Import an electric fieldbook from file (GSI, JOB/ARE, ...)

networks()[source]

Various network adjustments (1D/2D/3D)

polygon_division()

accept a line from the user to divide the selected polygon on active layer

transformation()[source]

Various coordinate transformations (orthogonal, affine, polynomial)

traverses()[source]

Various traverse claculations

unload()[source]

Removes the plugin menu item and icon from QGIS GUI.

Area division dialog

Platforms: Linux, Windows

class SurveyingCalculation.area_dialog.AreaDialog(total_area, div_area, rotate)[source]

Class for area division dialog

onCancelButton()[source]

Reject dialog

onDivideButton()[source]

Check input and accept dialog

reset()[source]

Reset dialog to initial state

showEvent(event)[source]

Set up initial state of dialog widgets

Parameters:event – NOT USED

Base classes, functions

Platforms: Linux, Windows

class SurveyingCalculation.base_classes.Angle(value, unit='RAD')[source]

Angle class, value stored in radian internally

get_angle(out='RAD')[source]

Get angle value in different units

Parameters:out – output unit (str RAD/DMS/DEG/GON/NMEA/PDEG/SEC/MIL)
Returns:value (float or string)
set_angle(value, unit='RAD')[source]

Set or change value of angle.

Parameters:
  • value – new value for angle (str or float)
  • unit – unit for the new value (str)
class SurveyingCalculation.base_classes.Circle(p1, p2, p3=None)[source]

circle object

class SurveyingCalculation.base_classes.Distance(d, m='SD')[source]

Distance observation

class SurveyingCalculation.base_classes.Point(id, e=None, n=None, z=None, pc=None, pt=None)[source]

Point class

class SurveyingCalculation.base_classes.PolarObservation(tp, station=None, hz=None, v=None, d=None, th=None, pc=None)[source]

Polar observation class

class SurveyingCalculation.base_classes.Station(p, o)[source]

station data

SurveyingCalculation.base_classes.bearing(p1, p2)[source]

Calculate whole circle bearing :param p1: station point :param p2: target point :returns: bearing (Angle)

SurveyingCalculation.base_classes.compare(a, b, tol=0.001)[source]

Compare to objects for equality. Only for testing purposes.

Parameters:
  • a – first instance
  • b – second instance
SurveyingCalculation.base_classes.distance2d(p1, p2)[source]

Calculate horizontal distance between two points :param p1: start point (Point) :param p2: end point (Point) :returns: distance (Distance)

SurveyingCalculation.base_classes.distance3d(p1, p2)[source]

Calculate 3D distance between two points :param p1: start point (Point) :param p2: end point (Point) :returns: distance (Distance)

SurveyingCalculation.base_classes.intersecCC(circle1, circle2)[source]
Calculate intersection of two circles solving::
(x - x01)**2 + (y - y01)**2 = r1**2 (x - x02)**2 + (y - y02)**2 = r2**2
Parameters:
  • circle1 – center coordinates and radius of first circle (Circle)
  • circle2 – center coordinates and radius of first circle (Circle)
Returns:

two, one or none intersection as a list

SurveyingCalculation.base_classes.intersecLL(pa, pb, dap, dbp)[source]
Calculate intersection of two lines solving::
xa + t1 * sin dap = xb + t2 * sin dbp ya + t1 * cos dap = yb + t2 * cos dbp
Parameters:
  • pa – first point
  • pb – second point
  • dap – direction (bearing) from first point to new point
  • dbp – direction (bearing) from second point to new point
Returns:

xp yp as a list or an empty list if lines are near paralel

SurveyingCalculation.base_classes.tr(message)

Get the translation for a string using Qt translation API. We implement this ourselves since we do not inherit QObject.

Parameters:message – string for translation (str, QString)
Returns:translated version of message (QString)

Batch plotting GUI

Platforms: Linux, Windows

class SurveyingCalculation.batch_plotting_dialog.BatchPlottingDialog(iface, batch_plotting)[source]

Class for batch plotting dialog

fillLayersCombo()

Fill the polygon layers combobox.

fillTemplateList()[source]

Fill the listbox of composer template files.

onCloseButton()[source]

Close the dialog when the Close button pushed.

onPlotButton()[source]

Batch plots selected geometry items using the selected template and scale.

onTempDirButton()[source]

Change the directory that contains print composer templates.

showEvent(event)

Reset dialog when receives a show event.

Mathematical calculations

class SurveyingCalculation.calculation.Calculation[source]

Container class for calculations. Pure static class.

static affine_transformation(plist)[source]

Calculate parameters of affine transformation. Six parameters:: E = E0 + a * e + b * n N = N0 + c * e + d * n

Parameters:plist – a list of common points used in the transormation plist[i]==[srci,desti]
Returns:the list of transformation parameters {E0 N0 a b c d}
static gauss_elimination(a, b)[source]
Solve a linear equation system::
a * x = b
Parameters:
  • a – coefficients of the equation system (list of lists)
  • b – list of pure term of equations
Returns:

(unknowns, inverse_matrix)

static intersection(s1, obs1, s2, obs2)[source]

Calculate intersection

Parameters:
  • s1 – station 1 (Station)
  • obs1 – observation from station 1 (PolarObservation)
  • s2 – station 2 (Station)
  • obs2 – observation from station 2 (PolarObservation)
Returns:

intersection point (Point)

static orientation(st, ref_list)[source]

Orientation calculation for a station

Parameters:
  • st – station (Station)
  • ref_list – list of [Point, PolarObservation] lists
Returns:

average orientation angle (Angle) None if no reference direction at all or in case of error

static orthogonal3tr(plist)[source]

Calculate parameters of orthogonal transformation. Three parameters:: E = E0 + cos(alpha) * e - sin(alpha) * n N = N0 + sin(alpha) * e + cos(alpha) * n

Parameters:plist – a list of common points used in the transormation plist[i]==[srci,desti]
Returns:the list of transformation parameters {E0 N0 alpha}
static orthogonal_transformation(plist)[source]

Calculate parameters of orthogonal transformation. Four parameters scale, rotation and offset.:: E = E0 + c * e - d * n N = N0 + d * e + c * n

Parameters:plist – a list of common points used in the transormation plist[i]==[srci,desti]
Returns:the list of transformation parameters {E0 N0 c d}
static polarpoint(st, obs)[source]

Calculate coordinates of a point measured by an independent radial measurement

Parameters:
  • st – station (Station)
  • obs – observation from station to the unknown point (PolarObservation)
Returns:

the polar point with new coordinates (Point)

static polynomial_transformation(plist, degree=3)[source]

Calculate parameters of polynomial (rubber sheet) transformation.:: X = X0 + a1 * x + a2 * y + a3 * xy + a4 * x^2 + a5 * y^2 + ... Y = Y0 + b1 * x + b2 * y + b3 * xy + b4 * x^2 + b5 * y^2 + ...

Parameters:
  • plist – a list of common points used in the transformation plist[i]==[srci,desti]
  • degree – degree of transformation 3/4/5
Returns:

the list of parameters X0 Y0 a1 b1 a2 b2 a3 b3 ... and the weight point coordinates in source and target system

static resection(st, p1, p2, p3, obs1, obs2, obs3)[source]

Calculate resection

Parameters:
  • st – station (Station)
  • p1 – first control point (Point)
  • p2 – second control point (Point)
  • p3 – third control point (Point)
  • obs1 – observation from st to p1 (PolarObservation)
  • obs2 – observation from st to p2 (PolarObservation)
  • obs3 – observation from st to p3 (PolarObservation)
Returns:

coordinates of the resection point (Point) if it can be calculated; otherwise None

static traverse(trav_obs, forceFree=False)[source]

Calculate traverse line. This method can compute the following types of travesres

  1. open traverse (free): originates at a known position with known bearings and ends at an unknown position
  2. closed traverse at both ends and the start point has known bearings
  3. closed traverse at both ends and both endpoints has known bearings
  4. inserted traverse: closed at both ends but no bearings
Parameters:
  • trav_obs – a list of sublists consists of a Point and two PolarObservations, If the station member is not None the point is a station. Start point must have coordinates in case of type 1-4 and end points must have coordinates in case of type 2-4. Two observations are needed at the angle points. At the start point the second observation is required in case of type 1-3. At the end point the first observation is required in case of type 3.
  • forceFree – force free traverse calculation (Boole)
Returns:

a list of points which’s coordinates has been computed.

Config

Platforms: Linux, Windows

Variables set:

fontname:monospace font used in calculation results widgets
fontsize:font size used in calculation results widgets
homedir:start dir used for loading fieldbooks
log_path:path to log file
line_tolerance:snapping tolerance to line tool
area_tolerance:area tolerance for area division :max_iteration: maximal number of iterations for area division

Interface to GNU Gama

Platforms: Linux, Windows

class SurveyingCalculation.gama_interface.GamaInterface(dimension=2, probability=0.95, stdev_angle=3, stdev_dist=3, stdev_dist1=3)[source]

Interface class to GNU Gama

add_observation(obs)[source]

Add observation to adjustment

Parameters:obs – observation to add (PolarObservation)
add_point(point, state='ADJ')[source]

Add point to adjustment

Parameters:
  • point – point to ad network (Point)
  • state – FIX or ADJ (str)
adjust()[source]

Export data to GNU Gama xml, adjust the network and read result

Returns:result list of adjusment from GNU Gama
remove_last_observation(st=False)[source]

remove last observation or station data

Parameters:st – False remove single observation, True remove station (Bool)

Rubberband line tool

Platforms: Linux, Windows

class SurveyingCalculation.line_tool.LineMapTool(iface)[source]

Class implements rubberband line tool for polygon division

canvasMoveEvent(e)[source]

handler to handle mouse move event

Parameters:e – event
canvasPressEvent(e)[source]

handler to handle left button down, start rubberband line

Parameters:e – event
canvasReleaseEvent(e)[source]

Handler to handle left button up, end rubberband line

Parameters:e – event
deactivate()[source]

deactivate line tool

divide()

Divide the selected polygon.

Parameters:
  • area – area to divide (float)
  • rotate – rotate/offset True/False (bool)
reset()[source]

reset rubberband line tool to original state

showLine()[source]

Draw rubberband line

Network adjustment calculation GUI

Platforms: Linux, Windows

class SurveyingCalculation.network_dialog.NetworkDialog(log)[source]

Class for network calculation dialog

onAddAdjButton()[source]

Move selected points to adjusted list

onAddFixButton()[source]

Move selected points to fix point list

onCalcButton()[source]

Collect observations and adjust network

onCloseButton()[source]

Close dialog after Close button pressed

onHelpButton()

Open user’s guide at Network Adjustment in the default web browser.

onRemoveAdjButton()[source]

Move back selected points from adjusted list

onRemoveFixButton()[source]

Move back selected points from fixed list

onResetButton()[source]

Reset dialog to initial state after Reset button pressed

reset()[source]

Reset dialog to initial state

showEvent(event)[source]

Set up initial state of dialog widgets

Parameters:event – NOT USED

Add new point GUI

Platforms: Linux, Windows

class SurveyingCalculation.new_point_dialog.NewPointDialog[source]

Class for new point dialog

onAddButton()[source]

Check input data and add point to the coordinate list

onCloseButton()[source]

Close dialog after Close button pressed

onResetButton()[source]

Reset dialog to initial state after Reset button pressed

reset()[source]

Reset dialog to initial state

showEvent(event)[source]

set up initial state of dialog

Parameters:event – NOT USED

Text file loging

Platforms: Linux, Windows

class SurveyingCalculation.resultlog.ResultLog(logfile, repeat_count=3)[source]

File based logging for Surveying Calculations. Events & calculation results are logged into this file.

reset()[source]

Delete content of log file

write(msg='')[source]

Write a simple message to log

Parameters:msg – message to write
write_log(msg)[source]

Write log message with date & time

Parameters:msg – message to write

Single point calculations

Platforms: Linux, Windows

class SurveyingCalculation.single_dialog.SingleDialog(log)[source]

Class for single point calculation dialog (intersection, resection, ...)

fillSourceList()[source]

Change dialog controls when an other calculation type selected.

fillStationCombos()[source]

Change dialog controls when an other calculation type selected.

onAddAllButton()[source]

Add all target points to used points list.

onAddButton()[source]

Add selected target points to used points list.

onCalcButton()[source]

Start a calculation when the Calculate button pushed.

onCloseButton()[source]

Close the dialog when the Close button pushed.

onHelpButton()

Open user’s guide at Single Point Calculations in the default web browser.

onRemoveAllButton()[source]

Remove all used points and add to target points list.

onRemoveButton()[source]

Remove selected used points and add to target points list.

onResetButton()[source]

Reset dialog when the Reset button pushed.

radioClicked()[source]

Change dialog controls when an other calculation type selected.

reset()[source]

Reset dialog to initial state

showEvent(event)[source]

Reset dialog when receives a show event.

Parameters:event – NOT USED
stationComboChanged()[source]

Init source and target list when one of two station combobox changed.

Utility functions to QGIS interface

Platforms: Linux/Windows

class SurveyingCalculation.surveying_util.ScPoint(p, coo=None)[source]

Extended point class to store table position.

get_coord()[source]

Get the coordinates of the point from coord table and update coordinate fields.

set_coord(p)[source]

Set the coordinates.

Parameters:p – Point
store_coord(dimension=3, clist=None)[source]

Update coordinates in coord table, insert new point if coo is None or point not found.

Parameters:
  • dimension – 2/3D coordinates to store (int)
  • clist – name of layer to add (str)
SurveyingCalculation.surveying_util.get_coord(p, clist=None)[source]

Get the coordinates of a point.

Parameters:
  • p – point number (str)
  • clist – coordinate list to search for (str), optional
Returns:

Point object with coordinates

SurveyingCalculation.surveying_util.get_coordlist()[source]

Find the coordinate list point shape in the actual project.

Returns:layer name or None
SurveyingCalculation.surveying_util.get_fblist()[source]

Find the fieldbook tables in the actual project.

Returns:layer name or None
SurveyingCalculation.surveying_util.get_features(layername, ftype=None, selected=False)

Create a list of selected or all features from a given layer possibly with given type.

Parameters:
  • layername – name of the layer
  • ftype – type of features to add to the list (if None - all features)
  • selected – if True only selected features will be added to the list
Returns:

list of feature geometries (QgsGeometry list)

SurveyingCalculation.surveying_util.get_fieldbookrow(point_id, fieldbook, fid)[source]

Reads a fieldbook row and put into a PolarObservation object.

Parameters:
  • point_id – point number/name (str)
  • fieldbook – name of fieldbook (str)
  • fid – id in fieldbook (int)
Returns:

observation to the point or a station (PolarObservation)

SurveyingCalculation.surveying_util.get_fieldlist(vlayer)[source]

Create a list of fields.

Parameters:vlayer – vector layer
Returns:list of fields
SurveyingCalculation.surveying_util.get_fieldnames(vlayer)[source]

Create a list from column names of a vector layer.

Parameters:vlayer – vector layer
Returns:sorted list of field names
SurveyingCalculation.surveying_util.get_known(dimension=2, clist=None)[source]

Get list of known points.

Parameters:
  • dimension – 1/2/3 point dimension, default: 2
  • clist – single coordinate list to search, default None (all lists)
Returns:

list of point ids

SurveyingCalculation.surveying_util.get_layer_by_name(name)[source]

Look for a layer object by name.

Parameters:name – name of the layer (str)
Returns:layer object
SurveyingCalculation.surveying_util.get_measured(dimension=2)[source]

Get list of unknown points.

Parameters:dimension – 1/2/3 point dimension
Returns:list of point ids
SurveyingCalculation.surveying_util.get_namelist(pattern)[source]

Find layers matching name with the pattern.

Parameters:pattern – regexp pattern for layer name (str)
Returns:list of matching names or None
SurveyingCalculation.surveying_util.get_station(point_id, fieldbook, fid)[source]

Create a Station instance from a fieldbook row and from the coord table.

Parameters:
  • point_id – station number/name (str)
  • fieldbook – name of fieldbook (str)
  • fid – id in fieldbook (int)
Returns:

station (Station)

SurveyingCalculation.surveying_util.get_stations(known=False, oriented=False)[source]

Get list of stations from fieldbooks.

Parameters:
  • known – If True only known points get into list.
  • oriented – If True only oriented stations get into list.
Returns:

list of station [[point_id fieldbook_name id] ...]

SurveyingCalculation.surveying_util.get_target(point_id, fieldbook, fid)[source]

Create a PolarObservation instance of a target point from a fieldbook row.

Parameters:
  • point_id – point number/name (str)
  • fieldbook – name of fieldbook (str)
  • fid – id in fieldbook (int)
Returns:

observation on the point (PolarObservation)

SurveyingCalculation.surveying_util.get_targets(point_id, fieldbook, fid, known=False, polar=False)[source]

Collect observation data from one station.

Parameters:
  • point_id – station number/name (str)
  • fieldbook – name of fieldbook (str)
  • fid – id in fieldbook (int)
  • known – If True only known points get into list.
Returns:

list of target points [[point_id fieldbook_name id] ...]

SurveyingCalculation.surveying_util.get_unknown(dimension=2)[source]

Get list of measured points.

Parameters:dimension – 1/2/3 point dimension
Returns:list of [point id, True/False], second element marks if point have coordinates of dimension
SurveyingCalculation.surveying_util.get_vector_layers_by_type(ftype)

Find layers by the geometry type.

Parameters:ftype – type of layer (point, line, polygon)
Returns:list of polygon layers or None
SurveyingCalculation.surveying_util.set_orientationangle(point_id, fieldbook, fid, angle)[source]

Sets the orientation angle(hz) of the given station in the given fieldbook.

Parameters:
  • point_id – point number/name (str)
  • fieldbook – name of fieldbook (str)
  • fid – id in fieldbook (int)
  • angle – orientation angle (float)

Totalstation data import

Platforms: Linux, Windows

class SurveyingCalculation.totalstations.JobAre(fname, separator='=')[source]

Class to import JOB/ARE data from file

close()

Close dataset

dist_conv(dist)[source]

Convert distance/coordinate to meter using distance_unit

Parameters:dist – value to convert
Returns:distance in meters
get_line()

Read & split a single line

open()

Open data set

Returns:0 on success/1 on failure
parse_next()[source]

Parse an observation/station from input

Returns:list of observation data
trim_left(s, ch)

Strip left part of a string

Parameters:
  • s – string to left trim
  • ch – character to trim
Returns:

left trimmed string

class SurveyingCalculation.totalstations.LeicaGsi(fname, separator=' ')[source]

Class to read leica GSI 8/16 data

close()

Close dataset

convert(val, unit)[source]

Convert angle to radian, distance to meter

Parameters:
  • val – value to convert (float)
  • unit – unit & decimals (int)
Returns:

converted value (float)

get_line()

Read & split a single line

open()

Open data set

Returns:0 on success/1 on failure
parse_next()[source]

Parse single line from input

Returns:list of values
trim_left(s, ch)

Strip left part of a string

Parameters:
  • s – string to left trim
  • ch – character to trim
Returns:

left trimmed string

class SurveyingCalculation.totalstations.Sdr(fname, separator=None)[source]

Class to import Sokkia field books

angle(value)[source]

Convert angle to Gon

Parameters:value – angle to convert
Returns:angle in Gon
close()

Close dataset

dist(value)[source]

Change distance to meters

Parameters:value – value to convert
Returns:distance in meters
get_line()

Read & split a single line

open()

Open data set

Returns:0 on success/1 on failure
parse_next()[source]

Load next observation, station

Returns:observation data
pn(pbuf)[source]

Get point id from input buffer removing leading zeros

Parameters:pbuf – input buffer
Returns:point id
trim_left(s, ch)

Strip left part of a string

Parameters:
  • s – string to left trim
  • ch – character to trim
Returns:

left trimmed string

class SurveyingCalculation.totalstations.Stonex(fname, separator=', ')

Class to import STONEX ascii file

close()

Close dataset

get_line()

Read & split a single line

open()

Open data set

Returns:0 on success/1 on failure
parse_next()

Load next observation, station

Returns:observation data
trim_left(s, ch)

Strip left part of a string

Parameters:
  • s – string to left trim
  • ch – character to trim
Returns:

left trimmed string

class SurveyingCalculation.totalstations.SurvCE(fname, separator=', ')

Class to import SurvCE rw5 files

close()

Close dataset

get_line()

Read & split a single line

open()

Open data set

Returns:0 on success/1 on failure
parse_next()

Load next observation, station

Returns:observation data
trim_left(s, ch)

Strip left part of a string

Parameters:
  • s – string to left trim
  • ch – character to trim
Returns:

left trimmed string

class SurveyingCalculation.totalstations.TotalStation(fname, separator)[source]

Base class to load different total station data format

close()[source]

Close dataset

get_line()[source]

Read & split a single line

open()[source]

Open data set

Returns:0 on success/1 on failure
parse_next()[source]

Parse one line/logical unit of input, implemented in derived classes

trim_left(s, ch)[source]

Strip left part of a string

Parameters:
  • s – string to left trim
  • ch – character to trim
Returns:

left trimmed string

Transformation calculation GUI

Platforms: Linux, Windows

class SurveyingCalculation.transformation_dialog.TransformationDialog(log)[source]

Class for transformation calculation dialog

affine_tr(p, tr)[source]

Calculate affine transformation for a point

Parameters:
  • p – point to transform (Point)
  • tr – transformation parameters
Returns:

list of easting and northin of transformed coordinates

fill_common()[source]

Find common points in coordinate lists

onAddButton()[source]

Add selected points to used points in transformation

onCalcButton()[source]

Start transformation calculation

onCloseButton()[source]

Close dialog after Close button pressed

onHelpButton()

Open user’s guide at Coordinate Transformation in the default web browser.

onRemoveButton()[source]

Remove selected points from used points

onResetButton()[source]

Reset dialog to initial state after Reset button pressed

onToFileButton()[source]

Select target shape file

ortho_tr(p, tr)[source]

Calculate orthogonal transformation for a point

Parameters:
  • p – point to transform (Point)
  • tr – transformation parameters
Returns:

list of easting and northin of transformed coordinates

poly3_tr(p, tr)[source]

Calculate 3rd order polynomial transformation for a point

Parameters:
  • p – point to transform (Point)
  • tr – transformation parameters (list of lists)
Returns:

list of easting and northing of transformed coordinates

poly4_tr(p, tr)[source]

Calculate 4th order polynomial transformation for a point

Parameters:
  • p – point to transform (Point)
  • tr – transformation parameters
Returns:

list of easting and northin of transformed coordinates

poly5_tr(p, tr)[source]

Calculate 5th order polynomial transformation for a point

Parameters:
  • p – point to transform (Point)
  • tr – transformation parameters
Returns:

list of easting and northin of transformed coordinates

poly_tr(p, tr, degree)

Calculate nth order polynomial transformation for a point

Parameters:
  • p – point to transform (Point)
  • tr – transformation parameters
  • degree – degree of transformation
Returns:

list of easting and northin of transformed coordinates

reset()[source]

Reset dialog to initial state

showEvent(event)[source]

set up initial state of dialog

Parameters:event – NOT USED

Traverse calculation GUI

Platforms: Linux, Windows

class SurveyingCalculation.traverse_dialog.TraverseDialog(log)[source]

Class for traverse calculation dialog

fillOpenTraverseEndPoints()[source]

Change End Points combo with target points observed from the last point selected in Order List if open traverse is chosen.

fillStartEndPointsCombos()[source]

Change start and end point combo when an other traversing type selected.

fillTargetList()[source]

Change Target List when an other calculation type selected.

onAddButton()[source]

Add selected target point to used points list.

onCalcButton()[source]

Start a traverse calculation when the Calculate button pushed.

onCloseButton()[source]

Close the dialog when the Close button pushed.

onDownButton()[source]

Add selected target point to used points list.

onHelpButton()

Open user’s guide at Traverse Calculations in the default web browser.

onRemoveButton()[source]

Remove selected used point and add to target points list.

onResetButton()[source]

Reset dialog when the Reset button pushed.

onUpButton()[source]

Add selected target point to used points list.

radioClicked()[source]

Change dialog controls when an other calculation type selected.

reset()[source]

Reset dialog to initial state

showEvent(event)[source]

Reset dialog when receives a show event.