Traffic signs: build script, POI picker, map overlay#13
Draft
tordans wants to merge 1 commit into
Draft
Conversation
Introduce a prep script using @osm-traffic-signs/converter that emits TrafficSignIndex.json and TrafficSigns.xcassets for Germany. The POI editor shows a + control on traffic_sign tags when the map country has a catalog, opening a searchable grid picker with chip selection and compose/decompose preserving unrecognized fragments. Display settings gain a Show Traffic Signs toggle that draws sign chains on nodes and ways with directional tag handling. Co-authored-by: Tobias <t@tobiasjordans.de>
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.
Problem (user story)
As an OpenStreetMap mapper surveying roads in Germany, I want to add and review
traffic_signtags without memorizing StVO codes or the exactDE:/;/,composition rules, so that I can tag signs accurately and see them on the map while editing.Acceptance criteria
traffic_sign,traffic_sign:forward, andtraffic_sign:backwardshow a + control that opens a searchable sign picker.src/traffic-signs/update.sh) bundles index metadata and SVG assets from@osm-traffic-signs/converter, wired intosrc/update_all.sh.Implementation notes (by Cursor)
Build pipeline (
src/traffic-signs/)update.sh/build_index.mjs: runsnpm installand consumes@osm-traffic-signs/converterto emit:TrafficSignIndex.json— per-country entries, search tokens, redirect map, frequently-used list, named valuesTrafficSigns.xcassets— 202 DE SVG imagesets (vector-preserving)src/update_all.shalongside presets and POI icons.Runtime (Swift)
TrafficSignCatalog/TrafficSignComposer: load bundled index; offline compose/decompose aligned with package rules (DE:prefix,;between signs,,within compound signs, redirects, named values).TrafficSignPickerViewController: search field, horizontal selected chips (catalog thumbnails + “other”), 4-column results grid; applies composed tag value.PresetValueTextField:+button (contactAdd) fortraffic_sign*keys whencurrentRegion.countryhas a catalog.TrafficSignOverlayLayer: bead-chain icon overlay on visible nodes/ways; respects directional tags and generic fallback rules; gated by country catalog and user pref.UserPrefs.mapViewEnableTrafficSigns.Scope / follow-ups
@osm-traffic-signs/converter— re-runsrc/traffic-signs/update.shafter upgrades.Testing notes (by @tordans)
Please verify on a DE map extent (country detection →
currentRegion.country == "de"):POI picker
traffic_sign(and:forward/:backwardif preset exposes them).205,310,city_limit→ grid updates.DE:/ separators.Map overlay
traffic_sign=*show icon chain at the point.traffic_sign:forward/:backwardand generic fallback cases.Build / release
cd src/traffic-signs && ./update.sh(requires Node/npm).cd src && ./update_all.shincludes traffic-signs step.TrafficSignIndex.jsonare in the app bundle.Regression