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

Module elevations

Functions to obtain elevations and geoid heights thru web services, for (lat, lon) locations, currently limited to the Conterminous US (CONUS).

macOS: If an SSLCertVerificationError occurs, especially this "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self "signed certificate in certificate chain ...", review this post for a remedy. From a Terminal window run: "/Applications/Python X.Y/Install Certificates.command"


Version: 18.08.26

Functions
 
elevation2(lat, lon, timeout=2.0)
Get the geoid elevation at an NAD83 to NAVD88 location.
 
geoidHeight2(lat, lon, model=0, timeout=2.0)
Get the NAVD88 geoid height at an NAD83 location.
Function Details

elevation2(lat, lon, timeout=2.0)

 

Get the geoid elevation at an NAD83 to NAVD88 location.

Parameters:
  • lat - Latitude (degrees).
  • lon - Longitude (degrees).
  • timeout - Optional, query timeout (seconds).
Returns:
2-Tuple (elevation, data_source) in (meter, string) or (None, <error>).

Note: The returned elevation is None if lat or lon is invalid or outside the Conterminous US (CONUS), if the query timed out or if conversion failed. The <error> is the HTTP-, IO-, SSL-, Type-, URL- or ValueError as string.

See Also: USGS National Map, the FAQ and USGS10mElev.py.

geoidHeight2(lat, lon, model=0, timeout=2.0)

 

Get the NAVD88 geoid height at an NAD83 location.

Parameters:
  • lat - Latitude (degrees).
  • lon - Longitude (degrees).
  • model - Optional, geoid model ID (int).
  • timeout - Optional, query timeout (seconds).
Returns:
2-Tuple (height, model_name) in (meter, string) or (None, <error>).

Note: The returned height is CNone if lat or lon is invalid or outside the Conterminous US (CONUS), if the model was invalid, if the query timed out or if conversion failed. The <error> is the HTTP-, IO-, SSL-, Type-, URL- or ValueError as string.

See Also: NOAA National Geodetic Survery and Geoid