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

# Module elevations

Web-services-based elevations and `CONUS` geoid heights.

Functions to obtain elevations and geoid heights thru web services, for (lat, lon) locations, currently limited to the Conterminous US (CONUS), see also modules pygeodesy.geoids and pygeodesy.heights and USGS10mElev.py.

See Also: Module pygeodesy.geoids to get geoid heights from other sources and for regions other than `CONUS`.

Note: If on macOS an `SSLCertVerificationError` occurs, like "[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: 23.05.26

Classes
| Elevation2Tuple 2-Tuple `(elevation, data_source)` in `meter` and `str`.
| GeoidHeight2Tuple 2-Tuple `(height, model_name)`, geoid `height` in `meter` and `model_name` as `str`.

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. |

Variables
| __all__ = `_ALL_LAZY.elevations`

Function Details

### elevation2 (lat, lon, timeout=2.0) |
Get the geoid elevation at an `NAD83` to `NAVD88` location. Arguments: `lat` - Latitude (`degrees`). `lon` - Longitude (`degrees`). `timeout` - Optional, query timeout (seconds). Returns: An Elevation2Tuple`(elevation, data_source)` or (`None, "error"`) in case of errors. Raises: `ValueError` - Invalid `timeout`. Note: The returned `elevation` is `None` if `lat` or `lon` is invalid or outside the `Conterminous US (CONUS)`, if conversion failed or if the query timed out. The `"error"` is the `HTTP-, IO-, SSL-` or other `-Error` as a string (`str`). See Also: USGS Elevation Point Query Service, the FAQ, geoid.py, module geoids, classes GeoidG2012B, GeoidKarney and GeoidPGM.

### geoidHeight2 (lat, lon, model=0, timeout=2.0) |
Get the `NAVD88` geoid height at an `NAD83` location. Arguments: `lat` - Latitude (`degrees`). `lon` - Longitude (`degrees`). `model` - Optional, geoid model ID (`int`). `timeout` - Optional, query timeout (seconds). Returns: An GeoidHeight2Tuple`(height, model_name)` or `(None, "error"`) in case of errors. Raises: `ValueError` - Invalid `timeout`. Note: The returned `height` is `None` if `lat` or `lon` is invalid or outside the `Conterminous US (CONUS)`, if the `model` was invalid, if conversion failed or if the query timed out. The `"error"` is the `HTTP-, IO-, SSL-, URL-` or other `-Error` as a string (`str`). See Also: NOAA National Geodetic Survey, Geoid, USGS10mElev.py, module geoids, classes GeoidG2012B, GeoidKarney and GeoidPGM.