diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7f2532187..0a89fbd42 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,12 +7,12 @@ jobs: steps: - uses: actions/checkout@v3 - run: | - notJSONs=`find data/ -type f -not -iname "*.json"` - for f in $notJSONs + disallowedFiles=`find data/ -type f -not -iname "*.json" -not -iname "*.md"` + for f in $disallowedFiles do - echo "::error file=$f::File $f is not a .json file." + echo "::error file=$f::File $f is not a .json or .md file." done - if [ ! -z "$notJSONs" ]; then exit 1; fi + if [ ! -z "$disallowedFiles" ]; then exit 1; fi prettier: name: Check for code formatting mistakes @@ -23,7 +23,6 @@ jobs: with: node-version-file: '.nvmrc' - run: npm clean-install - - run: 'for f in `find data/ -type f -not -iname "*.json"`; do echo "::error File $f is not a .json file."; done' - run: npm run lint codespell: @@ -37,4 +36,3 @@ jobs: skip: ./.git,./dist,./data/deprecated.json ignore_words_list: "auxilary,casette,cemetary,chancel,discus,extentions,faiway,generat,goverment,guerilla,guyser,kindergarden,ore,pavillion,sculpter,storys,linz,te" only_warn: 1 - diff --git a/data/fields/crossing/markings-BG.json b/data/fields/crossing/markings-BG.json index 1188ab3b6..5c186e070 100644 --- a/data/fields/crossing/markings-BG.json +++ b/data/fields/crossing/markings-BG.json @@ -2,6 +2,7 @@ "key": "crossing:markings", "type": "combo", "label": "{crossing/markings}", + "autoSuggestions": false, "stringsCrossReference": "{crossing/markings}", "iconsCrossReference": "{crossing/markings}", "options": [ @@ -15,6 +16,5 @@ "include": [ "BG" ] - }, - "autoSuggestions": false + } } diff --git a/data/fields/crossing/markings-DE-AT-CH.json b/data/fields/crossing/markings-DE-AT-CH.json index 5268a8186..c758a8524 100644 --- a/data/fields/crossing/markings-DE-AT-CH.json +++ b/data/fields/crossing/markings-DE-AT-CH.json @@ -2,6 +2,9 @@ "key": "crossing:markings", "type": "combo", "label": "{crossing/markings}", + "autoSuggestions": false, + "stringsCrossReference": "{crossing/markings}", + "iconsCrossReference": "{crossing/markings}", "options": [ "zebra", "yes", @@ -10,9 +13,6 @@ "dashes", "surface" ], - "autoSuggestions": false, - "iconsCrossReference": "{crossing/markings}", - "stringsCrossReference": "{crossing/markings}", "locationSet": { "include": [ "DE", diff --git a/data/fields/crossing/markings-PL.json b/data/fields/crossing/markings-PL.json index c33df49f0..edc86d253 100644 --- a/data/fields/crossing/markings-PL.json +++ b/data/fields/crossing/markings-PL.json @@ -2,6 +2,9 @@ "key": "crossing:markings", "type": "combo", "label": "{crossing/markings}", + "autoSuggestions": false, + "stringsCrossReference": "{crossing/markings}", + "iconsCrossReference": "{crossing/markings}", "options": [ "zebra", "dots", @@ -9,9 +12,6 @@ "yes", "no" ], - "autoSuggestions": false, - "iconsCrossReference": "{crossing/markings}", - "stringsCrossReference": "{crossing/markings}", "locationSet": { "include": [ "PL" diff --git a/data/fields/crossing/markings_yes-BG.json b/data/fields/crossing/markings_yes-BG.json index 8b81bb2c8..9155115dc 100644 --- a/data/fields/crossing/markings_yes-BG.json +++ b/data/fields/crossing/markings_yes-BG.json @@ -2,9 +2,10 @@ "key": "crossing:markings", "type": "combo", "label": "{crossing/markings}", + "autoSuggestions": false, + "default": "yes", "stringsCrossReference": "{crossing/markings}", "iconsCrossReference": "{crossing/markings}", - "default": "yes", "options": [ "zebra", "no", @@ -16,6 +17,5 @@ "include": [ "BG" ] - }, - "autoSuggestions": false + } } diff --git a/data/fields/crossing/markings_yes-DE-AT-CH.json b/data/fields/crossing/markings_yes-DE-AT-CH.json index eee9c475d..04524b36b 100644 --- a/data/fields/crossing/markings_yes-DE-AT-CH.json +++ b/data/fields/crossing/markings_yes-DE-AT-CH.json @@ -2,6 +2,10 @@ "key": "crossing:markings", "type": "combo", "label": "{crossing/markings}", + "autoSuggestions": false, + "default": "yes", + "stringsCrossReference": "{crossing/markings}", + "iconsCrossReference": "{crossing/markings}", "options": [ "zebra", "yes", @@ -10,15 +14,11 @@ "dashes", "surface" ], - "autoSuggestions": false, - "iconsCrossReference": "{crossing/markings}", - "stringsCrossReference": "{crossing/markings}", "locationSet": { "include": [ "DE", "AT", "CH" ] - }, - "default": "yes" + } } diff --git a/data/fields/crossing/markings_yes-PL.json b/data/fields/crossing/markings_yes-PL.json index 71358b53d..c10103b09 100644 --- a/data/fields/crossing/markings_yes-PL.json +++ b/data/fields/crossing/markings_yes-PL.json @@ -2,6 +2,10 @@ "key": "crossing:markings", "type": "combo", "label": "{crossing/markings}", + "autoSuggestions": false, + "default": "yes", + "stringsCrossReference": "{crossing/markings}", + "iconsCrossReference": "{crossing/markings}", "options": [ "zebra", "dots", @@ -9,13 +13,9 @@ "yes", "no" ], - "autoSuggestions": false, - "iconsCrossReference": "{crossing/markings}", - "stringsCrossReference": "{crossing/markings}", "locationSet": { "include": [ "PL" ] - }, - "default": "yes" + } } diff --git a/data/fields/crossing/markings_yes.json b/data/fields/crossing/markings_yes.json index c088572f4..c0203f6ae 100644 --- a/data/fields/crossing/markings_yes.json +++ b/data/fields/crossing/markings_yes.json @@ -2,9 +2,9 @@ "key": "crossing:markings", "type": "combo", "label": "{crossing/markings}", + "default": "yes", "stringsCrossReference": "{crossing/markings}", "iconsCrossReference": "{crossing/markings}", - "default": "yes", "locationSet": { "exclude": [ "BG", diff --git a/data/presets/@templates/README.md b/data/presets/@templates/README.md new file mode 100644 index 000000000..92db8e55c --- /dev/null +++ b/data/presets/@templates/README.md @@ -0,0 +1,13 @@ +# About `@templates` + +Presets in `@templates` are a convention for a _virtual_ presets that are only used from inside other presets. + +The only property that really matter for these special presets are the `fields`. + +All other properties can be copied from existing template presets and ignored. They are default values that are meant to match all cases where they might be referenced. + +## How to use + +Inside another preset, reference the template – or any other preset - like `"{@templates/internet_access}"` in `fields` or `moreFields`. This will "copy" all the listed fields from the file `data/presets/@templates/internet_access.json`. + +You can only "copy" (template) `fields` to (preset) `fields` and (template) `moreFields` to (preset) `moreFields`. diff --git a/data/presets/@templates/crossing/bicycle_more.json b/data/presets/@templates/crossing/bicycle_more.json new file mode 100644 index 000000000..9de7a5ba9 --- /dev/null +++ b/data/presets/@templates/crossing/bicycle_more.json @@ -0,0 +1,23 @@ +{ + "moreFields": [ + "oneway", + "access", + "segregated" + ], + "geometry": [ + "line" + ], + "tags": { + "@template": "crossing/bicycle_more" + }, + "searchable": false, + "locationSet": { + "include": [ + "999" + ], + "exclude": [ + "999" + ] + }, + "name": "{point}" +} diff --git a/data/presets/@templates/crossing/defaults.json b/data/presets/@templates/crossing/defaults.json new file mode 100644 index 000000000..61bd6fc25 --- /dev/null +++ b/data/presets/@templates/crossing/defaults.json @@ -0,0 +1,23 @@ +{ + "fields": [ + "crossing/island", + "crossing_raised" + ], + "geometry": [ + "point", + "line" + ], + "tags": { + "@template": "crossing/defaults" + }, + "searchable": false, + "locationSet": { + "include": [ + "999" + ], + "exclude": [ + "999" + ] + }, + "name": "{point}" +} diff --git a/data/presets/@templates/crossing/geometry_way_more.json b/data/presets/@templates/crossing/geometry_way_more.json new file mode 100644 index 000000000..28de42633 --- /dev/null +++ b/data/presets/@templates/crossing/geometry_way_more.json @@ -0,0 +1,22 @@ +{ + "moreFields": [ + "smoothness", + "lit" + ], + "geometry": [ + "line" + ], + "tags": { + "@template": "crossing/geometry_way_more" + }, + "searchable": false, + "locationSet": { + "include": [ + "999" + ], + "exclude": [ + "999" + ] + }, + "name": "{point}" +} diff --git a/data/presets/@templates/crossing/markings.json b/data/presets/@templates/crossing/markings.json index 7f988d5b4..8a838aef5 100644 --- a/data/presets/@templates/crossing/markings.json +++ b/data/presets/@templates/crossing/markings.json @@ -6,7 +6,8 @@ "crossing/markings-PL" ], "geometry": [ - "point" + "point", + "line" ], "tags": { "@template": "crossing/markings" diff --git a/data/presets/@templates/crossing/markings_yes.json b/data/presets/@templates/crossing/markings_yes.json index f0ac114f3..4fd724fde 100644 --- a/data/presets/@templates/crossing/markings_yes.json +++ b/data/presets/@templates/crossing/markings_yes.json @@ -6,7 +6,8 @@ "crossing/markings_yes-PL" ], "geometry": [ - "point" + "point", + "line" ], "tags": { "@template": "crossing/markings_yes" diff --git a/data/presets/@templates/crossing/surfacequality.json b/data/presets/@templates/crossing/surfacequality.json new file mode 100644 index 000000000..ab10d7cf6 --- /dev/null +++ b/data/presets/@templates/crossing/surfacequality.json @@ -0,0 +1,22 @@ +{ + "fields": [ + "surface", + "smoothness" + ], + "geometry": [ + "line" + ], + "tags": { + "@template": "crossing/surfacequality" + }, + "searchable": false, + "locationSet": { + "include": [ + "999" + ], + "exclude": [ + "999" + ] + }, + "name": "{point}" +} diff --git a/data/presets/@templates/crossing/traffic_signal.json b/data/presets/@templates/crossing/traffic_signal.json new file mode 100644 index 000000000..9fba2425d --- /dev/null +++ b/data/presets/@templates/crossing/traffic_signal.json @@ -0,0 +1,24 @@ +{ + "fields": [ + "button_operated", + "traffic_signals/sound", + "traffic_signals/vibration" + ], + "geometry": [ + "point", + "line" + ], + "tags": { + "@template": "crossing/traffic_signal" + }, + "searchable": false, + "locationSet": { + "include": [ + "999" + ], + "exclude": [ + "999" + ] + }, + "name": "{point}" +} diff --git a/data/presets/@templates/crossing/traffic_signal_more.json b/data/presets/@templates/crossing/traffic_signal_more.json new file mode 100644 index 000000000..7d4f5ab85 --- /dev/null +++ b/data/presets/@templates/crossing/traffic_signal_more.json @@ -0,0 +1,24 @@ +{ + "moreFields": [ + "traffic_signals/arrow", + "traffic_signals/countdown", + "traffic_signals/minimap" + ], + "geometry": [ + "point", + "line" + ], + "tags": { + "@template": "crossing/traffic_signal_more" + }, + "searchable": false, + "locationSet": { + "include": [ + "999" + ], + "exclude": [ + "999" + ] + }, + "name": "{point}" +} diff --git a/data/presets/highway/crossing.json b/data/presets/highway/crossing.json index f22e4dfbe..64dbc548a 100644 --- a/data/presets/highway/crossing.json +++ b/data/presets/highway/crossing.json @@ -1,15 +1,13 @@ { "fields": [ "crossing", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings}", - "crossing_raised" + "{@templates/crossing/defaults}", + "tactile_paving" ], "moreFields": [ - "flashing_lights", "kerb", - "oneway" + "flashing_lights" ], "geometry": [ "vertex" diff --git a/data/presets/highway/crossing/README.md b/data/presets/highway/crossing/README.md new file mode 100644 index 000000000..7a04daf1a --- /dev/null +++ b/data/presets/highway/crossing/README.md @@ -0,0 +1,25 @@ +# About the crossing presets + +## General + +These presets use fields `@templates` to make sure all have a similar structure. +Some presets like `traffic_signals` have additional fields and use a different field order. +Try to keep the file structure very similar so they can be easily compared. + +## nodes `highway=crossing + crossing=*` + +Crossing nodes are handled by `highway/crossing.json` and `highway/crossing/*.json` (as geometry type `vertex`). + +Crossing nodes and crossing ways have a big overlap. +However, there are a few tags that should _only_ be expected on the crossing node. When crossing ways are present, this also means there are separate ways attached with additional nodes that may hold these additional tags. + +There are places in OSM that follow a different tagging style where only crossing ways are used (without the vertex nodes). Those regions might use other conventions on where to place each tag. + +## ways `highway=footway|cycleway|path + *=crossing + crossing=*` + +Crossing way presets are duplicated per highway class: +- `/highway/footway/crossing.json` + `/highway/footway/crossing/*.json` +- `/highway/cycleway/crossing.json` + `/highway/cycleway/crossing/*.json` +- `/highway/path/crossing.json` + `/highway/path/crossing/*.json` + +The crossing presets for `/cycleway*` and `/path*` are considered to be relevant for bike traffic and have additional fields that target bike vs. foot traffic. diff --git a/data/presets/highway/crossing/_marked.json b/data/presets/highway/crossing/_marked.json index cd054db53..fda274169 100644 --- a/data/presets/highway/crossing/_marked.json +++ b/data/presets/highway/crossing/_marked.json @@ -2,10 +2,13 @@ "icon": "temaki-pedestrian_crosswalk", "fields": [ "crossing", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings}", - "crossing_raised" + "{@templates/crossing/defaults}", + "tactile_paving" + ], + "moreFields": [ + "kerb", + "flashing_lights" ], "geometry": [ "vertex" @@ -23,11 +26,6 @@ "key": "crossing", "value": "marked" }, - "terms": [ - "zebra crossing", - "marked crossing", - "crosswalk" - ], "name": "{highway/crossing/uncontrolled}", "searchable": false } diff --git a/data/presets/highway/crossing/_zebra.json b/data/presets/highway/crossing/_zebra.json index 53690f057..ed71daa09 100644 --- a/data/presets/highway/crossing/_zebra.json +++ b/data/presets/highway/crossing/_zebra.json @@ -2,10 +2,13 @@ "icon": "temaki-pedestrian_crosswalk", "fields": [ "crossing", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings}", - "crossing_raised" + "{@templates/crossing/defaults}", + "tactile_paving" + ], + "moreFields": [ + "kerb", + "flashing_lights" ], "geometry": [ "vertex" diff --git a/data/presets/highway/crossing/traffic_signals.json b/data/presets/highway/crossing/traffic_signals.json index 1a278a84b..a241c4ffe 100644 --- a/data/presets/highway/crossing/traffic_signals.json +++ b/data/presets/highway/crossing/traffic_signals.json @@ -2,19 +2,15 @@ "icon": "temaki-railway_signals", "fields": [ "crossing", - "tactile_paving", - "crossing/island", + "{@templates/crossing/traffic_signal}", "{@templates/crossing/markings}", - "crossing_raised", - "button_operated", - "traffic_signals/sound", - "traffic_signals/vibration" + "{@templates/crossing/defaults}", + "tactile_paving" ], "moreFields": [ + "{@templates/crossing/traffic_signal_more}", "kerb", - "traffic_signals/arrow", - "traffic_signals/countdown", - "traffic_signals/minimap" + "flashing_lights" ], "geometry": [ "vertex" diff --git a/data/presets/highway/crossing/uncontrolled.json b/data/presets/highway/crossing/uncontrolled.json index 3a538b03e..370987fea 100644 --- a/data/presets/highway/crossing/uncontrolled.json +++ b/data/presets/highway/crossing/uncontrolled.json @@ -2,10 +2,13 @@ "icon": "temaki-pedestrian_crosswalk", "fields": [ "crossing", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings_yes}", - "crossing_raised" + "{@templates/crossing/defaults}", + "tactile_paving" + ], + "moreFields": [ + "kerb", + "flashing_lights" ], "geometry": [ "vertex" diff --git a/data/presets/highway/crossing/unmarked.json b/data/presets/highway/crossing/unmarked.json index 151625eb9..e8499ff67 100644 --- a/data/presets/highway/crossing/unmarked.json +++ b/data/presets/highway/crossing/unmarked.json @@ -2,9 +2,12 @@ "icon": "temaki-pedestrian", "fields": [ "crossing", - "tactile_paving", - "crossing/island", - "crossing_raised" + "{@templates/crossing/defaults}", + "tactile_paving" + ], + "moreFields": [ + "kerb", + "flashing_lights" ], "geometry": [ "vertex" diff --git a/data/presets/highway/cycleway/_crossing.json b/data/presets/highway/cycleway/_crossing.json index 55c0cd072..a15ee458a 100644 --- a/data/presets/highway/cycleway/_crossing.json +++ b/data/presets/highway/cycleway/_crossing.json @@ -2,11 +2,13 @@ "icon": "temaki-cyclist_crosswalk", "fields": [ "crossing", - "surface", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings}", - "access" + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}" ], "geometry": [ "line" diff --git a/data/presets/highway/cycleway/crossing/_marked.json b/data/presets/highway/cycleway/crossing/_marked.json index 352a0f20e..0ebea5fef 100644 --- a/data/presets/highway/cycleway/crossing/_marked.json +++ b/data/presets/highway/cycleway/crossing/_marked.json @@ -2,12 +2,13 @@ "icon": "temaki-cyclist_crosswalk", "fields": [ "crossing", - "surface", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings}", - "crossing_raised", - "access" + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}" ], "geometry": [ "line" diff --git a/data/presets/highway/cycleway/crossing/bicycle_foot.json b/data/presets/highway/cycleway/crossing/bicycle_foot.json index e98be5da5..e4a6a6a6b 100644 --- a/data/presets/highway/cycleway/crossing/bicycle_foot.json +++ b/data/presets/highway/cycleway/crossing/bicycle_foot.json @@ -11,13 +11,13 @@ "icon": "temaki-ped_cyclist_crosswalk", "fields": [ "crossing", - "surface", - "smoothness", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings}", - "crossing_raised", - "access" + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}" ], "geometry": [ "line" diff --git a/data/presets/highway/cycleway/crossing/traffic_signals.json b/data/presets/highway/cycleway/crossing/traffic_signals.json index feee3cc88..f40fd2571 100644 --- a/data/presets/highway/cycleway/crossing/traffic_signals.json +++ b/data/presets/highway/cycleway/crossing/traffic_signals.json @@ -1,19 +1,16 @@ { "icon": "fas-biking", "fields": [ - "oneway", "crossing", - "surface", - "crossing/island", + "{@templates/crossing/traffic_signal}", "{@templates/crossing/markings}", - "crossing_raised", - "button_operated", - "traffic_signals/sound", - "traffic_signals/vibration", - "access" + "{@templates/crossing/defaults}", + "surface" ], "moreFields": [ - "tactile_paving" + "{@templates/crossing/traffic_signal_more}", + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}" ], "geometry": [ "line" diff --git a/data/presets/highway/cycleway/crossing/uncontrolled.json b/data/presets/highway/cycleway/crossing/uncontrolled.json index 2501d8fba..5a8c70066 100644 --- a/data/presets/highway/cycleway/crossing/uncontrolled.json +++ b/data/presets/highway/cycleway/crossing/uncontrolled.json @@ -1,14 +1,14 @@ { "icon": "temaki-cyclist_crosswalk", "fields": [ - "oneway", "crossing", - "surface", - "tactile_paving", - "crossing/island", + "{@templates/crossing/defaults}", "{@templates/crossing/markings_yes}", - "crossing_raised", - "access" + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}" ], "geometry": [ "line" diff --git a/data/presets/highway/cycleway/crossing/unmarked.json b/data/presets/highway/cycleway/crossing/unmarked.json index a008c3eec..3d93b8025 100644 --- a/data/presets/highway/cycleway/crossing/unmarked.json +++ b/data/presets/highway/cycleway/crossing/unmarked.json @@ -2,11 +2,12 @@ "icon": "fas-biking", "fields": [ "crossing", - "surface", - "tactile_paving", - "crossing/island", - "crossing_raised", - "access" + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}" ], "geometry": [ "line" diff --git a/data/presets/highway/footway/crossing.json b/data/presets/highway/footway/crossing.json index f8f2d6d16..78513071d 100644 --- a/data/presets/highway/footway/crossing.json +++ b/data/presets/highway/footway/crossing.json @@ -1,14 +1,12 @@ { "fields": [ "crossing", - "surface", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings}", - "crossing_raised", - "access" + "{@templates/crossing/defaults}", + "surface" ], "moreFields": [ + "{@templates/crossing/geometry_way_more}", "flashing_lights" ], "geometry": [ diff --git a/data/presets/highway/footway/crossing/_marked.json b/data/presets/highway/footway/crossing/_marked.json index 0fad13965..599ee3314 100644 --- a/data/presets/highway/footway/crossing/_marked.json +++ b/data/presets/highway/footway/crossing/_marked.json @@ -2,14 +2,12 @@ "icon": "temaki-pedestrian_crosswalk", "fields": [ "crossing", - "surface", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings}", - "crossing_raised", - "access" + "{@templates/crossing/defaults}", + "surface" ], "moreFields": [ + "{@templates/crossing/geometry_way_more}", "flashing_lights" ], "geometry": [ diff --git a/data/presets/highway/footway/crossing/_zebra.json b/data/presets/highway/footway/crossing/_zebra.json index 502f7d326..7ac1a29df 100644 --- a/data/presets/highway/footway/crossing/_zebra.json +++ b/data/presets/highway/footway/crossing/_zebra.json @@ -2,12 +2,13 @@ "icon": "temaki-pedestrian_crosswalk", "fields": [ "crossing", - "surface", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings}", - "crossing_raised", - "access" + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "flashing_lights" ], "geometry": [ "line" diff --git a/data/presets/highway/footway/crossing/traffic_signals.json b/data/presets/highway/footway/crossing/traffic_signals.json index bf2a19843..28807d162 100644 --- a/data/presets/highway/footway/crossing/traffic_signals.json +++ b/data/presets/highway/footway/crossing/traffic_signals.json @@ -2,20 +2,15 @@ "icon": "temaki-railway_signals", "fields": [ "crossing", - "surface", - "tactile_paving", - "crossing/island", + "{@templates/crossing/traffic_signal}", "{@templates/crossing/markings}", - "crossing_raised", - "button_operated", - "traffic_signals/sound", - "traffic_signals/vibration", - "access" + "{@templates/crossing/defaults}", + "surface" ], "moreFields": [ - "traffic_signals/arrow", - "traffic_signals/countdown", - "traffic_signals/minimap" + "{@templates/crossing/traffic_signal_more}", + "{@templates/crossing/geometry_way_more}", + "flashing_lights" ], "geometry": [ "line" diff --git a/data/presets/highway/footway/crossing/uncontrolled.json b/data/presets/highway/footway/crossing/uncontrolled.json index 04b25e34c..828bb345b 100644 --- a/data/presets/highway/footway/crossing/uncontrolled.json +++ b/data/presets/highway/footway/crossing/uncontrolled.json @@ -2,14 +2,12 @@ "icon": "temaki-pedestrian", "fields": [ "crossing", - "surface", - "tactile_paving", - "crossing/island", "{@templates/crossing/markings_yes}", - "crossing_raised", - "access" + "{@templates/crossing/defaults}", + "surface" ], "moreFields": [ + "{@templates/crossing/geometry_way_more}", "flashing_lights" ], "geometry": [ diff --git a/data/presets/highway/footway/crossing/unmarked.json b/data/presets/highway/footway/crossing/unmarked.json index c9ca15624..bf0046273 100644 --- a/data/presets/highway/footway/crossing/unmarked.json +++ b/data/presets/highway/footway/crossing/unmarked.json @@ -2,13 +2,11 @@ "icon": "temaki-pedestrian", "fields": [ "crossing", - "surface", - "tactile_paving", - "crossing/island", - "crossing_raised", - "access" + "{@templates/crossing/defaults}", + "surface" ], "moreFields": [ + "{@templates/crossing/geometry_way_more}", "flashing_lights" ], "geometry": [ diff --git a/data/presets/highway/path/_crossing.json b/data/presets/highway/path/_crossing.json new file mode 100644 index 000000000..a6e412fb8 --- /dev/null +++ b/data/presets/highway/path/_crossing.json @@ -0,0 +1,30 @@ +{ + "icon": "temaki-cyclist_crosswalk", + "fields": [ + "crossing", + "{@templates/crossing/markings}", + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}", + "flashing_lights" + ], + "geometry": [ + "line" + ], + "tags": { + "path": "crossing" + }, + "addTags": { + "highway": "path", + "path": "crossing" + }, + "reference": { + "key": "path", + "value": "crossing" + }, + "searchable": false, + "name": "Cycle & Foot Crossing" +} diff --git a/data/presets/highway/path/crossing/_marked.json b/data/presets/highway/path/crossing/_marked.json new file mode 100644 index 000000000..cb2d398ed --- /dev/null +++ b/data/presets/highway/path/crossing/_marked.json @@ -0,0 +1,34 @@ +{ + "icon": "temaki-pedestrian_crosswalk", + "fields": [ + "crossing", + "{@templates/crossing/markings}", + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}", + "flashing_lights" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "path", + "path": "crossing", + "crossing": "marked" + }, + "addTags": { + "highway": "path", + "path": "crossing", + "crossing": "marked", + "crossing:markings": "yes" + }, + "reference": { + "key": "crossing", + "value": "marked" + }, + "name": "{highway/path/crossing/uncontrolled}", + "searchable": false +} diff --git a/data/presets/highway/path/crossing/_traffic_signals.json b/data/presets/highway/path/crossing/_traffic_signals.json new file mode 100644 index 000000000..de04e3df6 --- /dev/null +++ b/data/presets/highway/path/crossing/_traffic_signals.json @@ -0,0 +1,30 @@ +{ + "icon": "temaki-railway_signals", + "fields": [ + "crossing", + "{@templates/crossing/traffic_signal}", + "{@templates/crossing/markings}", + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/traffic_signal_more}", + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}", + "flashing_lights" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "path", + "path": "crossing", + "crossing": "traffic_signals" + }, + "reference": { + "key": "crossing", + "value": "traffic_signals" + }, + "name": "Cycle & Foot Crossing With Pedestrian Signals", + "searchable": false +} diff --git a/data/presets/highway/path/crossing/_uncontrolled.json b/data/presets/highway/path/crossing/_uncontrolled.json new file mode 100644 index 000000000..3dc03f42a --- /dev/null +++ b/data/presets/highway/path/crossing/_uncontrolled.json @@ -0,0 +1,28 @@ +{ + "icon": "temaki-pedestrian", + "fields": [ + "crossing", + "{@templates/crossing/markings_yes}", + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}", + "flashing_lights" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "path", + "path": "crossing", + "crossing": "uncontrolled" + }, + "reference": { + "key": "crossing", + "value": "uncontrolled" + }, + "name": "Marked Cycle & Foot Crossing", + "searchable": false +} diff --git a/data/presets/highway/path/crossing/_unmarked.json b/data/presets/highway/path/crossing/_unmarked.json new file mode 100644 index 000000000..f904a086e --- /dev/null +++ b/data/presets/highway/path/crossing/_unmarked.json @@ -0,0 +1,33 @@ +{ + "icon": "temaki-pedestrian", + "fields": [ + "crossing", + "{@templates/crossing/defaults}", + "surface" + ], + "moreFields": [ + "{@templates/crossing/geometry_way_more}", + "{@templates/crossing/bicycle_more}", + "flashing_lights" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "path", + "path": "crossing", + "crossing": "unmarked" + }, + "addTags": { + "highway": "path", + "path": "crossing", + "crossing": "unmarked", + "crossing:markings": "no" + }, + "reference": { + "key": "crossing", + "value": "unmarked" + }, + "name": "Unmarked Cycle & Foot Crossing", + "searchable": false +} diff --git a/package.json b/package.json index c15c0250d..1a51f74a7 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "license": "ISC", "main": "build.js", "scripts": { - "lint": "prettier --check data", + "lint": "prettier --check 'data/**/!(*.md)'", "lint:fix": "prettier --write data", "build": "node scripts/build.js", "dist": "node scripts/dist.js",