Repository navigation
Conversation
ZH.yaml queried 6 stale per-zone WMS layer names that no longer exist on the live server, plus a 7th layer (erdwaermesonden-auflagen) marked non-queryable by the server's GetCapabilities. Every ZH request fell back to harmonized_value=4 (UNKNOWN). Fix: consolidate ZH.yaml to the one real, queryable layer (waermenutzung-zonen), resolved via a static bbox->zone lookup table (bbox_zones) since GetFeatureInfo returns no attribute payload for it, only a bounding box. erdwaermesonden-auflagen stays in LAYERS (to match the real request shape) but is excluded from QUERY_LAYERS via a new queryable flag. - schema.py: add Layer.queryable and Layer.bbox_zones/BboxZone fields - ZH.yaml: replace 7-layer config with waermenutzung-zonen + bbox_zones - processing.py: split QUERY_LAYERS/LAYERS, replace dead gml:name parsing with gml:Box bbox extraction, add bbox_zones matching in process_ground_category Known gap: the erdwaermesonden-auflagen restriction remains undetectable (server rejects GetFeatureInfo against it outright). Ground control point 1 keeps its documented expected value of 3 in ZH.yaml; the integration test explicitly asserts the post-fix mismatch (resolves to 2 via Zone D) to document this as a known, out-of-scope gap rather than hiding it. Tested: bug condition exploration, preservation (non-ZH behavior unchanged), and integration tests all pass (156/156).
This branch has not been deployed
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
ZH canton drill-category always resolved to
harmonized_value=4(UNKNOWN).ZH.yamlqueried 6 stale per-zone WMS layer names that no longer exist on the live server, plus a 7th layer (erdwaermesonden-auflagen) marked non-queryable by the serversGetCapabilities`.Fix consolidates
ZH.yamlto the one real, queryable layer (waermenutzung-zonen), resolved via a static bbox->zone lookup table (bbox_zones), sinceGetFeatureInforeturns no attribute payload for it - only a bounding box.erdwaermesonden-auflagenstays inLAYERS(so the request shape matches the real service) but is excluded fromQUERY_LAYERSvia a newqueryableflag.Changes
schema.py: addLayer.queryableandLayer.bbox_zones/BboxZonefields (additive, default-safe for every other canton)ZH.yaml: replace the 7-layer config withwaermenutzung-zonen+bbox_zones(coordinates recorded via live GetFeatureInfo queries against the real ZH server)processing.py: splitQUERY_LAYERS/LAYERSconstruction, replace the deadgml:nameparsing withgml:Boxbbox extraction, addbbox_zonesmatching inprocess_ground_categorypyproject.toml/uv.lock: addhypothesisas a dev dependency (used by the new preservation property tests)Known gap
The
erdwaermesonden-auflagenrestriction remains undetectable - the server rejectsGetFeatureInfoagainst it outright. Ground control point 1 inZH.yamlkeeps its documented expected value of3; the new integration test explicitly asserts the post-fix result does NOT match3(it resolves to2via Zone D instead), documenting this as a known, out-of-scope gap for a follow-up fix rather than hiding it.Testing
tests/test_zh_bug_condition.py: exploration tests confirming the bug existed pre-fix, now pass post-fixtests/test_zh_preservation_properties.py: property-based tests confirming non-ZH canton behavior (GML parsing, property_values matching, QUERY_LAYERS/LAYERS construction, transport failures) is byte-for-byte unchangedtests/test_zh_integration.py: full-route tests for all 6 documented ZH ground control points, including the inverted assertion for the known Auflagen gaptests/test_processing.py,tests/test_configuration_structure.py: updated for the new bbox-based ZH parsing and schema fieldsruff check/ruff format --check: clean