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

# Module epsg

Functions encodeEPSG and decodeEPSG2 provide en- and decoding of EPSG (European Petroleum Survery Group) codes from and to UTM and UPS zones.

A pure Python implementation transcribed from C++ class UTMUPS by Charles Karney.

Version: 19.04.21

Classes
| EPSGError EPSG encode or decode error.

Functions
decodeEPSG2(epsg) Determine the UTM/USP zone number and hemisphere from a given EPSG (European Petroleum Survery Group) code. |
encodeEPSG(zone, hemipole=`'````'`, band=`'````'`) Determine the EPSG (European Petroleum Survery Group) code for a given UTM/UPS zone number and hemipole or Band. |

Variables
| __all__ = `_ALL_LAZY.epsg`

Function Details

### decodeEPSG2(epsg) |
Determine the UTM/USP zone number and hemisphere from a given EPSG (European Petroleum Survery Group) code. Parameters: `epsg` - The EPSG code (`str` or `scalar`). Returns: 2-Tuple (`zone, 'N'|'S'`) as (`int`, `str`) where `zone` is `1..60` for UTM or `0` for UPS. Raises: `UTMUPSError` - Invalid epsg.

### encodeEPSG(zone, hemipole=`'````'`, band=`'````'`) |
Determine the EPSG (European Petroleum Survery Group) code for a given UTM/UPS zone number and hemipole or Band. Parameters: `zone` - The (longitudinal) UTM zone (`int`, 1..60) or zone with/-out (latitudinal) Band letter (`str`, '01C'..'60X') or `0` for UPS. `hemipole` - UTM hemisphere or UPS projection top/center pole (`str`, `'N[orth]'` or `'S[outh]'`). `band` - Optional (latitudinal) UTM Band letter (`str`). Returns: `EPSG` code (`int`). Raises: `EPSGError` - Invalid zone, band or pole.