Skip to content

feat(crs): compound horizontal + vertical CRS - #302

Closed
MaxNumerique wants to merge 6 commits into
fix/crs_pukekohefrom
feat/compound_crs
Closed

MaxNumerique wants to merge 6 commits into
fix/crs_pukekohefrom
feat/compound_crs

Conversation

@MaxNumerique

Copy link
Copy Markdown
Contributor

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+B codes (EPSG:2193+7839): each part is checked against proj.db before 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.
  • 2D data get the horizontal part A; a 2D data already in A is left as it is.
  • Plausibility and basemap use the horizontal part.
  • geographic_list also returns vertical_list, compoundable and horizontal_parts (X/Y part of registered compounds, e.g. EPSG:5698 → EPSG:2154), for every dimension.
  • convert_geographic sets heights_unchanged when 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

  • pytest: 178 passed (compound assign, invalid / non-EPSG codes, 2D data, list fields, heights_unchanged)
  • mypy strict, ruff; schemas regenerated

Refs Geode-solutions/Vease#873

🤖 Generated with Claude Code

MaxNumerique and others added 6 commits November 23, 2026 11:14
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>
@BenPinet
BenPinet deleted the branch fix/crs_pukekohe November 23, 2026 16:07
@BenPinet BenPinet closed this Nov 23, 2026
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.

2 participants