elevation
Global geographic elevation data made easy. Elevation provides easy download, cache and access of the global datasets:
MAPZEN: Terrain Tiles global 30m v1 assembled by Mapzen from several open data providers and hosted on Amazon, with 30m heights on the EGM96 geoid, includes data from NASA/NGA SRTM, USGS 3DEP, EUDEM, ArcticDEM, GMTED2010 and ETOPO1.GLO-30: Copernicus DEM global 30m (2021) produced by ESA and the European Union and hosted on Earth Data Hub, with 30m heights on the EGM2008 geoid.AW3D30: ALOS World 3D global 30m v3.2 produced by JAXA and hosted on OpenTopography, with 30m heights on the EGM96 geoid.SRTM1_GEOID: SRTM global 30m v3 produced by NASA and NGA hosted on OpenTopography, with 30m heights on the EGM96 geoid.SRTM1_ELLIP: SRTM global 30m v3 ellipsoidal the companion ofSRTM1_GEOID, with 30m heights on the WGS84 ellipsoid.GLO-90: Copernicus DEM global 90m (2021) the 90m companion ofGLO-30.SRTM3: SRTM global 90m v4.1 produced and hosted by CGIAR-CSI, with 90m heights on the EGM96 geoid.
Note that any download policies and attribution requirements of the respective providers apply.
This Open Source project is sponsored by B-Open - https://bopen.eu.
Installation
Install the latest version of Elevation from the Python Package Index:
$ pip install elevation
The following dependencies need to be installed and working:
- GDAL command line tools, i.e.
gdal_translate,gdalbuildvrt,gdalinfoandogrinfo
The following command runs some basic checks and reports common issues:
$ eio selfcheck --verbose
Checking 'gdal_translate' ...
Checking 'gdalbuildvrt' ...
Checking 'gdalinfo' ...
Checking 'ogrinfo' ...
Your system is ready.
The best way to install GDAL command line tools varies across operating systems and distributions, please refer to the GDAL install documentation.
Note that elevation v2.0 requires Python 3.11 or later.
Our target platforms are Linux and MacOS. Windows is only lightly tested.
Command line usage
Identify the geographic bounds of the area of interest and fetch the DEM with the eio command.
For example to clip the 30m DEM of Rome, around 41.9N 12.5E, to the Rome-MAPZEN-DEM.tif file
using the default MAPZEN product:
$ eio clip -o Rome-MAPZEN-DEM.tif --bounds 12.35 41.8 12.65 42
For the Copernicus DEM global 30m or 90m DEMs use:
$ eio --product GLO-30 clip -o Rome-GLO-30-DEM.tif --bounds 12.35 41.8 12.65 42
$ eio --product GLO-90 clip -o Rome-GLO-90-DEM.tif --bounds 12.35 41.8 12.65 42
The GLO-30 and GLO-90 products are distributed by the Earth Data Hub as a
single cloud-hosted Zarr store that is read in place and cached one chunk at a
time instead of downloading whole tiles, and the credentials of the account
stored in ~/.netrc are used to access it:
machine data.earthdatahub.destine.eu
password <your EDH API key>
See the Earth Data Hub Getting started page to create an account and set up the credentials.
Reading the store needs GDAL 3.8 or later.
For the ALOS World 3D global 30m v3.2 DEM use:
$ eio --product AW3D30 clip -o Rome-AW3D30-DEM.tif --bounds 12.35 41.8 12.65 42
For the SRTM global 30m v3 geoid or ellipsoidal DEMs use:
$ eio --product SRTM1_GEOID clip -o Rome-SRTM1_GEOID-DEM.tif --bounds 12.35 41.8 12.65 42
$ eio --product SRTM1_ELLIP clip -o Rome-SRTM1_ELLIP-DEM.tif --bounds 12.35 41.8 12.65 42
For the SRTM global 90m v4.1 DEM use:
$ eio --product SRTM3 clip -o Rome-SRTM3-DEM.tif --bounds 12.35 41.8 12.65 42
The --bounds option accepts latitude and longitude coordinates
(more precisely in geodetic coordinates in the WGS84 reference system EPSG:4326 for those who care)
given as left bottom right top.
The --reference option clips a DEM on the same extent of any other geospatial data source
supported by GDAL and OGR, for example if you have a georeferenced image MyImage.tif
you can clip the corresponding DEM with:
$ eio clip -o MyImage-DEM.tif --reference MyImage.tif
The --reference option can also take vector data as input:
$ eio clip -o MyShapefile-DEM.tif --reference MyShapefile.shp
The first time an area is accessed Elevation downloads the data tiles from the AWS S3, CGIAR-CSI, OpenTopography or Earth Data Hub servers and caches them in GeoTIFF compressed formats, subsequent accesses to the same and nearby areas are much faster.
The seed and clip sub-commands refuse to download more than --max_download_tiles
(25 by default) tiles at a time to prevent bulk downloads,
please refer to the upstream providers' websites to learn the preferred procedures for bulk download.
To show the STAC metadata of the datasets use:
$ eio dataset
The optional argument selects a single dataset by id, e.g. eio dataset SRTM3.
To show info about the product cache use:
$ eio info
To clean up the product cache from temporary files use:
$ eio clean
To remove the product cache entirely use:
$ eio distclean
Command line reference
The eio command has the following sub-commands and options:
$ eio --help
Usage: eio [OPTIONS] COMMAND [ARGS]...
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --version Show the version and exit. │
│ [env var: EIO_VERSION] │
│ --product [MAPZEN|GLO-30|AW3D30|SRTM1_GEOID|SRT DEM product choice. │
│ M1_ELLIP|GLO-90|SRTM3] [env var: EIO_PRODUCT] │
│ [default: MAPZEN] │
│ --cache_dir <directory> Root of the DEM cache folder. │
│ [env var: EIO_CACHE_DIR] │
│ [default: <user cache folder>] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ selfcheck Audit the system for common issues. │
│ info Show info about the product cache. │
│ dataset Show the STAC metadata of the datasets. │
│ seed Seed the DEM to given bounds. │
│ clip Clip the DEM to given bounds. │
│ clean Clean up the product cache from temporary files. │
│ distclean Remove the product cache entirely. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
The clip sub-command:
$ eio clip --help
Usage: eio clip [OPTIONS]
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --output -o <file> Path to output file. Existing files │
│ will be overwritten. │
│ [env var: EIO_CLIP_OUTPUT] │
│ [default: out.tif] │
│ --bounds <float float float float>... Output bounds in 'left bottom right │
│ top' order. │
│ [env var: EIO_CLIP_BOUNDS] │
│ --margin -m <str> Decimal degree margin added to the │
│ bounds. Use '%' for percent margin. │
│ [env var: EIO_CLIP_MARGIN] │
│ [default: 0] │
│ --reference -r <path> Use the extent of a reference │
│ GDAL/OGR data source as output │
│ bounds. │
│ [env var: EIO_CLIP_REFERENCE] │
│ --gdal-options <str> GDAL creation options of the output │
│ file, e.g. '-co COMPRESS=LZW'. │
│ [env var: EIO_CLIP_GDAL_OPTIONS] │
│ [default: -co TILED=YES -co │
│ COMPRESS=DEFLATE -co ZLEVEL=9 -co │
│ NUM_THREADS=ALL_CPUS] │
│ --max_download_tiles <int> Maximum number of tiles to download. │
│ [env var: │
│ EIO_CLIP_MAX_DOWNLOAD_TILES] │
│ [default: 25] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
The seed sub-command downloads and caches the tiles that cover the bounds
without producing any output file:
$ eio seed --help
Usage: eio seed [OPTIONS]
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --bounds <float float float float>... Output bounds in 'left bottom right │
│ top' order. │
│ [env var: EIO_SEED_BOUNDS] │
│ --margin -m <str> Decimal degree margin added to the │
│ bounds. Use '%' for percent margin. │
│ [env var: EIO_SEED_MARGIN] │
│ [default: 0] │
│ --max_download_tiles <int> Maximum number of tiles to download. │
│ [env var: │
│ EIO_SEED_MAX_DOWNLOAD_TILES] │
│ [default: 25] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
Defaults can be defined by setting environment variables prefixed with EIO,
e.g. EIO_PRODUCT=SRTM3, EIO_CLIP_MARGIN=10% and EIO_CACHE_DIR=/tmp/elevation.
EIO_CACHE_DIR selects the DEM cache folder and is honoured by the Python API as well.
The default is the elevation folder of the operating system user cache directory.
Python API
Every command has a corresponding API function in the elevation module:
>>> import elevation
>>> # clip the 30m DEM of Rome and save it to Rome-DEM.tif
>>> elevation.clip(bounds=(12.35, 41.8, 12.65, 42), output="Rome-DEM.tif")
>>> # clean up the product cache from temporary files
>>> elevation.clean()
Project resources
| Resource | Link |
|---|---|
| Documentation | https://elevation.bopen.eu |
| Development | https://github.com/bopen/elevation |
| Download | https://pypi.org/project/elevation |
Contributing
The main repository is hosted on GitHub. Testing, bug reports and contributions are highly welcomed and appreciated:
https://github.com/bopen/elevation
Lead developer:
See also the list of contributors who participated in this project.
Sponsoring
B-Open commits to maintain the project long term and we are happy to accept sponsorships to develop new features.
License
Copyright 2016-2026 B-Open Solutions srl
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Metadata
Release files for elevation 2.0.0
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 | |
|---|---|---|---|---|
| elevation-2.0.0.tar.gz | 463.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elevation-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 495.0 kB
Release files / elevation-2.0.0.tar.gz
| Download URL | elevation-2.0.0.tar.gz |
|---|---|
| Size | 463.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f6e6512d27d447950154b12d9b688000ba39196efc0aba95070e8c19013e086
|
|
BLAKE2b-256 checksum How to use checksums |
06447009ddcc78c7d275dc1b2e1d3849fd28d118f57874ffbb29e8c6dd2a5a6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / elevation-2.0.0-py3-none-any.whl
| Download URL | elevation-2.0.0-py3-none-any.whl |
|---|---|
| Size | 31.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
781352a29ce93d0e89d37fb812db411d2a9c1a887a9b2f09c192bd67a0b1797f
|
|
BLAKE2b-256 checksum How to use checksums |
6d536c1708030d86ff18314a4d4f4a8f49ee9223cfb6e054e9cf67fc34b1e91c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for elevation 2.0.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for elevation-2.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA 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.