Sweden: acceptance tests for the remaining R-checks #122

Closed
opened 2026-08-15 07:22:29 +00:00 by art · 1 comment
Owner

Part of the #115 plan: the mechanism (config-declared acceptance_tests:, run by the importer on every import and via -acceptance-only) landed in #119 with a representative first set. This issue tracks porting the REST of this country's R-checks into acceptance tests. The general instruction from #115: a test is a sentence citing the R-number, a SQL query whose first column is the pass/fail boolean, and a timeout from {1, 10, 100, 1000}; prefer 1s/10s, put the genuinely slow ones at 100s.

Candidates already measured/written down in docs/country-requirements.md:

  • R40/R125 (issue #117): the per-class area ladder — wetland's z4→z3 collapse is the standing failure; a test should assert the collapse stays within a documented bound, or at least that wetland area at z3 stays above a floor.
  • R38: area by boundary class must not grow across a coarse zoom step by more than a sub-pixel amount (the absorption rule #47 fixed).
  • R95/R96: avg(ST_NPoints(geom)) at the coarsest zoom for roads/waterways/railways (near 2.0 = pre-split network, R95's signature; merge_lines is supposed to have fixed it).
  • R119: row counts per zoom for the se_* layers and every shared partition, no unintended empty partition.
  • R90/R91/R92: places — one label anchor per feature, same-name dedupe spatial not nationwide, no name repeats across a tile boundary.
Part of the #115 plan: the mechanism (config-declared `acceptance_tests:`, run by the importer on every import and via `-acceptance-only`) landed in #119 with a representative first set. This issue tracks porting the REST of this country's R-checks into acceptance tests. The general instruction from #115: a test is a sentence citing the R-number, a SQL query whose first column is the pass/fail boolean, and a timeout from {1, 10, 100, 1000}; prefer 1s/10s, put the genuinely slow ones at 100s. Candidates already measured/written down in docs/country-requirements.md: - R40/R125 (issue #117): the per-class area ladder — wetland's z4→z3 collapse is the standing failure; a test should assert the collapse stays within a documented bound, or at least that wetland area at z3 stays above a floor. - R38: area by boundary class must not grow across a coarse zoom step by more than a sub-pixel amount (the absorption rule #47 fixed). - R95/R96: avg(ST_NPoints(geom)) at the coarsest zoom for roads/waterways/railways (near 2.0 = pre-split network, R95's signature; merge_lines is supposed to have fixed it). - R119: row counts per zoom for the se_* layers and every shared partition, no unintended empty partition. - R90/R91/R92: places — one label anchor per feature, same-name dedupe spatial not nationwide, no name repeats across a tile boundary.
Author
Owner

Result is in #134 — #134; the review note is the PR description.

Summary: 14 acceptance tests for the remaining Sweden R-checks — R38 (boundary-class step growth bound), R40/R125 (z3 wetland area floor), R95/R96 (merged chains at coarsest zoom), R90/R91 (same-name spatial separation), R119 (every shared partition non-empty). All 27 semap tests pass against the live DB (-acceptance-only -acceptance all conf/semap.yaml).

Two notes for the reviewer:

  • R92 (register-join name attachment) is genuinely not testable for Sweden — its names ride on the label points themselves, there is no unnamed geometry + separate register, and the output has no feature_id column. Said in the PR body and in the R92 Check line in docs/country-requirements.md.
  • Finding recorded, not fixed: map_water_bodies_3_se is empty for every country (fi 0, is 0, pl 1 rows) — the 4-px² floor at z3's pixel scale drops every lake piece of the pre-tessellated sources; cover paints the lakes at z3. The water_bodies R119 test records it as the R31 deliberate-empty case (asserts z4–z14). A stop_z: 4 or a lake-piece merge is a follow-up if water_bodies should draw at z3.
Result is in #134 — https://git.blahonga.org/art/ismap/pulls/134; the review note is the PR description. Summary: 14 acceptance tests for the remaining Sweden R-checks — R38 (boundary-class step growth bound), R40/R125 (z3 wetland area floor), R95/R96 (merged chains at coarsest zoom), R90/R91 (same-name spatial separation), R119 (every shared partition non-empty). All 27 semap tests pass against the live DB (`-acceptance-only -acceptance all conf/semap.yaml`). Two notes for the reviewer: - R92 (register-join name attachment) is genuinely not testable for Sweden — its names ride on the label points themselves, there is no unnamed geometry + separate register, and the output has no feature_id column. Said in the PR body and in the R92 Check line in docs/country-requirements.md. - Finding recorded, not fixed: map_water_bodies_3_se is empty for every country (fi 0, is 0, pl 1 rows) — the 4-px² floor at z3's pixel scale drops every lake piece of the pre-tessellated sources; cover paints the lakes at z3. The water_bodies R119 test records it as the R31 deliberate-empty case (asserts z4–z14). A stop_z: 4 or a lake-piece merge is a follow-up if water_bodies should draw at z3.
art closed this issue 2026-08-16 05:18:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
art/ismap#122
No description provided.