Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add crossing:signals field to crossing/*traffic_signals presets #1203

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
02eb4d0
crossing/_marked: remove terms
tordans Apr 24, 2024
41a9443
cycleway/crossing: add "oneway" field to unmarked in bicycle_foot
tordans Apr 24, 2024
89a1671
cycleway/crossing: add "tactile_paving" to traffic_signal
tordans Apr 24, 2024
ca2b2e5
crossing: Introduce `@templates/crossing/defaults`
tordans Apr 24, 2024
e47e4d6
crossing: Introduce `@templates/crossing/geometry_line`
tordans Apr 24, 2024
50aeb69
crossing: Introduce `@templates/crossing/traffic_signal`
tordans Apr 24, 2024
c624700
crossing: Introduce `@templates/crossing/traffic_signal_more`
tordans Apr 24, 2024
99caf27
crossing: remove "oneway" on highway/crossing vertex
tordans Apr 24, 2024
cb4b64e
crossing: Add `kerb` to all vertex crossings
tordans Apr 24, 2024
3ab88d0
crossing: Use the same property order for `fields/crossing/markings*`
tordans Apr 24, 2024
cd56a0d
crossing: Move the `@templates/crossing/markings` to first field posi…
tordans Apr 24, 2024
30a8be9
crossing: Introduce `highway=path+path=crossing` fields
tordans Apr 24, 2024
75d756f
crossing: New approach with `@templates/crossing/bicycle_relevance` a…
tordans Apr 24, 2024
8ca0db5
crossing: Fix marking* templates by allowing `line` geometries
tordans Apr 25, 2024
46ac971
crossing: New approach with `@templates/crossing/bicycle_more`, addin…
tordans Apr 25, 2024
28638cf
crossing: Apply `flashing_light` to all `footway=crossing` and crossi…
tordans Apr 25, 2024
118ae02
crossing: Extract `tactile_paving` from shared `@template` to node cr…
tordans Apr 25, 2024
2cec131
crossing: Add readme for crossing presets and fields
tordans Apr 25, 2024
289a57b
crossing: Add readme docs on the `presets/@templates`
tordans Apr 26, 2024
fa267ab
Fix `npm run lint` by ignoring `*.md` files in `data`
tordans Apr 25, 2024
8bfaef1
Fix "Check file endings" workflow to also allow `.md` files
tordans Apr 25, 2024
6c0174e
crossing: Re-add `crossing` to all fields
tordans Apr 26, 2024
b1ab6e3
crossing: Add `lit` to all crossing "way" geometry presets via new `@…
tordans Apr 26, 2024
4381d3a
crossing: Fix fields order for highway/crossing
tordans Apr 26, 2024
56f4d3d
crossing: Add crossing:signals=yes field
tordans Apr 28, 2024
44fad5b
crossing: `addTags` for `crossing:signals`
tordans Apr 28, 2024
9898fd0
Update data/fields/crossing/signals.json
tordans Apr 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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

4 changes: 2 additions & 2 deletions data/fields/crossing/markings-BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"key": "crossing:markings",
"type": "combo",
"label": "{crossing/markings}",
"autoSuggestions": false,
"stringsCrossReference": "{crossing/markings}",
"iconsCrossReference": "{crossing/markings}",
"options": [
Expand All @@ -15,6 +16,5 @@
"include": [
"BG"
]
},
"autoSuggestions": false
}
}
6 changes: 3 additions & 3 deletions data/fields/crossing/markings-DE-AT-CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"key": "crossing:markings",
"type": "combo",
"label": "{crossing/markings}",
"autoSuggestions": false,
"stringsCrossReference": "{crossing/markings}",
"iconsCrossReference": "{crossing/markings}",
"options": [
"zebra",
"yes",
Expand All @@ -10,9 +13,6 @@
"dashes",
"surface"
],
"autoSuggestions": false,
"iconsCrossReference": "{crossing/markings}",
"stringsCrossReference": "{crossing/markings}",
"locationSet": {
"include": [
"DE",
Expand Down
6 changes: 3 additions & 3 deletions data/fields/crossing/markings-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"key": "crossing:markings",
"type": "combo",
"label": "{crossing/markings}",
"autoSuggestions": false,
"stringsCrossReference": "{crossing/markings}",
"iconsCrossReference": "{crossing/markings}",
"options": [
"zebra",
"dots",
"surface",
"yes",
"no"
],
"autoSuggestions": false,
"iconsCrossReference": "{crossing/markings}",
"stringsCrossReference": "{crossing/markings}",
"locationSet": {
"include": [
"PL"
Expand Down
6 changes: 3 additions & 3 deletions data/fields/crossing/markings_yes-BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -16,6 +17,5 @@
"include": [
"BG"
]
},
"autoSuggestions": false
}
}
10 changes: 5 additions & 5 deletions data/fields/crossing/markings_yes-DE-AT-CH.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -10,15 +14,11 @@
"dashes",
"surface"
],
"autoSuggestions": false,
"iconsCrossReference": "{crossing/markings}",
"stringsCrossReference": "{crossing/markings}",
"locationSet": {
"include": [
"DE",
"AT",
"CH"
]
},
"default": "yes"
}
}
10 changes: 5 additions & 5 deletions data/fields/crossing/markings_yes-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
"key": "crossing:markings",
"type": "combo",
"label": "{crossing/markings}",
"autoSuggestions": false,
"default": "yes",
"stringsCrossReference": "{crossing/markings}",
"iconsCrossReference": "{crossing/markings}",
"options": [
"zebra",
"dots",
"surface",
"yes",
"no"
],
"autoSuggestions": false,
"iconsCrossReference": "{crossing/markings}",
"stringsCrossReference": "{crossing/markings}",
"locationSet": {
"include": [
"PL"
]
},
"default": "yes"
}
}
2 changes: 1 addition & 1 deletion data/fields/crossing/markings_yes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions data/fields/crossing/signals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"key": "crossing:signals",
"type": "check",
"label": "Crosswalk Signals",
"terms": [
"traffic signals"
]
}
13 changes: 13 additions & 0 deletions data/presets/@templates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# About `@templates`

Presets in `@templats` are a convention for a specific type of presets that are only used from inside other presets.

Check failure on line 3 in data/presets/@templates/README.md

View workflow job for this annotation

GitHub Actions / Check for spelling errors

templats ==> templates

The only fields that really matter for these special presets are the `fields`.

All other properties can be copied from existing presets and ignored. They are default values that are meant to

## 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`.
23 changes: 23 additions & 0 deletions data/presets/@templates/crossing/bicycle_more.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"moreFields": [
"oneway",
"access",
"segregated"
],
"geometry": [
"line"
],
"tags": {
"@template": "crossing/bicycle_more"
},
"searchable": false,
"locationSet": {
"include": [
"999"
],
"exclude": [
"999"
]
},
"name": "{point}"
}
23 changes: 23 additions & 0 deletions data/presets/@templates/crossing/defaults.json
Original file line number Diff line number Diff line change
@@ -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}"
}
22 changes: 22 additions & 0 deletions data/presets/@templates/crossing/geometry_way_more.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"moreFields": [
"smoothness",
"lit"
],
"geometry": [
"line"
],
"tags": {
"@template": "crossing/geometry_way_more"
},
"searchable": false,
"locationSet": {
"include": [
"999"
],
"exclude": [
"999"
]
},
"name": "{point}"
}
3 changes: 2 additions & 1 deletion data/presets/@templates/crossing/markings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"crossing/markings-PL"
],
"geometry": [
"point"
"point",
"line"
],
"tags": {
"@template": "crossing/markings"
Expand Down
3 changes: 2 additions & 1 deletion data/presets/@templates/crossing/markings_yes.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"crossing/markings_yes-PL"
],
"geometry": [
"point"
"point",
"line"
],
"tags": {
"@template": "crossing/markings_yes"
Expand Down
22 changes: 22 additions & 0 deletions data/presets/@templates/crossing/surfacequality.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"fields": [
"surface",
"smoothness"
],
"geometry": [
"line"
],
"tags": {
"@template": "crossing/surfacequality"
},
"searchable": false,
"locationSet": {
"include": [
"999"
],
"exclude": [
"999"
]
},
"name": "{point}"
}
25 changes: 25 additions & 0 deletions data/presets/@templates/crossing/traffic_signal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"fields": [
"crossing/signals",
"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}"
}
24 changes: 24 additions & 0 deletions data/presets/@templates/crossing/traffic_signal_more.json
Original file line number Diff line number Diff line change
@@ -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}"
}
8 changes: 3 additions & 5 deletions data/presets/highway/crossing.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading
Loading