Geodesy

This module includes functions for geodetic calculations.

Convertions

geodepy.geodesy.enu2xyz(lat, lon, east, north, up)[source]

Convert a column vector in the local reference frame to a column vector in the Cartesian reference frame.

Parameters:
  • lat – latitude in decimal degrees

  • lon – longitude in decimal degrees

  • east – in metres

  • north – in metres

  • up – in metres

Returns:

x, y, z in metres

geodepy.geodesy.xyz2enu(lat, lon, x, y, z)[source]

Convert a column vector in the Cartesian reference frame to a column vector in the local reference frame.

Parameters:
  • lat – latitude in decimal degrees

  • lon – longitude in decimal degrees

  • x – in metres

  • y – in metres

  • z – in metres

Returns:

east, north, up in metres

Vincenty

geodepy.geodesy.vincdir(lat1, lon1, azimuth1to2, ell_dist, ellipsoid=<geodepy.constants.Ellipsoid object>)[source]

Vincenty’s Direct Formula

Parameters:
  • lat1 (float (decimal degrees), DMSAngle or DDMAngle) – Latitude of Point 1 (decimal degrees)

  • lon1 (float (decimal degrees), DMSAngle or DDMAngle) – Longitude of Point 1 (decimal degrees)

  • azimuth1to2 (float (decimal degrees), DMSAngle or DDMAngle) – Azimuth from Point 1 to 2 (decimal degrees)

  • ell_dist – Ellipsoidal Distance between Points 1 and 2 (metres)

  • ellipsoid – Ellipsoid Object

Returns:

  • lat2 - Latitude of Point 2 (Decimal Degrees),

  • lon2 - Longitude of Point 2 (Decimal Degrees),

  • azimuth2to1 - Azimuth from Point 2 to 1 (Decimal Degrees)

geodepy.geodesy.vincinv(lat1, lon1, lat2, lon2, ellipsoid=<geodepy.constants.Ellipsoid object>)[source]

Vincenty’s Inverse Formula

Parameters:
  • lat1 (float (decimal degrees), DMSAngle or DDMAngle) – Latitude of Point 1 (decimal degrees)

  • lon1 (float (decimal degrees), DMSAngle or DDMAngle) – Longitude of Point 1 (decimal degrees)

  • lat2 (float (decimal degrees), DMSAngle or DDMAngle) – Latitude of Point 2 (decimal degrees)

  • lon2 (float (decimal degrees), DMSAngle or DDMAngle) – Longitude of Point 2 (decimal degrees)

  • ellipsoid – Ellipsoid Object

Returns:

  • ell_dist - Ellipsoidal Distance between Points 1 and 2 (m),

  • azimuth1to2 - Azimuth from Point 1 to 2 (Decimal Degrees),

  • azimuth2to1 - Azimuth from Point 2 to 1 (Decimal Degrees)

geodepy.geodesy.vincdir_utm(zone1, east1, north1, grid1to2, grid_dist, hemisphere='south', ellipsoid=<geodepy.constants.Ellipsoid object>)[source]

Perform Vincenty’s Direct Computation using UTM Grid Coordinates, a grid bearing and grid distance.

Note: Point 2 UTM Coordinates use the Zone specified for Point 1, even if Point 2 would typically be computed in a different zone. This keeps the grid bearings and line scale factor all relative to the same UTM Zone.

Parameters:
  • zone1 – Point 1 Zone Number - 1 to 60

  • east1 – Point 1 Easting (m, within 3330km of Central Meridian)

  • north1 – Point 1 Northing (m, 0 to 10,000,000m)

  • grid1to2 – Grid Bearing from Point 1 to 2 (decimal degrees),

  • grid_dist – UTM Grid Distance between Points 1 and 2 (m)

  • hemisphere – String - ‘North’ or ‘South’(default)

  • ellipsoid – Ellipsoid Object (default: GRS80)

Returns:

  • zone2 - Point 2 Zone Number - 1 to 60

  • east2 - Point 2 Easting (m, within 3330km of Central Meridian)

  • north2 - Point 2 Northing (m, 0 to 10,000,000m)

  • grid2to1 - Grid Bearing from Point 2 to 1 (decimal degrees)

  • lsf - Line Scale Factor (for Point 1 Zone)

geodepy.geodesy.vincinv_utm(zone1, east1, north1, zone2, east2, north2, hemisphere='south', ellipsoid=<geodepy.constants.Ellipsoid object>)[source]

Perform Vincentys Inverse Computation using UTM Grid Coordinates.

Note: Where coordinates from different zones are used, UTM Grid Distance is relative to Point 1’s Zone. Grid Bearings of Points 1 and 2 are relative to each of their respective Zones.

Parameters:
  • zone1 – Point 1 Zone Number - 1 to 60

  • east1 – Point 1 Easting (m, within 3330km of Central Meridian)

  • north1 – Point 1 Northing (m, 0 to 10,000,000m)

  • zone2 – Point 2 Zone Number - 1 to 60

  • east2 – Point 2 Easting (m, within 3330km of Central Meridian)

  • north2 – Point 2 Northing (m, 0 to 10,000,000m)

  • hemisphere – String - ‘North’ or ‘South’(default)

  • ellipsoid – Ellipsoid Object (default: GRS80)

Returns:

  • grid_dist - UTM Grid Distance between Points 1 and 2 (m),

  • grid1to2 - Grid Bearing from Point 1 to 2 (decimal degrees),

  • grid2to1 - Grid Bearing from Point 2 to 1 (decimal degrees)

  • lsf - Line Scale Factor (for Point 1 Zone)

Other Geodetic Functions

geodepy.geodesy.line_sf(zone1, east1, north1, zone2, east2, north2, hemisphere='south', ellipsoid=<geodepy.constants.Ellipsoid object>, projection=<geodepy.constants.Projection object>)[source]

Computes Line Scale Factor for a pair of Transverse Mercator Coordinates.

Ref: Deakin 2010, Traverse Computations on the Ellipsoid and on the Universal Transverse Mercator Projection, pp 35 http://www.mygeodesy.id.au/documents/Trav_Comp_V2.1.pdf

Parameters:
  • zone1 – Station 1 Zone Number - 1 to 60

  • east1 – Station 1 Easting (m, within 3330km of Central Meridian)

  • north1 – Station 1 Northing (m, 0 to 10,000,000m)

  • zone2 – Station 2 Zone Number - 1 to 60

  • east2 – Station 2 Easting (m, within 3330km of Central Meridian)

  • north2 – Station 2 Northing (m, 0 to 10,000,000m)

  • hemisphere – String - ‘North’ or ‘South’(default)

  • ellipsoid – Ellipsoid Object (default GRS80)

  • projection – Projection Object (default Universal Transverse Mercator)

Returns:

Line Scale Factor (relative to Zone 1 if different zones are entered)

geodepy.geodesy.rho(lat, ellipsoid=<geodepy.constants.Ellipsoid object>)[source]

Return the radius of curvature of the ellipsoid in the meridian plane (rho) at a given latitude

Parameters:
  • lat – latitude in decimal degrees

  • ellipsoid – Ellipsoid Object

Returns:

rho at specified latitude

geodepy.geodesy.nu(lat, ellipsoid=<geodepy.constants.Ellipsoid object>)[source]

Return the radius of curvature of the ellipsoid in the prime vertical plane (nu) at a given latitude

Parameters:
  • lat – latitude in decimal degrees

  • ellipsoid – Ellipsoid Object

Returns:

nu at specified latitude