pyhigh
pyhigh is a Python package for accessing elevation data, which is retrieved from a USGS dataset. The package uses caching to avoid unecessary downloads from the USGS dataset, but please respect their download policies.
Installation
> pip install pyhigh
Usage
Command-line utility
The pyhigh Python package includes a command-line tool of the same name to retreive the elevation at a particular latitude and longitude:
> pyhigh --lat 36.52011 --lon -118.671
1884
As necessary, files will be download from a USGS dataset and cache in the folder pyhigh/pyhigh/.cache. To clear this cache, use the --clean argument:
> pyhigh --clean
Python API
The get_elevation function returns the elevation, in meters, at the given latitude and longitude.
>>> from pyhigh import get_elevation
>>> get_elevation(lat=36.52011, lon=-118.671)
1884
It is also possible to request a bunch elevations for a bunch of latitudes and longitudes at once. The result returned is a NumPy array of elevations.
>>> from pyhigh import get_elevation_batch
>>> get_elevation_batch([(36.52011, -118.671),
... (36.62011, -118.771)])
array([1884., 2438.])
This is more efficient than individual calls to get_elevation because elevation reads are pooled together to avoid reading the same *.hgt file multiple times.
Finally, the pyhigh cache of *.hgt files can be cleared with the API function clear_cache:
>>> from pyhigh import clear_cache
>>> clear_cache()
Metadata
Release files for pyhigh 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyhigh-0.0.6.tar.gz | 5.5 kB | Without provenance | Details for pyhigh-0.0.6.tar.gz |
Release files / pyhigh-0.0.6.tar.gz
| Download URL | pyhigh-0.0.6.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e10df65fc0ca79a57cb8f0cb10b4a6fefa19b2c4e5d28a1c46cb6b4e37f48be8
|
|
BLAKE2b-256 checksum How to use checksums |
db8bf8101acb032d7a9c1bd5023678831ff04edaf2d42ad78d0deca1b89ed805
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for pyhigh 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.