Repository navigation
Resolve vertical datums through transformez and pass tidal datums as its IDs - #132
Merged
Merged
Conversation
…its IDs vdatum_lookup read its name table from transformez.definitions, which transformez 1.0 removed, so it had silently fallen back to a built-in table with wrong codes: mlw and mhw failed partway through a validation, and mtl and lwd_igld85 pointed at unrelated CRSs. Tidal names now go to transformez as vdatum:mllw etc., every datum is checked against transformez before a run starts, and names transformez cannot transform are dropped. transform_points and validate_dem carry a transformez ID as the vertical part of a compound CRS. Results for datums that worked before are unchanged.
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.
ivert.vdatum_lookupbuilt its name table fromtransformez.definitions.Datums, which transformez 1.0 removed. TheImportErrorwas caught silently, so every current install has run on IVERT's short built-in table alone, and some of its codes were wrong:mlwmhwmtllwd_igld85-V mlwand-V mhwfailed partway through a validation.This PR:
mllw,mlw,msl,mhwandmhhwresolve tovdatum:mllwetc., leaving transformez to decide how each surface is applied. Geoid and ellipsoid names still resolve to EPSG codes.-Vaccepts a name, an EPSG code or a transformez ID, and stops at once, with transformez's reason, on one it cannot transform.ngvd29,igld85,mtl,lwd_igld85andnavd88 height (usft). transformez's VDatum support does list the MTL and DTL surfaces but has no reference to reach them through yet; a comment invdatum_lookup.pysays to addmtlanddtlonce it does.dem_geom.split_srs_string()splits a compound CRS whose vertical part pyproj cannot read (EPSG:4326+vdatum:mllw);transform_points(),validate_demandplot_photon_clouds_v2.pyuse it.validate_dem()'sdem_vertical_datumnow resolves names itself.vdatum_lookup's API:resolve_vdatum(), plus newcheck_vdatum(),describe_vdatum()andlist_vdatums(), whichivert validate --list-vdatumsnow uses. The descriptions come from transformez.Datums that worked before give the same results. Comparing
mainagainst this branch:navd88,mllw,mslandmhhwgives identical heights.ivert validateon a CRM Vol 6 tile with-V navd88and with-V mllwgives identical results files and summary statistics.The only difference is the manifest, which records
vdatum:mllwwhere it recordedEPSG:5866.CHANGELOG entries under Fixed and Changed, including a Breaking entry for the dropped names.
🔍 Docs preview: https://ivert--132.org.readthedocs.build/en/132/