Repository navigation
feat(crs): compound horizontal + vertical CRS - #302
Closed
MaxNumerique wants to merge 6 commits into
Closed
MaxNumerique wants to merge 6 commits into
MaxNumerique wants to merge 6 commits into
Conversation
EPSG has no single code for many projected + height pairs, like NZTM2000 with NZVD2016 heights. A code "A+B" now composes a listed CRS without heights (projected or geographic 2D) with a vertical CRS. Each part is checked against proj.db first: PROJ crashes on an unknown CRS. A 2D data gets the horizontal part. The plausibility check and the basemap use the horizontal part. Refs Geode-solutions/Vease#873 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CRS selector needs the vertical CRS to offer as heights, which CRS accept heights (projected and geographic 2D), and the X/Y part of each registered compound CRS, to compare a project CRS with its data. The three are sent for every dimension, so the front keeps a single list. Refs Geode-solutions/Vease#873 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PROJ has no geoid grid here: converting to another vertical datum usually leaves the heights as they are, which would be wrong in silence. The conversion response now sets heights_unchanged when the source heights had a datum (vertical CRS, registered compound or geographic 3D), the target has another one, and a sampled height kept its value. Linked data get it too. Refs Geode-solutions/Vease#873 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orizontal part PROJ only reads "AUTHORITY:A+B" codes for EPSG. An ESRI or IGNF pair was assigned, then every conversion of the data failed. Compound codes, compoundable CRS and the vertical list are now EPSG only. A 2D data has no heights: "A+B" resolves to A. A 2D data already in A refused the assign or conversion as "already the active CRS", which failed a whole linked assign. It is now left as it is. Refs Geode-solutions/Vease#873 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
proj.db gives some CRS an extent with NULL bounds (e.g. EPSG:29118 SAD69 / UTM zone 18N). area_of_use converted them to float and raised a TypeError, so assigning such a CRS failed. Extents without bounds are now ignored, like a CRS without any area of use. Refs Geode-solutions/Vease#873 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EPSG:2193 declares its axes north, east. Pin that bounds_to_3857 still reads x/y as east, north and places the Pukekohe area around 174.9 E, 37.2 S (it was in the South Pacific before the Geosciences 10 upgrade). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Compound horizontal + vertical CRS, for data in a projected CRS with heights in a vertical CRS that EPSG does not pair under one code (NZTM2000 + NZVD2016 for the Pukekohe model, Vease#873).
A+Bcodes (EPSG:2193+7839): each part is checked againstproj.dbbefore PROJ sees it (PROJ crashes on an unknown CRS). A is a projected or geographic 2D CRS, B a vertical CRS. EPSG only: PROJ does not read compound codes of other authorities.geographic_listalso returnsvertical_list,compoundableandhorizontal_parts(X/Y part of registered compounds, e.g.EPSG:5698 → EPSG:2154), for every dimension.convert_geographicsetsheights_unchangedwhen the source heights had a datum, the target has another one, and a sampled height kept its value (PROJ has no geoid grid). No change to PROJ or its data.Stacked on #300 (vertical CRS out of the main list).
Test plan
Refs Geode-solutions/Vease#873
🤖 Generated with Claude Code