-
Notifications
You must be signed in to change notification settings - Fork 163
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
Crossing refactoring #1201
Crossing refactoring #1201
Conversation
Terms are not used for unsearchable preset so we can remove them.
This streamlines the presets and makes it easer to review and use them.
This streamlines the crossings presets
d5cdc9a
to
3ad887b
Compare
🍱 You can preview the tagging presets of this pull request here. |
b24e74a
to
8db5421
Compare
This way we have the same fields in all crossing presets: - "crossing" - "tactile_paving" - "crossing/island" This change the order of things slightly for some footway, cycleway crossing where `surface` is now a bit lower, but that should not be a problem.
This streamlines the fields on all line geometry crossings. - "oneway" - "surface" - "smoothness" - "crossing_raised" - "access" Those fields are always the last in the list. For traffic signal those specific fields are put above. Which is also the only change for one vertex preset in this commit, to have the "crossing_raised" come after the traffic signal specific fields and so the order is the same across presets. This will roll out the smoothness field for all crossings; it was previously only present in some. But given the importance of smoothness for accessibility I think that is OK. This commit also moves the surface (and smoothness where present) fields further down the list which reduces the priority a bit. The biggest change in priority is the oneway-field which had the first position before and now is below the defaults- and markings-field.
This extract the three fields to be reused in all traffic_signals presets. - "button_operated" - "traffic_signals/sound" - "traffic_signals/vibration" Nothing else is changed, this is just an extraction into a template.
1052eb6
to
a5af304
Compare
@@ -12,7 +12,7 @@ | |||
"license": "ISC", | |||
"main": "build.js", | |||
"scripts": { | |||
"lint": "prettier --check data", | |||
"lint": "prettier --check 'data/**/!(*.md)'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The alternative to this would be to change the prettier config to only apply the json-stringify on .json files and use regular prettier for other files.
However, our prettier config is still somewhat different from what I am used to and the resulting READM.md formatting is not great, so I think this is the better solution.
% git diff
diff --git a/.prettierrc b/.prettierrc
index 27505a24..78e7d6df 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,6 +1,13 @@
{
- "parser": "json-stringify",
"proseWrap": "never",
"bracketSpacing": true,
- "endOfLine": "lf"
+ "endOfLine": "lf",
+ "overrides": [
+ {
+ "files": "*.json",
+ "options": {
+ "parser": "json-stringify"
+ }
+ }
+ ]
}
7074531
to
b77c741
Compare
This extract the three moreFields to be reused in all traffic_signals presets. - "traffic_signals/arrow" - "traffic_signals/countdown" - "traffic_signals/minimap" For unclear reasons the cycleway/crossing/traffic_signals did not have those more fields which are now added to streamline the presets.
I added this in openstreetmap@3e5e99f an I think that was a mistake so lets remove it again.
The convention is, to tag this on the node _and_/_or_ on the separate `barrier=kerb+kerb=*` node when the path is mapped separately. It should be part of all crossing vertex presets.
All those fields used a different order of properties, which made it hard to compare them. This commit does not change anything on the fields, it just streamlines the same order of properties across files.
…tion Using the preset I find the markings field to be the most important to change. The `@templates/crossing/defaults` is less important for all situation except for `data/presets/highway/crossing.json`. The main reasons for this is, that only on the base `highway/crossing` the field `crossing` is actually visible. For the more precise presets this field is hidden by some automatic part of the system.
All fields are unsearchable (for now) so we can learn how to name properly. The names are adapted from `presets/highway/cycleway/crossing/bicycle_foot.json`. The terms are removed because the presets are unsearchable.
49f782c
to
8c52b99
Compare
…nd `@templates/crossing/defaults` The field "crossing" is removed from the `/defaults` fields. - it is only relevant for the geometry line because it is hidden on geometry vertex. - but on geometry line, we want it to be on the first position of fields - the `/defaults` fields however should be positioned below the `markings` which are more relevant for specifying the kind of crossing - the `/defaults` fields now includes `crossing_raised` which was removed from the previous and discontinued `/geomery_line` fields template. The new `@templates/crossing/bicycle_relevance` - is used on all highways that have bicycle relevance which are `highway=path|cycleway` and not on `highway=footway` For all traffic_signal presets, the order of fields is different to give the `/traffic_signal` more prominence.
The markings templates are not touched by this PR and it does seem to work without this. However, the fields are used on line and point geometries so either the `geometry` field is ignored during build or something else is happening…
…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.
…ng notes The field `flashing_light` was used on some of those presets. It is now more systematic. I also kept them on the `traffic_signals` presets because those can have additional `flashing_lights` as well.
…ossings The common practice is to tag this in the `highway=crossing` nodes and on separate `barrier=kerb` nodes but not on the crossing ways. Same as the `kerb` field.
Usually prettier can switch automatically to check Markdown and format it. However, this prettier config forces the JSON formatter for all files.
`npm run build` still works, so I don't think this is an issue. This also removes the second run of very similar code in the prettier workflow which I think is probably a legacy redundancy that can just be deleted. x
This fixes "crossing: New approach with …`@templates/crossing/defaults`". We need the "crossing" field on vertex/node fields as well to allow to quickly change the preset. SQ
…template/geometry_way_more` The "lit" value was present on some of the presets before and is common to be applied to all kind of ways.
8c52b99
to
4381d3a
Compare
@tyrasd this is ready for review. The testing part of the PR descriptions has links that make comparing the current and new setup easy. This is quite the undertaking… but I think it looks much better now! |
"value": "crossing" | ||
}, | ||
"searchable": false, | ||
"name": "Cycle & Foot Crossing" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this again: Is this really the right name? It is not wrong, to describe a path as Bike+Foot infrastructure. However this wording was inspired by https://github.com/openstreetmap/id-tagging-schema/pull/1201/files#diff-3b8f616654b5d2845f63eb05ce32b27741d3945ad0a71e55033de12a656d8b56R48 which behaves differently from this preset because it also has the addTags
part about foot+bicycle=designated
.
Since the preset is unsearchable, no one would be confused by this when searching for presets.
And also, I thing that even if people do not add the explicit access
keys, routers would still consider the generic path
bike + foot infrastructure (which is why some regions prefer this tagging for the bike+foot-case in the first place).
So my opinion is this is OK … or can be changed in follow up PRs when other cases are added or reevaluated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me after a first look. I'll will perform a double-check before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the end result seems much more organised than before, and I like the idea of putting READMEs in subfolders, since we don't allow comments in the presets themselves
Co-authored-by: Kyℓe Hensel <k-yle@users.noreply.github.com>
Let's get this merged. Sorry for needlessly letting this sit around. 🙇 |
This is a first follow up to the community meeting 2024-02-28 where we discussed how to improve the crossing presets.
@template
fields lists. Each commit message documents possible side effects.highway=path+path=crossing
, which is missing is missing ATM.lit
is displayed on all way type crossings. Buttactile_paving
is only part of the node crossings (and should be tagged on thebarrier=kerb
when separate ways are mapped)Testing
Show testcases and testing log
node
presets/highway/crossing.json
testing
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];node["highway"="crossing"]({{bbox}});out body;>;out skel qt;
testing
node/8677399770
==> All good
node
presets/highway/crossing/_marked.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];node["highway"="crossing"]["crossing"="marked"]({{bbox}});out body;>;out skel qt;
testing
node/7896056627
=> All good
addTags
=> shows yellow boxnode
presets/highway/crossing/_zebra.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];node["highway"="crossing"]["crossing"="zebra"]({{bbox}});out body;>;out skel qt;
testing
node/9446412638
=> All good
node
presets/highway/crossing/traffic_signals.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];node["highway"="crossing"]["crossing"="traffic_signals"]({{bbox}});out body;>;out skel qt;
testing
node/7242739087
=> All good
node
presets/highway/crossing/uncontrolled.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];node["highway"="crossing"]["crossing"="uncontrolled"]({{bbox}});out body;>;out skel qt;
testing
node/9435519215
=> All good
node
presets/highway/crossing/unmarked.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];node["highway"="crossing"]["crossing"="unmarked"]({{bbox}});out body;>;out skel qt;
testing
node/2289508839
=> All good
addTags
=> Works as expectedway
presets/highway/cycleway/_crossing.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["cycleway"="crossing"]["crossing"!~".*"]({{bbox}});out body;>;out skel qt;
testing
way/1014361250
=> All good
addTags
=> All goodway
presets/highway/cycleway/crossing/_marked.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="cycleway"]["cycleway"="crossing"]["crossing"="marked"]({{bbox}});out body;>;out skel qt;
testing
way/1009387182
=> All good
addTags
=> All goodway
presets/highway/cycleway/crossing/bicycle_foot.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="cycleway"]["cycleway"="crossing"]["foot"="designated"]({{bbox}});out body;>;out skel qt;
testing
way/1015325150
=> All good
addTags
=> All goodway
presets/highway/cycleway/crossing/traffic_signals.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="cycleway"]["cycleway"="crossing"]["crossing"="traffic_signals"]({{bbox}});out body;>;out skel qt;
testing
way/1189207983
=> All good
way
presets/highway/cycleway/crossing/uncontrolled.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="cycleway"]["cycleway"="crossing"]["crossing"="uncontrolled"]({{bbox}});out body;>;out skel qt;
testing
way/1197740324
=> All good
way
presets/highway/cycleway/crossing/unmarked.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="cycleway"]["cycleway"="crossing"]["crossing"="unmarked"]({{bbox}});out body;>;out skel qt;
testing
way/1225892530
=> All good
addTags
=> All goodway
presets/highway/footway/crossing.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="footway"]["footway"="crossing"]["crossing"!~".*"]({{bbox}});out body;>;out skel qt;
testing
way/895119395
=> All good
way
presets/highway/footway/crossing/_marked.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="footway"]["footway"="crossing"]["crossing"="marked"]({{bbox}});out body;>;out skel qt;
testing
way/887712501
=> All good
addTags
=> All good (cannot handle crossing_ref=zebra from this way, but that is expected)way
presets/highway/footway/crossing/_zebra.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="footway"]["footway"="crossing"]["crossing"="zebra"]({{bbox}});out body;>;out skel qt;
testing
way/578831990
=> All good
way
presets/highway/footway/crossing/traffic_signals.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="footway"]["footway"="crossing"]["crossing"="traffic_signals"]({{bbox}});out body;>;out skel qt;
testing
way/1227311404
=> All good
way
presets/highway/footway/crossing/uncontrolled.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="footway"]["footway"="crossing"]["crossing"="uncontrolled"]({{bbox}});out body;>;out skel qt;
testing
way/1165352272
=> ALl good
way
presets/highway/footway/crossing/unmarked.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="footway"]["footway"="crossing"]["crossing"="unmarked"]({{bbox}});out body;>;out skel qt;
testing
way/1026900725
=> All good
addTags
=> All goodway
presets/highway/path/_crossing.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="path"]["path"="crossing"]["crossing"!~".*"]({{bbox}});out body;>;out skel qt;
testing
way/947039863
=> All good
way
presets/highway/path/crossing/_marked.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="path"]["path"="crossing"]["crossing"="marked"]({{bbox}});out body;>;out skel qt;
testing
way/1252788055
=> All good
way
presets/highway/path/crossing/_traffic_signals.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="path"]["path"="crossing"]["crossing"="traffic_signals"]({{bbox}});out body;>;out skel qt;
testing
way/1122016511
=> All good
way
presets/highway/path/crossing/_uncontrolled.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="path"]["path"="crossing"]["crossing"="uncontrolled"]({{bbox}});out body;>;out skel qt;
testing
way/1205470144
=> All good
way
presets/highway/path/crossing/_unmarked.json
Overpass turbo query:
https://overpass-turbo.eu/?R&Q=[out:json][timeout:25];way["highway"="path"]["path"="crossing"]["crossing"="unmarked"]({{bbox}});out body;>;out skel qt;
testing
way/38771134
=> All good
addTags
=> All goodFollow ups
Show possible follow up task
add
segregated
to bike relevant crossing presetsFOLLOW UP: add more the
bicycle_foot
versions, see https://github.com/openstreetmap/id-tagging-schema/pull/1044/files#diff-9e0fa327563be30f7a255614f8ebe4f586dbfe35926aa4aaa1edeec723518aeaR2FOLLOW UP: Add
crossing:signals
field tocrossing/*traffic_signals
presets #1203traffic:signal
, see https://github.com/openstreetmap/id-tagging-schema/pull/1044/files#diff-b8505be38bbc0be40512bf63c04d79f36f8826808ba4f0c06f186527eddcc7b4 and https://github.com/openstreetmap/id-tagging-schema/pull/1044/files#diff-94dd79fa843f0a7faee85005ed0d10f687f5fcf6c4c89f2d3b3b2405f61afbb8R26)add
kerb
to all vertext (but not on line)FOLLOW UP: fields/kerb: Make
directionalCombo
to allow optional left/right tagging #1206kerb=*, kerb:left=*, kerb:right=*
)FOLLOW UP / RELATED: get add presets for
cycleway=traffic_island
#1068 readyFOLLOW UP: Add
crossing=informal
as unsearchable preset https://github.com/search?q=repo%3Astreetcomplete%2FStreetComplete+informal&type=code (but don't add it to the translated field-list so that stays focussed on the tree main types)FOLLOW UP: Add
crossing=no
as unsearchable preset crossing=no support #548 (but don't add it to the translated field-list so that stays focussed on the tree main types)FOLLOW UP: Add
highway=path+bicycle=designated
as regional preset(?) #1205bicycle_foot.json
for germanyhw=path + foot=designated + bicycle=designated
which AFAIK is more common in germany? Maybe we just want to change the searchability?)FOLLOW UP: Research if
traffic_calming=table
is common withcrossing=traffic_signals
? And iscrossing:island=yes
common withcrossing=traffic_signals
? If not, we could remove those from the presets for nodehw=crossing + crossing=traffic_signals
.FOLLOW UP: Research if
traffic_calming=table
is common withcrossing=traffic_signals
?Is
crossing:island=yes
common withcrossing=traffic_signals
? If not, we could remove those from the presets for nodehw=crossing + crossing=traffic_signals
. It does show the vertex-issue of "all 4 directions". Testcase https://ideditor.netlify.app/#background=Bing&disable_features=boundaries&id=n7242739087&locale=en&map=20.00/52.33904/13.65936FOLLOW UP: Discuss: Do we want the infrastructure preset on crossings as moreFields? There are cases like https://ideditor.netlify.app/#background=Bing&disable_features=boundaries&id=w1009387182&locale=en&map=20.00/52.47153/13.46059 where the crossing is on the bridge. => We can add it to the new @templates/geometry_way_more. "bridge" is used 3k times for "crossing=*" https://taginfo.openstreetmap.org/keys/crossing#combinations
FOLLOW UP: Discuss: Do we want to add
name
as moreFields onhw=path+path=crossing
because path sometimes have names? Testcase https://ideditor.netlify.app/#background=Bing&disable_features=boundaries&id=w947039863&locale=en&map=20.00/52.43023/13.44348name
is a general field which always shows when present, it does show below the explicit fields, though, see https://pr-1201--ideditor-presets-preview.netlify.app/id/dist/#background=Bing&disable_features=boundaries&id=w947039863&locale=en&map=20.00/52.43023/13.44348 at the end of the listFOLLOW UP: Do we want to add
width
andwidth:source
asmoreTags
?FOLLOW UP: For the
hw=path
we might also addbicycle:width
andfootway:width
asmoreTags
FOLLOW UP: Is there a way to add
bicycle:oneway=*
as kind of synonym foroneway=*
onhw=path|cycleway
? Both are used but only one is visible as field.FOLLOW UP: Add "
addTags
" forcrossing=zebra
to add markingzebra
. Maybe alsocrossing_ref=zebra
? Testcase https://ideditor.netlify.app/#background=Bing&disable_features=boundaries&id=n9446412638&locale=en&map=20.00/52.32519/13.62391FOLLOW UP: How can we make the
crossing
field show less messy stuff? We should test out the idea from this other PR to make all detailed presets unsearchable and add the crossings field with just the main options to select those unsearchable presets. And then have a special field for those edge cases when something was used that we don't support as preset…Helper to see usage stats (per country) in combination of tags: