Documentation

PyVerm is a Python-Package for geodetic and surveying calculations. The main focus is on calculations for surveying in switzerland, but PyVerm should be as versatile as possible. In addition to its use in education and research, it should also be possible to use it as a component for software development.

class pyverm.ObservationPolar(**kwargs)[source]
__init__(**kwargs)[source]

Represent a polar observation with all associated values as simple and usable as possible.

Despite all attributes are optional, depending on the function certain attributes must be present.

Todo

  • Document the reduction of the raw values
  • implement the reduction of the distance
  • add unittest for this class
Parameters:
  • reduced_targetpoint (tuple or pyverm.Point) – (optional) Point which was measured with this observation
  • reduced_horizontal_angle (float or decimal) – (optional) horizontal angle in gon with all corrections
  • reduced_zenith_angle (float or decimal) – (optional) zenith angle in gon with all corrections
  • reduced_distance (float or decimal) – (optional) distance in meters with all corrections
  • raw_horizontal_angle (float or decimal) – (optional) horizontal angle in gon
  • raw_horizontal_angle_2 (float or decimal) – (optional) horizontal angle in gon in second direction
  • raw_zenith_angle (float or decimal) – (optional) zenith angle in gon
  • raw_zenith_angle_2 (float or decimal) – (optional) zenith angle in gon in second direction
  • raw_distance (float or decimal) – (optional) distance in meters not yet implemented
  • raw_distance_2 (float or decimal) – (optional) distance in meters in second direction not yet implemented
reduced_horizontal_angle

Return reduced_horizontal_angle or if None and raw in two direction present, return calculated reduced angle :return:

reduced_zenith_angle

Return reduced_zenith_angle or if None and raw in two direction present, return calculated reduced angle :return:

class pyverm.Station(standpoint, orientation)[source]
stakeout(point)[source]

Return the observation values, which are needed to stakeout the given point.

Parameters:point (tuple or pyverm.Point) – point to stakeout
Returns:ObservationPolar object
Return type:pyverm.ObservationPolar
survey(observation)[source]

Returns the Point, which was surveyed with the given observation.

Parameters:observation (pyverm.ObservationPolar) –
Returns:Point object
Return type:pyverm.Point
class pyverm.Point(y, x, z)
x

Alias for field number 1

y

Alias for field number 0

z

Alias for field number 2

pyverm.azimuth(point_a, point_b)[source]

Return the azimuth form point A to point B.

The azimuth is the clockwise angle from the north (x axis) and the connecting line from point a to point b. It is calculated with the following formula:

\[azimuth = \arctan2 (\Delta y / \Delta x)\]
Parameters:
Returns:

azimuth in gon

Return type:

Decimal

pyverm.distance(point_a, point_b)[source]

Return the 2D distance from point A to Point B.

\[distance = \sqrt{\Delta y^2 + \Delta x^2}\]
Parameters:
Returns:

distance in meters

Return type:

Decimal

pyverm.station(standpoint, orientation)[source]

Return a station with standpoint and orientation.

Parameters:
  • standpoint (tuple or pyverm.Point) – standpoint
  • orientation (int or decimal) – azimuth of null direction
Returns:

Station object

Return type:

pyverm.Station

pyverm.station_abriss(standpoint, observations)[source]

Calculate the orientation from the observations and return the station object.

\[abriss = \frac{\sum_{i=1}^{n} (azimuth_{standpoint_{i}\rightarrow targetpoint_{i}} - horizontal\:angle_{i})}{n}\]
Parameters:
  • standpoint (tuple or pyverm.Point) – standpoint
  • observations (list or tuple with pyverm.ObservationPolar) – a list or a tuple containing the Observations
Returns:

Station object

Return type:

pyverm.Station

pyverm.station_helmert(observations)[source]

Calculate the standpoint and orientation and return the station object.

The station is calculated locally an then transformed in the coordinate system truth a helmert transformation. The orientation gets determined over an abriss.

Parameters:observations (list or tuple with pyverm.ObservationPolar) – a list or a tuple containing the Observations
Returns:Station object
Return type:pyverm.Station
pyverm.transformation_helmert(sourcepoints, destinationpoints)[source]

Calculates the transformation and returns a Transformation object.

Parameters:
  • sourcepoints (list or tuple with pyverm.Point) – the source points for the transformation
  • destinationpoints (list or tuple with pyverm.Point) – the destination points for the transformation
Returns:

Transformation object

Return type:

pyverm.Station