Skip to main content

Overview

Altira selects DEM tiles from georeferenced rasters, downloads Copernicus, ALOS, or SRTM data, and provides elevation interpolation, height statistics, and local DEM support. All elevation arrays and queries use WGS84 ellipsoidal meters.

Installation

Use the altira Conda environment for GDAL and PROJ. From this checkout:

conda env create -f resources/envs/altira.yml
conda activate altira
python -m pip install -e .

The base package supports georeferenced raster paths, DEM downloads, coordinate queries, and local DEMs. GDAL reads raster georeferencing directly.

DEM usage

from altira import Dem

dem = Dem(cache_dir="D:/DEM", local_paths=(), resolution=30)
tiles = dem.preload_image("D:/Images/scene.tif")

heights = dem.interpolate_heights([13.3, 13.31], [52.5, 52.51])
minimum, maximum, average = dem.get_height_bounds(
    13.3, 13.31, 52.5, 52.51, compute_avg_height=True
)

preload_image returns a tuple of DemTile objects with info, heights, and transform attributes. info.path identifies the unchanged native source raster; heights is a float32 array converted to ellipsoidal meters. Raster paths must provide an affine transform and CRS. GDAL reads these directly, including projected and rotated grids.

For footprints supplied by a caller, load DEM tiles using explicit WGS84 bounds:

tiles = dem.preload_dem_tiles(west=13.3, east=13.31, south=52.5, north=52.51)

Use west > east for bounds crossing the antimeridian. Product metadata loading and geocoding are the caller's responsibility.

altira download "D:/Images/scene.tif" --cache-dir "D:/DEM"
altira download "D:/Images/scene.tif" --cache-dir "D:/DEM" --source alos-ellipsoidal

Select the online dataset explicitly with source:

Source Native resolution Native vertical datum
copernicus (default) 30 or 90 m EGM2008
alos 30 m EGM96
alos-ellipsoidal 30 m WGS84 ellipsoid
srtm 30 or 90 m EGM96
srtm-ellipsoidal 30 m WGS84 ellipsoid
dem = Dem(cache_dir="D:/DEM", source="alos-ellipsoidal", resolution=30)
tiles = dem.preload_image("D:/Images/scene.tif")

ALOS and SRTM use OpenTopography's anonymous bulk storage, without an account or API key. Published VRT indexes determine coverage; only selected native tiles are downloaded. Ellipsoidal variants skip geoid conversion. These are OpenTopography's published mirrors, which may differ in version from the original producers' current releases. ALOS is a surface model, so elevations can include vegetation and buildings. See the source dataset pages for attribution: ALOS, ALOS Ellipsoidal, SRTM, and SRTM Ellipsoidal.

Local directories take priority in their supplied order, with the finest resolution preferred within each directory. Supported formats include SRTM HGT, CGIAR SRTM, DTED, TanDEM-X, edited TanDEM-X, Copernicus, and ZIP/TAR deliveries. Coverage gaps are logged, without switching source or resolution. Interpolation fills unavailable or nodata posts with avg_height=0; use avg_height=float("nan") to retain gaps. Raster and network failures raise.

See the usage guide for cache, datum, and statistics details.

Documentation

The documentation site includes the usage guide and API reference. The documentation source is in docs/.

Development

Install the development dependencies:

> pip install -e .[dev]

Run the core test suite directly with pytest:

> pytest

Run linting and formatting with Ruff:

> python -m ruff check --fix .
> python -m ruff format .

To include coverage:

> pytest --cov --cov-report=term-missing

Metadata

Release files for altira 2026.10.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for altira 2026.10.2
File Actions
altira-2026.10.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for altira-2026.10.2-cp313-cp313-win_amd64.whl
altira-2026.10.2-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details for altira-2026.10.2-cp313-cp313-win32.whl
altira-2026.10.2-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details for altira-2026.10.2-cp313-cp313-musllinux_1_2_x86_64.whl
altira-2026.10.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for altira-2026.10.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
altira-2026.10.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for altira-2026.10.2-cp313-cp313-macosx_11_0_arm64.whl

Total release size: 8.0 MB

Release files / altira-2026.10.2-cp313-cp313-win_amd64.whl

Download URL altira-2026.10.2-cp313-cp313-win_amd64.whl
Size 433.9 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
1436c4975ce42f9c2d876490627d34646d9eb76e7855c0698a4bb47f325169f9
BLAKE2b-256 checksum
How to use checksums
b553bc7032bc4c56b800f8ca6368acc3e37fb5f79ad0b8bb362ac164d857e423
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 11, 2026.

Transparency log

Release files / altira-2026.10.2-cp313-cp313-win32.whl

Download URL altira-2026.10.2-cp313-cp313-win32.whl
Size 390.0 kB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
b1306fc91f3f28c8d753ac31ba1f7dc7801db1ef2ffd2ef65ea4524d650b28a9
BLAKE2b-256 checksum
How to use checksums
db0c828cb9bd397cd4561f58b4d53ac639032d28401243a35ca43597a5e9db18
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 11, 2026.

Transparency log

Release files / altira-2026.10.2-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL altira-2026.10.2-cp313-cp313-musllinux_1_2_x86_64.whl
Size 3.3 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
1f3551fdefc5137181f15a065ee1b0bd8daa672afc89e89b31fe3609e9de30c9
BLAKE2b-256 checksum
How to use checksums
f18c8af21d84f92d8167630d8b839e6f69f501239ebb55245b212c217f331674
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 11, 2026.

Transparency log

Release files / altira-2026.10.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL altira-2026.10.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.3 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6ff25d52f76e14f87b2ca742f386ec9231f6e21f151a4daa99149fb0f6686a29
BLAKE2b-256 checksum
How to use checksums
40bd3535be54c19d24f551ab828c8fae1a1a8ca86ca70f74b1d870aa97e95a4a
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 11, 2026.

Transparency log

Release files / altira-2026.10.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL altira-2026.10.2-cp313-cp313-macosx_11_0_arm64.whl
Size 509.7 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
515da205784e511cff04ee07c69a34460613292c9fec797ee193f711a0e9f637
BLAKE2b-256 checksum
How to use checksums
1c8e9dff91edb60af52d1d7db57cfcc60be5361c2499992edee9ac03c39596a8
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 11, 2026.

Transparency log

Security for altira 2026.10.2

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 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for altira-2026.10.2-cp313-cp313-win_amd64.whl

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 11, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page