Skip to main content

A standalone utility for vertical elevation datum transformations.

Project description

Transformez

Global vertical datum transformations, simplified.

Version License Python PyPI version Project Chat

Transformez is a standalone Python engine for converting geospatial data between vertical datums (e.g., MLLWNAVD88Ellipsoid).


Shift Grid Example (Above: A generated vertical shift grid transforming MLLW to NAVD88)

Installation

Prerequisites: HTDP

Transformez relies on the NGS Horizontal Time-Dependent Positioning (HTDP) software to perform highly accurate plate tectonic and frame transformations. You must install this separately.

For Windows:

  1. Download the pre-compiled executable (htdp.exe) directly from the NOAA HTDP page.
  2. Place htdp.exe in a directory that is in your system's PATH (e.g., C:\Windows\System32 or a custom scripts folder).

For Linux / macOS:

You will need a Fortran compiler (like gfortran) to compile the source code.

# 1. Download the Fortran source code
wget https://geodesy.noaa.gov/TOOLS/Htdp/HTDP-download.zip
unzip HTDP-download.zip

# 2. Compile it
gfortran -o htdp htdp.f

# 3. Move it to your PATH
sudo mv htdp /usr/local/bin/

Install Transformez

Once HTDP is accessible in your terminal, install the python package:

pip install transformez

Usage

Generate a vertical shift grid for anywhere on Earth.

# Transform MLLW to WGS84 Ellipsoid in Norton Sound, AK
# (Where NOAA has no coverage!)
transformez -R -166/-164/63/64 -E 3s \
    --input-datum mllw \
    --output-datum 4979 \
    --output shift_ak.tif

Transform a raster directly. Transformez reads the bounds/resolution from the file.

transformez --dem input_bathymetry.tif \
    --input-datum "mllw" \
    --output-datum "5703:geoid=geoid12b" \
    --output output_navd88.tif

Integrate directly into your download pipeline.

# Download GEBCO and shift EGM96 to WGS84 on the fly
fetchez gebco ... --hook transformez:datum_in=5773,datum_out=4979

Python API

Transformez provides a high-level API for embedding transformations directly into your Python scripts, Jupyter Notebooks, or automated pipelines.

import transformez

# ---------------------------------------------------------
# Generate a Shift Grid
# ---------------------------------------------------------
# Returns a 2D numpy array. Optionally saves to a file.
# Requesting "mllw" in India triggers the Global Fallback (FES2014) automatically.

shift_array = transformez.generate_grid(
    region=[80, 85, 10, 15],  # [West, East, South, North]
    increment="3s",           # Grid resolution
    datum_in="mllw",
    datum_out="4979",         # WGS84 Ellipsoid
    out_fn="india_shift.tif"  # Optional: Save to disk
)

# ---------------------------------------------------------
# Transform an Existing Raster
# ---------------------------------------------------------
# Applies the datum shift directly to a DEM and saves the result.

out_file = transformez.transform_raster(
    input_raster="my_dem_mllw.tif",
    datum_in="mllw",
    datum_out="5703:g2012b",  # NAVD88 using specific GEOID12B
    output_raster="my_dem_navd88.tif"
)

Supported Datums

  • Tidal: mllw, mhhw, msl, lat

  • Ellipsoidal: 4979 (WGS84), 6319 (NAD83 2011)

  • Orthometric: 5703 (NAVD88), egm2008, egm96

  • Geoids: g2018, g2012b, geoid09, xgeoid20b

License

This project is licensed under the MIT License - see the LICENSE file for details. Copyright (c) 2010-2026 Regents of the University of Colorado

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transformez-0.3.0.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transformez-0.3.0-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file transformez-0.3.0.tar.gz.

File metadata

  • Download URL: transformez-0.3.0.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for transformez-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c03f5ad62f8ec1aaced6c65a5849f041376630737300e9474716fd5063d1df9e
MD5 c2c4b1965c67a670be57269f64767848
BLAKE2b-256 276b6ff22ff25c5e850729c1da8a5031d7b5eef0706a2d89cc9e5aea53131fce

See more details on using hashes here.

Provenance

The following attestation bundles were made for transformez-0.3.0.tar.gz:

Publisher: publish.yaml on continuous-dems/transformez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file transformez-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: transformez-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for transformez-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39408b4c9fad43c29adbfa1169e34287f7befc51e06f843f399941548e2ad30b
MD5 65044ed6c24211f461328d44384dffd8
BLAKE2b-256 fed67c8a2e34f07b859c031daea9c125d97a67e78e3e25983c832efa7583a3c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for transformez-0.3.0-py3-none-any.whl:

Publisher: publish.yaml on continuous-dems/transformez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page