Repository navigation
Accept mtl and dtl, require transformez 1.0.1, and add vdatum_lookup tests - #235
Merged
Merged
Conversation
14 of 19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) anddtl(diurnal tide level) are accepted as vertical datum names and passed to transformez asvdatum:mtlandvdatum:dtl, the references 1.0.1 added. Checked with a real MTL → NAVD88 and DTL → NAVD88 shift in Chesapeake Bay;ivert validate --list-vdatumslists both, and the user guide's list of tidal datums includes them.check_vdatum()anddescribe_vdatum()catch transformez's reference errors asValueError, which they derive from as of 1.0.1, instead of listing transformez's error classes one by one.pyproject.tomlrequirestransformez>=1.0.1. 1.0.1 also extracts the VDatum model grids (such as xGEOID20B, about 200 MB) into its cache instead of the folderivertis 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 andEPSG:codes and qualified references passing through; unknown names resolving toNone; every referencelist_vdatums()lists passingcheck_vdatum(); a horizontal-only reference, one with no transform (EPSG:5868) and unknown references raisingValueError;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 ofvdatum_lookup.pygoes from 61% to 100%.Checklist
closes #1)CHANGELOG.mdhas an entry under## [Unreleased]that cites this PR (see CONTRIBUTING.md)README.mdupdated🔍 Docs preview: https://ivert--235.org.readthedocs.build/en/235/