Skip to content

Accept mtl and dtl, require transformez 1.0.1, and add vdatum_lookup tests - #235

Merged
mmacferrin merged 2 commits into
mainfrom
test/vdatum-lookup
Oct 21, 2026
Merged

mmacferrin merged 2 commits into
mainfrom
test/vdatum-lookup

Conversation

@mmacferrin

@mmacferrin mmacferrin commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Follows up continuous-dems/transformez#190, fixed by continuous-dems/transformez#191 in transformez 1.0.1, and adds unit tests for vdatum_lookup (Refs #138).

Changes

  • mtl (mean tide level) and dtl (diurnal tide level) are accepted as vertical datum names and passed to transformez as vdatum:mtl and vdatum:dtl, the references 1.0.1 added. Checked with a real MTL → NAVD88 and DTL → NAVD88 shift in Chesapeake Bay; ivert validate --list-vdatums lists both, and the user guide's list of tidal datums includes them.
  • check_vdatum() and describe_vdatum() catch transformez's reference errors as ValueError, which they derive from as of 1.0.1, instead of listing transformez's error classes one by one.
  • pyproject.toml requires transformez>=1.0.1. 1.0.1 also extracts the VDatum model grids (such as xGEOID20B, about 200 MB) into its cache instead of the folder ivert is run from. The conda-forge recipe needs the same floor at the next release.

Tests (tests/test_vdatum_lookup.py): geoid, ellipsoid and tidal names resolving (case-insensitive, surrounding spaces ignored); bare and EPSG: codes and qualified references passing through; unknown names resolving to None; every reference list_vdatums() lists passing check_vdatum(); a horizontal-only reference, one with no transform (EPSG:5868) and unknown references raising ValueError; describe_vdatum() giving transformez's names, or an empty string; and every listed name resolving to the reference it is listed under. They use the real transformez parser and resolver, which need no network. Coverage of vdatum_lookup.py goes from 61% to 100%.


Checklist

  • PR title is descriptive
  • PR body contains links to related and resolved issues (e.g. closes #1)
  • If the change is user-visible, CHANGELOG.md has an entry under ## [Unreleased] that cites this PR (see CONTRIBUTING.md)
  • If needed, docs and/or README.md updated
  • If needed, unit tests added
  • All checks passing
  • At least one approval

🔍 Docs preview: https://ivert--235.org.readthedocs.build/en/235/

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 ivert | 🛠️ Build #35288120 | 📁 Comparing b223551 against latest (30d6fab)

  🔍 Preview build  

1 file changed
± user_guide/validate.html

@mmacferrin
mmacferrin merged commit 1bfcb2c into main Oct 21, 2026
9 checks passed
@mmacferrin
mmacferrin deleted the test/vdatum-lookup branch October 21, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant