waterways and transit have the same over-division as roads and rail #27

Closed
opened 2026-08-01 21:14:33 +00:00 by art-bot · 1 comment
Collaborator

Both still measure ~2 points per feature at coarse zoom, the signature that merge_lines
exists for (see docs/performance.md, "Where the bytes are after both").

Measured now:

layer zoom features avg pts
waterways z6 IS 1 068 / PL 2 433 / SE 6 627 2.0
transit z9 PL 8 334 / SE 1 764 2.1

A trial merge of Swedish waterways at z6 gives 6 627 → 1 221 features (5.4×), and
waterways is 47 kB of the z5 central-Europe tile and 62 kB at z7 — second only to cover
now that roads and rail are done. transit is smaller but the change is the same four
config lines.

Deliberately not folded into #10, because waterways is entangled with two open
issues and the interaction wants thinking about rather than a config edit:

  • #20 (wide rivers vanish before their feeders) is about the importance ladder, and
    merging groups by importance, so chains break at every step of it.
  • #26 (generalizations destroy coastline) touches the same geometry.

transit on its own is safe and could go first — it groups by mode alone.

The mechanism, the safety measurements and the merge_from_zoom rule are all in
CLAUDE.md, "Generalization strategies". The one thing to check per layer is the merge
ratio, not the runtime.

Both still measure ~2 points per feature at coarse zoom, the signature that `merge_lines` exists for (see `docs/performance.md`, "Where the bytes are after both"). Measured now: | layer | zoom | features | avg pts | |---|---|---:|---:| | `waterways` | z6 | IS 1 068 / PL 2 433 / SE 6 627 | **2.0** | | `transit` | z9 | PL 8 334 / SE 1 764 | **2.1** | A trial merge of Swedish `waterways` at z6 gives **6 627 → 1 221 features** (5.4×), and `waterways` is 47 kB of the z5 central-Europe tile and 62 kB at z7 — second only to `cover` now that roads and rail are done. `transit` is smaller but the change is the same four config lines. **Deliberately not folded into #10**, because `waterways` is entangled with two open issues and the interaction wants thinking about rather than a config edit: - **#20** (wide rivers vanish before their feeders) is about the `importance` ladder, and merging groups *by* `importance`, so chains break at every step of it. - **#26** (generalizations destroy coastline) touches the same geometry. `transit` on its own is safe and could go first — it groups by `mode` alone. The mechanism, the safety measurements and the `merge_from_zoom` rule are all in CLAUDE.md, "Generalization strategies". The one thing to check per layer is the merge *ratio*, not the runtime.
Author
Collaborator

merge_lines landed for both layers in 3ae69c3. The over-division signature is gone from
waterways:

waterways z6 features before after
Sweden 6 627 1 221 (5.4×)
Poland 2 433 790
Iceland 1 068 396

and points-per-feature at z9 is now 4.8 (SE) / 5.1 (PL) / 5.8 (IS), against the flat 2.0
this issue measured. merge_from_zoom: 12 came out of the ratio measurements — 1.7× at z13,
2.5× at z11, 3.3× at z9, 5.4× at z6, climbing monotonically as the network thins.

transit merged 1 764 → 862 (2.0×) in Sweden and 1.14× in Poland, which is the one part
that did not land. It is not a "merge earlier" problem and not a precision problem: 73% of
Poland's tram nodes are junctions
(BDOT10k models each track separately and splits it at
every crossover), and ST_LineMerge only chains through degree-2 nodes. That is tracked
with its own measurements in #38, so there is nothing left under this number.

The entanglement this issue was held back for is also resolved: #26 and #20 are closed
alongside it.

`merge_lines` landed for both layers in `3ae69c3`. The over-division signature is gone from `waterways`: | `waterways` z6 features | before | after | |---|---:|---:| | Sweden | 6 627 | **1 221** (5.4×) | | Poland | 2 433 | **790** | | Iceland | 1 068 | **396** | and points-per-feature at z9 is now 4.8 (SE) / 5.1 (PL) / 5.8 (IS), against the flat **2.0** this issue measured. `merge_from_zoom: 12` came out of the ratio measurements — 1.7× at z13, 2.5× at z11, 3.3× at z9, 5.4× at z6, climbing monotonically as the network thins. `transit` merged 1 764 → 862 (2.0×) in Sweden and **1.14×** in Poland, which is the one part that did not land. It is not a "merge earlier" problem and not a precision problem: **73% of Poland's tram nodes are junctions** (BDOT10k models each track separately and splits it at every crossover), and `ST_LineMerge` only chains through degree-2 nodes. That is tracked with its own measurements in #38, so there is nothing left under this number. The entanglement this issue was held back for is also resolved: #26 and #20 are closed alongside it.
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#27
No description provided.