Package pygeodesy :: Module epsg
[frames] | no frames]

Module epsg

European Petroleum Survey Group (EPSG) en-/decoding.

Classes Epsg and EPSGError and functions to encode and decode2 (EPSG) codes from and to UTM and UPS zones.

A pure Python implementation transcoded from Charles Karney's C++ class UTMUPS, including coverage of UPS as zone 0.


Version: 22.09.24

Classes
  Epsg
EPSG class, a named int.
  EPSGError
EPSG encode, decode or other Epsg issue.
Functions
 
decode2(epsg)
Determine the UTM/USP zone and hemisphere from a given EPSG.
 
encode(zone, hemipole='', band='')
Determine the EPSG code for a given UTM/UPS zone number, hemisphere/pole and/or Band.
Variables
  __all__ = _ALL_LAZY.epsg
Function Details

decode2 (epsg)

 

Determine the UTM/USP zone and hemisphere from a given EPSG.

Arguments:
  • epsg - The EPSG (Epsg, str or scalar).
Returns:
A UtmUps2Tuple(zone, hemipole).
Raises:

Note: Coverage of UPS as zone 0 follows Karney's function UTMUPS::DecodeEPSG.

encode (zone, hemipole='', band='')

 

Determine the EPSG code for a given UTM/UPS zone number, hemisphere/pole and/or Band.

Arguments:
  • zone - The (longitudinal) UTM zone (int, 1..60) or UPS zone (int, 0) or UTM zone with/-out latitudinal Band letter (str, '01C'..'60X') or UPS zone with/-out polar Band letter (str, '00A', '00B', '00Y' or '00Z').
  • hemipole - UTM/UPS hemisphere or UPS projection top/center pole (str, 'N[orth]' or 'S[outh]').
  • band - Optional latitudinal UTM or polar UPS Band letter (str).
Returns:
EPSG code (Epsg).
Raises:
  • EPSGError - Invalid zone, hemipole or band.

Note: Coverage of UPS as zone 0 follows Karney's function UTMUPS::EncodeEPSG.