ITADN

Render fishpass and tidy waterway bridge/tunnel code

#5240Pull Requestdch0ph 创建于 2026-05-30
D
dch0phcommented
Fixes #2895 Closes #4388 Changes proposed in this pull request (which builds on #5201): - Render `waterway=fish_pass` from zoom 15 using bridge render for ditch/drain (or tunnel rendering if tagged as tunnel) - As noted in #5201, a strange composite rendering is currently shown for waterways tagged as both tunnels and bridges. The two inconsistently named MSS selectors `int_tunnel` and `bridge` are replaced with a single `int_brunnel` (values `bridge`, `tunnel` or `no`) [EDIT: now `int_bridge_tunnel`], which should reduce the XML output. The tunnel + bridge tagging is now explicitly not rendered as this can only be mistagging, and so will now appear as a distinct break in the waterway. - EDIT: Consistently use round line joins (previously bridge casings used mitre joins) - EDIT: Use an attachment for the bridge casing to avoid artifacts at breaks. Notes - As fish passes are "additions" to the waterway network, it is appropriate to start at later zooms. Typical fish passes are arguably too short to be rendered effectively at Z15, so a case could be made for starting at Z16. - `name` is not rendered, as we're moving away from rendering name by default. - For efficiency, the same primary SQL selection (and hopefully index) is used for all queries (even if not relevant to `waterway=fish_pass`) Test rendering with links to the example places: [Two fish passes on the same river](https://www.openstreetmap.org/#map=15/54.77654/-1.58744). Bottom left, typical "short" fish ladder on a weir, Top right, longer channel around a power generator. Before Z15: <img width="49" height="76" alt="image" src="https://github.com/user-attachments/assets/129edddb-79a2-4783-a6a0-97193fecbf3f" /> Z16: <img width="81" height="137" alt="image" src="https://github.com/user-attachments/assets/ebecb02f-67fd-4522-aa21-58dc3f7fd173" /> After Z15: <img width="51" height="86" alt="image" src="https://github.com/user-attachments/assets/fa48599e-d85b-428a-8fd9-c1cdcf7a93c7" /> Z16: <img width="91" height="151" alt="image" src="https://github.com/user-attachments/assets/ed8a96a3-4579-4dfb-a2c8-54952825be57" /> Test strip at Z15, showing effect of "brunnel" change: Before: <img width="405" height="57" alt="image" src="https://github.com/user-attachments/assets/3bab174e-7bf9-462e-b2d2-7c73b8c92fbf" /> (normal, bridge, tunnel, bridge+tunnel on `waterway=drain`) After: <img width="412" height="68" alt="image" src="https://github.com/user-attachments/assets/fe85ec5e-3e50-43f7-916f-0130bbf8cb5f" /> (Bottom row is `waterway=fish_pass`)
合并状态:未合并 10 条评论