UTM Converter#

Functions dealing with the transformation of coordinates an orientation to UTM/WGS84

Get UTM Zone#

Get the UTM zone for latitued and longitude given in degree

weitsicht.transform.utm_converter.get_zone(longitude: float, latitude: float) int[source]#

Estimate the WGS84 utm zone from latitude and longitude.

Parameters:
  • longitude (float) – Longitude in degrees. Valid range: -180 to 180.

  • latitude (float) – Latitude in degrees. Valid range: -90 to 90.

Returns:

UTM EPSG code.

Return type:

int

Raises:

ValueError – If limits are exceeded.

Convert coordinates to utm/wgs84#

This transforms a point to UTM/WGS84 in the height EGM2008

weitsicht.transform.utm_converter.point_convert_utm_wgs84_egm2008(crs_s: CRS, x: float, y: float, z: float) tuple[float, float, float, CRS | CompoundCRS][source]#

Transform a single point into WGS84-UTM (EGM2008) coordinates.

The point is first transformed to WGS84 3D (EPSG:4979), then assigned to a UTM zone and transformed to the corresponding compound CRS (UTM + EGM2008 geoid height).

Parameters:
  • crs_s (CRS) – CRS of the input point.

  • x (float) – X coordinate in crs_s units.

  • y (float) – Y coordinate in crs_s units.

  • z (float) – Z coordinate in crs_s units.

Returns:

Tuple (x_utm, y_utm, z_geoid, utm_crs).

Return type:

tuple[float, float, float, CRS | CompoundCRS]

Raises:
  • ValueError – If the transformed WGS84 point is outside UTM latitude/longitude limits.

  • CoordinateTransformationError – If a coordinate transformation cannot be established or applied.