Transforming¶
This module provides functions for transforming coordinates between different geodetic datums. It includes methods for performing Helmert transformations, functions for various common geodetic transformations and support for NTv2 2D grid-based transformations.
Helmert Transformations¶
- geodepy.transform.conform7(x, y, z, trans, vcv=None)[source]¶
Performs a Helmert 7 Parameter Conformal Transformation using Cartesian point co-ordinates and a predefined transformation object.
- Parameters:
x – Cartesian X (m)
y – Cartesian Y (m)
z – Cartesian Z (m)
trans – Transformation Object (note: this function ignores all time-dependent variables)
vcv – Optional 3*3 numpy array in Cartesian units to propagate tf uncertainty
- Returns:
Transformed X, Y, Z Cartesian Co-ordinates, vcv matrix
- geodepy.transform.conform14(x, y, z, to_epoch, trans, vcv=None)[source]¶
Performs a Helmert 14 Parameter Conformal Transformation using Cartesian point co-ordinates and a predefined transformation object. The transformation parameters are projected from the transformation objects reference epoch to a specified epoch.
- Parameters:
x – Cartesian X (m)
y – Cartesian Y (m)
z – Cartesian Z (m)
to_epoch – Epoch co-ordinate transformation is performed at (datetime.date Object)
trans – Transformation Object
vcv – Optional 3*3 numpy array in Cartesian units to propagate tf uncertainty
- Returns:
Cartesian X, Y, Z co-ordinates and vcv matrix transformed using Transformation parameters at desired epoch
- geodepy.transform.plate_motion_transformation(x, y, z, from_epoch, to_epoch, plate_motion, vcv=None)[source]¶
Preforms plate motion transformations using a helmert 14 conformal transformation.
- Parameters:
x – Cartesian X (m)
y – Cartesian Y (m)
z – Cartesian Z (m)
from_epoch – Epoch the co-ordinate transformation is from (datetime.date Object)
to_epoch – Epoch the co-ordinate transformation is to (datetime.date Object)
plate_motion – Plate motion model for transformation
vcv – Optional 3*3 numpy array in Cartesian units to propagate tf uncertainty
- Returns:
Cartesian X, Y, Z co-ordinates and vcv matrix transformed using plate motion to desired epoch
Common Geodetic Transformations¶
- geodepy.transform.transform_mga94_to_mga2020(zone, east, north, ell_ht=False, vcv=None)[source]¶
Performs conformal transformation of Map Grid of Australia 1994 to Map Grid of Australia 2020 Coordinates using the GDA2020 Tech Manual v1.2 7 parameter similarity transformation parameters
- Parameters:
zone – Zone Number - 1 to 60
east – Easting (m, within 3330km of Central Meridian)
north – Northing (m, 0 to 10,000,000m)
ell_ht – Ellipsoid Height (m) (optional)
vcv – Optional 3*3 numpy array in local enu units to propagate tf uncertainty
- Returns:
MGA2020 Zone, Easting, Northing, Ellipsoid Height (if none provided, returns 0), and vcv matrix
- geodepy.transform.transform_mga2020_to_mga94(zone, east, north, ell_ht=False, vcv=None)[source]¶
Performs conformal transformation of Map Grid of Australia 2020 to Map Grid of Australia 1994 Coordinates using the reverse form of the GDA2020 Tech Manual v1.2 7 parameter similarity transformation parameters
- Parameters:
zone – Zone Number - 1 to 60
east – Easting (m, within 3330km of Central Meridian)
north – Northing (m, 0 to 10,000,000m)
ell_ht – Ellipsoid Height (m) (optional)
vcv – Optional 3*3 numpy array in local enu units to propagate tf uncertainty
- Returns:
MGA1994 Zone, Easting, Northing, Ellipsoid Height (if none provided, returns 0), and vcv matrix
- geodepy.transform.transform_atrf2014_to_gda2020(x, y, z, epoch_from, vcv=None)[source]¶
Transforms Cartesian (x, y, z) Coordinates in terms of the Australian Terrestrial Reference Frame (ATRF) at a specified epoch to coordinates in terms of Geocentric Datum of Australia 2020 (GDA2020 - reference epoch 2020.0)
- Parameters:
x – ATRF Cartesian X Coordinate (m)
y – ATRF Cartesian Y Coordinate (m)
z – ATRF Cartesian Z Coordinate (m)
epoch_from – ATRF Coordinate Epoch (datetime.date Object)
vcv – Optional 3*3 numpy array in Cartesian units to propagate tf uncertainty
- Returns:
Cartesian X, Y, Z Coordinates and vcv matrix in terms of GDA2020
- geodepy.transform.transform_gda2020_to_atrf2014(x, y, z, epoch_to, vcv=None)[source]¶
Transforms Cartesian (x, y, z) Coordinates in terms of Geocentric Datum of Australia 2020 (GDA2020 - reference epoch 2020.0) to coordinates in terms of the Australian Terrestrial Reference Frame (ATRF) at a specified epoch
- Parameters:
x – GDA2020 Cartesian X Coordinate (m)
y – GDA2020 Cartesian Y Coordinate (m)
z – GDA2020 Cartesian Z Coordinate (m)
epoch_to – ATRF Coordinate Epoch (datetime.date Object)
vcv – Optional 3*3 numpy array in Cartesian units to propagate tf uncertainty
- Returns:
Cartesian X, Y, Z Coordinates and vcv matrix in terms of ATRF at the specified Epoch
NTv2 Transformations¶
- geodepy.transform.ntv2_2d(ntv2_grid, lat, lon, forward_tf=True, method='bicubic')[source]¶
Performs a 2D transformation based on ntv2 grid shifts.
- Parameters:
ntv2_grid – Ntv2Grid object (create with read_ntv2_file() function in geodepy.ntv2reader module)
lat – latitude in decimal degrees
lon – longitude in decimal degrees
forward_tf – True/False: - True applies the shifts in the direction given in the grid. - False applies the shifts in the opposite direction of the grid
method – Interpolation strategy - either ‘bicubic’ or ‘bilinear’
- Returns:
Transformed latitude and longitude