Skip to content

Commit

Permalink
crossing: New approach with @templates/crossing/bicycle_more, addin…
Browse files Browse the repository at this point in the history
…g `segregated`

The fields `oneway` and `access` are important for `highway=cycleway|path` crossings but not essential. They are more of a advanced user setup which should be visible when prev filled in but only added by users that read more about it before. They are moved to the `moreFields` for that reason.

The `segregated` is added here for the same reasons and because of it's importance for highway types that likely have bike traffic.
Ping openstreetmap#317

The `surface` and `smoothness` is extracted from the `@template` because it makes more sense to split them up in `fields` and `moreFields`. A templates adds too much abstraction in this case.
  • Loading branch information
tordans committed Apr 26, 2024
1 parent f75b573 commit fa3907b
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"fields": [
"oneway",
"access"
"access",
"segregated"
],
"geometry": [
"line"
],
"tags": {
"@template": "crossing/bicycle_relevance"
"@template": "crossing/bicycle_more"
},
"searchable": false,
"locationSet": {
Expand Down
6 changes: 5 additions & 1 deletion data/presets/highway/cycleway/_crossing.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"crossing",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
"{@templates/crossing/bicycle_more}"
],
"geometry": [
"line"
Expand Down
6 changes: 5 additions & 1 deletion data/presets/highway/cycleway/crossing/_marked.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"crossing",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
"{@templates/crossing/bicycle_more}"
],
"geometry": [
"line"
Expand Down
6 changes: 5 additions & 1 deletion data/presets/highway/cycleway/crossing/bicycle_foot.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
"crossing",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
"{@templates/crossing/bicycle_more}"
],
"geometry": [
"line"
Expand Down
6 changes: 4 additions & 2 deletions data/presets/highway/cycleway/crossing/traffic_signals.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
"{@templates/crossing/traffic_signal}",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"{@templates/crossing/traffic_signal_more}"
"{@templates/crossing/traffic_signal_more}",
"smoothness",
"{@templates/crossing/bicycle_more}"
],
"geometry": [
"line"
Expand Down
6 changes: 5 additions & 1 deletion data/presets/highway/cycleway/crossing/uncontrolled.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"crossing",
"{@templates/crossing/defaults}",
"{@templates/crossing/markings_yes}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
"{@templates/crossing/bicycle_more}"
],
"geometry": [
"line"
Expand Down
6 changes: 5 additions & 1 deletion data/presets/highway/cycleway/crossing/unmarked.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"fields": [
"crossing",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
"{@templates/crossing/bicycle_more}"
],
"geometry": [
"line"
Expand Down
3 changes: 2 additions & 1 deletion data/presets/highway/footway/crossing.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"crossing",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
"flashing_lights"
],
"geometry": [
Expand Down
3 changes: 2 additions & 1 deletion data/presets/highway/footway/crossing/_marked.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"crossing",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
"flashing_lights"
],
"geometry": [
Expand Down
5 changes: 4 additions & 1 deletion data/presets/highway/footway/crossing/_zebra.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"crossing",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
],
"geometry": [
"line"
Expand Down
5 changes: 3 additions & 2 deletions data/presets/highway/footway/crossing/traffic_signals.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"{@templates/crossing/traffic_signal}",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"{@templates/crossing/traffic_signal_more}"
"{@templates/crossing/traffic_signal_more}",
"smoothness",
],
"geometry": [
"line"
Expand Down
3 changes: 2 additions & 1 deletion data/presets/highway/footway/crossing/uncontrolled.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"crossing",
"{@templates/crossing/markings_yes}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
"flashing_lights"
],
"geometry": [
Expand Down
3 changes: 2 additions & 1 deletion data/presets/highway/footway/crossing/unmarked.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"fields": [
"crossing",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}"
"surface"
],
"moreFields": [
"smoothness",
"flashing_lights"
],
"geometry": [
Expand Down
7 changes: 5 additions & 2 deletions data/presets/highway/path/_crossing.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
"crossing",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}",
"{@templates/crossing/bicycle_relevance}"
"surface"
],
"moreFields": [
"smoothness",
"{@templates/crossing/bicycle_more}",
],
"geometry": [
"line"
Expand Down
5 changes: 3 additions & 2 deletions data/presets/highway/path/crossing/_marked.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"crossing",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}",
"{@templates/crossing/bicycle_relevance}"
"surface"
],
"moreFields": [
"smoothness",
"{@templates/crossing/bicycle_more}",
"flashing_lights"
],
"geometry": [
Expand Down
7 changes: 4 additions & 3 deletions data/presets/highway/path/crossing/_traffic_signals.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"{@templates/crossing/traffic_signal}",
"{@templates/crossing/markings}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}",
"{@templates/crossing/bicycle_relevance}"
"surface"
],
"moreFields": [
"{@templates/crossing/traffic_signal_more}"
"{@templates/crossing/traffic_signal_more}",
"smoothness",
"{@templates/crossing/bicycle_more}",
],
"geometry": [
"line"
Expand Down
5 changes: 3 additions & 2 deletions data/presets/highway/path/crossing/_uncontrolled.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"crossing",
"{@templates/crossing/markings_yes}",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}",
"{@templates/crossing/bicycle_relevance}"
"surface"
],
"moreFields": [
"smoothness",
"{@templates/crossing/bicycle_more}",
"flashing_lights"
],
"geometry": [
Expand Down
5 changes: 3 additions & 2 deletions data/presets/highway/path/crossing/_unmarked.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"fields": [
"crossing",
"{@templates/crossing/defaults}",
"{@templates/crossing/surfacequality}",
"{@templates/crossing/bicycle_relevance}"
"surface"
],
"moreFields": [
"smoothness",
"{@templates/crossing/bicycle_more}",
"flashing_lights"
],
"geometry": [
Expand Down

0 comments on commit fa3907b

Please sign in to comment.