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

refactor crossing presets to use approved "crossing:markings" tag: add field for the new tag, change "Marked Crosswalk" presets to use "crossing=uncontrolled" tag and add preset for "Cycle Crossing With Traffic Signals" #590

Merged
merged 11 commits into from
Nov 9, 2022
14 changes: 13 additions & 1 deletion data/fields/crossing.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{
"key": "crossing",
"type": "combo",
"label": "Type"
"label": "Type",
"options": [
"traffic_signals",
"uncontrolled",
"unmarked"
],
"strings": {
"options": {
"traffic_signals": "Crossing With Traffic Signals",
"uncontrolled": "Only Road Markings",
"unmarked": "No Road Markings or Traffic Lights"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three strings are inconsistent with each other. Both “traffic signals” and “traffic lights” are correct in American English, but we should stick to one. “Crossing” is redundant in this field.

Copy link
Contributor

@1ec5 1ec5 Sep 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should no get a string too? It would only make sense on a node. Maybe crossing=no should be a separate preset?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed the wording.

Maybe crossing=no should be a separate preset?

I haven't included https://wiki.openstreetmap.org/wiki/Tag:crossing%3Dno in this field, as it is intended to specify the type of a crossing, where the no option doesn't make sense.
crossing=no would indeed be useful as a standalone preset and as dedicated field to be added to presets like the highway=traffic_signals.

}
}
}
5 changes: 5 additions & 0 deletions data/fields/crossing/markings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"key": "crossing:markings",
"type": "combo",
"label": "Crossing Markings"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some strings would be helpful for this field. In particular, the zebra value was chosen as a concession to mappers used to the terminology in Europe (and some other countries), but unlike its official definition in some European countries, here it only refers to a marking pattern, without implying other aspects of the crossing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, strings would be definitely useful. I haven't included them in this PR already, because I didn't feel very confident choosing labels that are . Maybe you could help me out with these? This was one of my drafts, but several entries don't quite feel right to me (e.g. surface, zebra*, ladder:paired, …).

            "yes": "Unspecified Markings",
            "surface": "Distinct Surface",
            "zebra": "Zebra Stripes",
            "lines": "Solid Lines on Either Side",
            "ladder": "Ladder",
            "lines:paired": "Pairs of Lines on Either Side",
            "dashes": "Dashed Lines on Either Side",
            "dots": "Dotted Lines on Either Side",
            "zebra:double": "Zebra Stripes, Split in the Middle",
            "zebra:paired": "Zebra Stripes With Paired Bars",
            "zebra:bicolour": "Zebra Stripes With Alternating Colors",
            "ladder:skewed": "Skewed Ladder",
            "ladder:paired": "Ladder With Paired Bars",
            "no": "No Markings"

I think that eventually, it would probably be a better user interface if these options were presented using a pictorial form, like in this graphic on wikipedia:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paging @andrewharvey for his emoji skills. 😉 Until ideditor/schema-builder#56 is fixed, I tried a few things from the I Ching and box drawing symbols:

Value “Icon”
yes
surface
zebra ䷀ or ||||
lines ┃┃ or | |
ladder ▤ or ▥
lines:paired ║║
dashes ╏╏ or ===
dots ┋┋ or ⋮⋮ or ::::
zebra:double ䷁ or ☷ or ¦¦¦¦
zebra:paired ║║
zebra:bicolour ▮▯▮▯
ladder:skewed ⫻⃫͟͞
ladder:paired ╞╡
no

Some of these icons look OK in isolation, but I don’t think we’d be able to put together a coherent set for all the options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to tracktype, we can probably get away with longer, more descriptive strings to avoid confusion. I don’t think even the traffic engineering profession has a set term for every one of these values, let alone any dialect of colloquial English. In case it helps, here are the technical terms for these patterns in the U.S., paired with my best guess at what non-U.S. markings would be called, but I think using them without a more descriptive tooltip would risk mistranslation and misuse by lay mappers:

