Skip to content

fix(crs): models without block meshes, no vertical CRS for X and Y - #300

Merged
BenPinet merged 7 commits into
nextfrom
fix/crs_pukekohe
Nov 23, 2026
Merged

BenPinet merged 7 commits into
nextfrom
fix/crs_pukekohe

Conversation

@MaxNumerique

Copy link
Copy Markdown
Contributor

Summary

Two CRS fixes found while georeferencing the Pukekohe model (Vease#873):

  • Models whose blocks have no mesh (common for models built from surfaces) could not get a CRS: coordinates_implausible called bounding_box() on empty solid meshes, which throws. Empty meshes are now skipped.
  • Vertical CRSs (e.g. EPSG:7839 "NZVD2016 height") are no longer offered. They label X and Y with a height axis, so every later conversion fails. The 497 CRSs of the vertical_crs table of proj.db are left out of the list, and known_info refuses them since it reads the same list.

Test plan

  • pytest test_crs_routes.py, test_crs_functions.py, test_basemap.py
  • mypy strict, ruff

Refs Geode-solutions/Vease#873

🤖 Generated with Claude Code

MaxNumerique and others added 2 commits November 23, 2026 10:15
coordinates_implausible called bounding_box() on every CRS mesh, and an
empty SolidMesh throws. Models built from surfaces often keep their
blocks without mesh, so any assign failed on them. Skip empty meshes.

Refs Geode-solutions/Vease#873

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CRS list offered the 497 height-only CRSs PROJ knows, like
EPSG:7839 NZVD2016 height. Assigned to data, they label X and Y with a
height axis: the plausibility check cannot convert them, and every
later conversion fails. With older Geosciences, the null transformation
even crashed the back-end.

Leave the CRSs of the vertical_crs table of proj.db out of the list.
known_info reads the same list, so assigning one is now refused too.

Refs Geode-solutions/Vease#873

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BenPinet
BenPinet merged commit fc880f9 into next Nov 23, 2026
30 checks passed
@BenPinet
BenPinet deleted the fix/crs_pukekohe branch November 23, 2026 16:07
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.

3 participants