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:
-180to180.latitude (float) – Latitude in degrees. Valid range:
-90to90.
- Returns:
UTM EPSG code.
- Return type:
int
- Raises:
ValueError – If limits are exceeded.
Convert coordinates to utm/wgs84 from any crs#
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_sunits.y (float) – Y coordinate in
crs_sunits.z (float) – Z coordinate in
crs_sunits.
- 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.
Convert coordinates to utm/wgs84 from wgs84ell#
This transforms a point to UTM/WGS84 in the height EGM2008
- weitsicht.transform.utm_converter.point_wgs84ell_to_utm(crs_s: CRS, lon_deg: float, lat_deg: float, h_m: float) tuple[float, float, float, CRS | CompoundCRS][source]#
Transform WGS84 ell coordinates to WGS84-UTM coordinates. Height will be that from input
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_sunits.y (float) – Y coordinate in
crs_sunits.z (float) – Z coordinate in
crs_sunits.lon_deg (float)
lat_deg (float)
h_m (float)
- 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.