Value Description
yes Marked Somehow
surface Surface Treatment Only
zebra Longitudinal Bars
lines Transverse Lines
ladder Ladder With Longitudinal Bars
lines:paired Double Transverse Lines
dashes Dashed Transverse Lines
dots Dotted Transverse Lines
zebra:double Triple-Four (!?!?)
zebra:paired Paired Longitudinal Bars
zebra:bicolour Longitudinal Bars With Alternating Colors
ladder:skewed Ladder With Diagonal Bars
ladder:paired Ladder With Paired Longitudinal Bars
no Unmarked

}
2 changes: 1 addition & 1 deletion data/preset_categories/path.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"members": [
"highway/path",
"highway/footway",
"highway/footway/marked",
"highway/footway/crossing/uncontrolled",
"highway/footway/sidewalk",
"highway/steps",
"highway/cycleway",
Expand Down
3 changes: 2 additions & 1 deletion data/preset_defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"point"
],
"vertex": [
"highway/crossing/marked",
"highway/crossing/traffic_signals",
"highway/crossing/uncontrolled",
"highway/crossing/unmarked",
"railway/level_crossing",
"highway/traffic_signals",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"crossing",
"tactile_paving",
"crossing/island",
"crossing/markings",
"crossing_raised"
],
"moreFields": [
Expand All @@ -25,5 +26,6 @@
"marked crossing",
"crosswalk"
],
"name": "Marked Crosswalk"
"name": "Marked Crosswalk",
"searchable": false
}
1 change: 1 addition & 0 deletions data/presets/highway/crossing/_zebra.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"crossing",
"tactile_paving",
"crossing/island",
"crossing/markings",
"crossing_raised"
],
"geometry": [
Expand Down
2 changes: 1 addition & 1 deletion data/presets/highway/crossing/traffic_signals.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"icon": "temaki-railway_signals",
"fields": [
"crossing",
"tactile_paving",
"crossing/island",
"crossing/markings",
"crossing_raised",
"button_operated",
"traffic_signals/sound",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"icon": "temaki-pedestrian_crosswalk",
"fields": [
"crossing",
"tactile_paving",
"crossing/island",
"crossing/markings",
"crossing_raised"
],
"geometry": [
Expand All @@ -17,6 +17,5 @@
"key": "crossing",
"value": "uncontrolled"
},
"name": "Marked Crosswalk",
"searchable": false
"name": "Marked Crosswalk"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncontrolled isn’t just “marked”, it’s “marked without traffic signals”.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but we also need to keep a balance between keeping the preset names short and including every detail of a preset in its name. I thought that the presence of the dedicated preset for crossings with traffic signals makes it clear enough that the "marked crosswalk" preset is not meant for situations where there is a traffic light. There's also the ℹ️ icon which shows this additional detail for the preset. Last but not least, the name "Marked Crosswalk" worked well in the past for the tag crossing=marked which also implied the absence of traffic signals.

Maybe you have a better name for this preset (I'd rather avoid naming it Uncontrolled Crosswalk 😉 )?

Copy link
Contributor

@1ec5 1ec5 Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think “Marked Crosswalk” is passable as long as there’s a field that can transform it into crossing=traffic_signals. It looks like you’ve left the Type field in place for this preset, which helps somewhat. Currently, the field isn’t as usable to non-English speakers, but providing localizable option strings is also fraught: several of the most common values mean the same thing – or don’t mean the same thing at all, depending on who you ask – and each has its ardent defenders.

}
1 change: 0 additions & 1 deletion data/presets/highway/crossing/unmarked.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"icon": "temaki-pedestrian",
"fields": [
"crossing",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it more difficult to clarify that an unmarked crosswalk is in fact signalized, so I disagree that this PR fixes #507.

Copy link
Member Author

@tyrasd tyrasd Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm…

The common design pattern for the presets in this repo is to not repeat the field for "main tag" of a preset, because the intended mechanism to switch between presets is to, well, use the preset switcher UI to choose the better fitting preset. But perhaps we could make an exception in this case, in order to better accommodate the necessities for situations like #507. I'm open to that. //edit: I've now implemented this in the PR

I guess an alternative would be to get rid of the "specialized" crossing presets altogether and only work with fields. One downside of that would be that we'd loose the dedicated icons which currently distinguish the different kinds of crossings on the map view.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But perhaps we could make an exception in this case, in order to better accommodate the necessities for situations like #507.

Yes, I think of this as an exception because of these presets overlapping in meaning from a user standpoint. There’s some precedent for an exception like this, though usually it involves a multicombo field, such as Sports or Cuisine.

I guess an alternative would be to get rid of the "specialized" crossing presets altogether and only work with fields. One downside of that would be that we'd loose the dedicated icons which currently distinguish the different kinds of crossings on the map view.

I think this would be an obvious approach to take in the long run. Every time there’s a discussion around crossing classification, people clamor for regional presets for the only kinds of crossings that occur in their country. I’m sure UK mappers would appreciate an intuitive Toucan Crossing preset as much as U.S. mappers would appreciate a HAWK Crosswalk preset, not to mention other avian innovations around the world. But currently we don’t have room for regional crossing presets because of the sheer number of presets for each combination of mode-of-transportation and degree-of-traffic-control.

Another problem with the existing presets is that iD only remembers the last four presets, but it’s very common to need more than four presets when mapping a typical street due to all the separate crossing presets we have. For me, the MRU list is always thrashing between Marked Crosswalk, Unmarked Crossing, Crossing With Pedestrian Signals, Curb, Sidewalk, Traffic Signals, and Stop Sign. openstreetmap/iD#8895 would add a preference for remembering more presets at a time, but consolidating some of these closely related presets would minimize the thrashing without much inconvenience in my opinion.

"tactile_paving",
"crossing/island",
"crossing_raised"
Expand Down
5 changes: 3 additions & 2 deletions data/presets/highway/cycleway/_crossing.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"icon": "temaki-cyclist_crosswalk",
"fields": [
"crossing",
"access",
"surface",
"tactile_paving",
"crossing/island"
"crossing/island",
"crossing/markings",
"access"
],
"geometry": [
"line"
Expand Down
27 changes: 27 additions & 0 deletions data/presets/highway/cycleway/crossing/_marked.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"icon": "temaki-cyclist_crosswalk",
"fields": [
"crossing",
"surface",
"tactile_paving",
"crossing/island",
"crossing/markings",
"crossing_raised",
"access"
],
"geometry": [
"line"
],
"tags": {
"highway": "cycleway",
"cycleway": "crossing",
"crossing": "marked"
},
"reference": {
"key": "crossing",
"value": "marked"
},
"matchScore": 0.95,
"name": "Marked Cycle Crossing",
"searchable": false
}
6 changes: 4 additions & 2 deletions data/presets/highway/cycleway/crossing/bicycle_foot.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
"icon": "temaki-ped_cyclist_crosswalk",
"fields": [
"crossing",
"access",
"surface",
"smoothness",
"tactile_paving",
"crossing/island"
"crossing/island",
"crossing/markings",
"crossing_raised",
"access"
],
"geometry": [
"line"
Expand Down
34 changes: 34 additions & 0 deletions data/presets/highway/cycleway/crossing/traffic_signals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"icon": "fas-biking",
"fields": [
"crossing",
"surface",
"tactile_paving",
"crossing/island",
"crossing_raised",
"button_operated",
"traffic_signals/sound",
"traffic_signals/vibration",
"access"
],
"geometry": [
"line"
],
"tags": {
"highway": "cycleway",
"cycleway": "crossing",
"crossing": "traffic_signals"
},
"reference": {
"key": "crossing",
"value": "traffic_signals"
},
"terms": [
"cycle path crossing",
"cycleway crossing",
"bicycle crossing",
"bike crossing"
],
"matchScore": 0.95,
"name": "Cycle Crossing With Traffic Signals"
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"icon": "temaki-cyclist_crosswalk",
"fields": [
"crossing",
"access",
"surface",
"tactile_paving",
"crossing/island"
"crossing/island",
"crossing/markings",
"crossing_raised",
"access"
],
"geometry": [
"line"
],
"tags": {
"highway": "cycleway",
"cycleway": "crossing",
"crossing": "marked"
"crossing": "uncontrolled"
},
"reference": {
"key": "crossing",
"value": "marked"
"value": "uncontrolled"
},
"terms": [
"cycle crosswalk",
Expand Down
5 changes: 3 additions & 2 deletions data/presets/highway/cycleway/crossing/unmarked.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"icon": "fas-biking",
"fields": [
"crossing",
"access",
"surface",
"tactile_paving",
"crossing/island"
"crossing/island",
"crossing_raised",
"access"
],
"geometry": [
"line"
Expand Down
6 changes: 4 additions & 2 deletions data/presets/highway/footway/_crossing.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"fields": [
"crossing",
"access",
"surface",
"tactile_paving",
"crossing/island"
"crossing/island",
"crossing/markings",
"crossing_raised",
"access"
],
"geometry": [
"line"
Expand Down
29 changes: 29 additions & 0 deletions data/presets/highway/footway/crossing/_marked.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"icon": "temaki-pedestrian_crosswalk",
"fields": [
"crossing",
"surface",
"tactile_paving",
"crossing/island",
"crossing/markings",
"crossing_raised",
"access"
],
"moreFields": [
"flashing_lights"
],
"geometry": [
"line"
],
"tags": {
"highway": "footway",
"footway": "crossing",
"crossing": "marked"
},
"reference": {
"key": "crossing",
"value": "marked"
},
"name": "Marked Crossing",
"searchable": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"icon": "temaki-pedestrian_crosswalk",
"fields": [
"crossing",
"access",
"surface",
"tactile_paving",
"crossing/island",
"crossing_raised"
"crossing/markings",
"crossing_raised",
"access"
],
"geometry": [
"line"
Expand All @@ -20,6 +21,6 @@
"key": "crossing",
"value": "zebra"
},
"name": "Marked Crosswalk",
"name": "Marked Crossing",
"searchable": false
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"icon": "temaki-railway_signals",
"fields": [
"crossing",
"access",
"surface",
"tactile_paving",
"crossing/island",
"crossing/markings",
"crossing_raised",
"button_operated",
"traffic_signals/sound",
"traffic_signals/vibration"
"traffic_signals/vibration",
"access"
],
"moreFields": [
"traffic_signals/arrow",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"icon": "temaki-pedestrian_crosswalk",
"icon": "temaki-pedestrian",
"fields": [
"crossing",
"access",
"surface",
"tactile_paving",
"crossing/island",
"crossing_raised"
"crossing/markings",
"crossing_raised",
"access"
],
"moreFields": [
"flashing_lights"
Expand All @@ -17,18 +17,18 @@
"tags": {
"highway": "footway",
"footway": "crossing",
"crossing": "marked"
"crossing": "uncontrolled"
},
"reference": {
"key": "crossing",
"value": "marked"
"value": "uncontrolled"
},
"terms": [
"marked foot path crossing",
"marked crossing",
"marked crosswalk",
"marked pedestrian crosswalk",
"zebra crossing",
"crosswalk"
],
"name": "Marked Crosswalk"
"name": "Marked Crossing"
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"icon": "temaki-pedestrian",
"fields": [
"crossing",
"access",
"surface",
"tactile_paving",
"crossing/island",
"crossing_raised"
"crossing_raised",
"access"
],
"moreFields": [
"flashing_lights"
Expand Down
4 changes: 4 additions & 0 deletions data/presets/railway/crossing.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"icon": "temaki-pedestrian",
"fields": [
"crossing",
"crossing/barrier",
"crossing/bell",
"crossing/light"
],
"moreFields": [
"crossing/markings"
],
"geometry": [
"vertex"
],
Expand Down
Loading