Opened 5 years ago
Last modified 3 years ago
#20102 new enhancement
[WIP Patch] Add area:highway
| Reported by: | skyper | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Internal preset | Version: | |
| Keywords: | template_report area:highway | Cc: | Woazboat |
Description
Following my comment 2 on #20031.
Key:area:highway is widely in use and JOSM could support it with a preset and style support.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-11-17 02:38:27 +0100 (Tue, 17 Nov 2020) Revision:17322 Build-Date:2020-11-17 02:31:05 URL:https://josm.openstreetmap.de/svn/trunk
Attachments (8)
Change History (41)
by , 5 years ago
| Attachment: | josm_area_highway_style.mapcss added |
|---|
by , 5 years ago
| Attachment: | josm_area_highway_preset.xml added |
|---|
(Rudimentary) preset for area:highway
comment:1 by , 5 years ago
I've created a (very simple and stupid) area:highway style + preset for myself some time ago. I've attached it here in case someone finds it useful.
comment:2 by , 4 years ago
| Cc: | added |
|---|---|
| Summary: | Add area:highway → [RFC] [Patch] Add area:highway |
I've added styling for area:highway to the default style (see attached patch). For now I've chosen to use the same colors as the corresponding highways, but with less opaque fill than default and a slightly thinner dashed outline to make area:highway areas distinct from other areas and to keep the main highway line visible.
Note that I only included area:highway=* values that have a corresponding main highway=* tag with the exception of area:highway=shoulder and area:highway=bus_stop. Notably area:highway=emergency and area:highway=bus are not included for now (the first because it's disputed and badly named, the second because it's not clear when it should be used and feels like a not well thought out ad-hoc mix of lane area and access permission tagging scheme). I also added some new values corresponding to highway=* tags that came into use after the area:highway proposals (i.e. area:highway=busway, area:highway=platform and area:highway=emergency_bay).
Feedback welcome
by , 4 years ago
| Attachment: | 2021-08-06_WIP_area_highway_style.patch added |
|---|
Patch for area:highway support in the default style
by , 4 years ago
| Attachment: | josm_20102_defaultpresets.patch added |
|---|
patch for defaultpresets adding area:highway
comment:4 by , 4 years ago
I took you example but dropped y-junction from junction=* and proposed,bus_stop,bus,taxi_stop from area:highway=*. The shape can be taken from the object. proposed is not supported by core. With the new highway=busway and bus_bay=* I added busway as value and would propose the later one instead of bus_stop. taxi can be mapped as area of amenity=taxi.
Find attached patch josm_20102_defaultpresets.patch
I added icons to the list:
I regrouped the "Highway" group a bit, including raising the road restriction presets one level.
On the fly I added agricultural,forestry, to some access keys like horse, bicycle, ski and snowmobile.
Comments welcome.
Edit: The list misses icons for busway, traffic_island and shoulder.
comment:5 by , 4 years ago
| Owner: | changed from to |
|---|
comment:6 by , 4 years ago
The values for the old example preset were originally simply copy-pasted from here without modification: https://wiki.openstreetmap.org/wiki/Proposed_features/Street_area#Tagging
I didn't include proposed and taxi_stop in the new style for the same reasons (defining precise areas for a proposed highway doesn't make much sense when the road doesn't even exist yet + amenity=taxi already exists as an area like you said).
There's no preexisting tagging scheme for bus bays as areas, that's why I did include area:highway=bus_stop in the style. bus_bay=* is only intended to be used on linear highway=* ways to indicate that a bay exists, but not its exact area. I was originally afraid that existing usage of area:highway=bus_stop would be inconsistent due to the lack of clear tagging guidelines and the fact that highway=bus_stop is usually tagged on the platform on the side of the road. However, I checked and all of the examples I saw were very clearly used for bus bay areas.
highway=busway (and area:highway=busway) is only intended for bus rapid transit roads and not for all roads that can only be used by buses. E.g. small bypass roads, access roads to bus stations, etc... would still be tagged with the normal highway=*_link + area:highway=*_link, highway=service + area:highway=service, ... tags. area:highway=busway should not be used for bus bays or bus lanes on normal roads. (I wasn't sure whether to include area:highway=busway in the style at all since I'm certain people will start to misuse it for things like this if area:highway=bus isn't in there)
I'd be in favor of calling highway=busway/area:highway=busway 'Bus Rapid Transit Road' in the preset instead of simply 'Bus Way' to help prevent confusion and accidental misuse.
https://wiki.openstreetmap.org/wiki/Tag:highway%3Dbusway
The BRT wikipedia article has some nice example pictures of bus rapid transit roads https://en.wikipedia.org/wiki/Bus_rapid_transit

(In this case ironically depicting a bus stop on a BRT busway)
comment:7 by , 4 years ago
I'm also not sure if area:highway=emergency should be included in the preset (for now). It's controversial because it is very badly named and somewhat misleading. The symbol in the preset for example doesn't fit here either because it doesn't really have anything to do with emergencies but is rather supposed to indicate a hatched area that you're not supposed to drive on (e.g. at motorway junctions). I didn't include it in the style for this reason until this has been settled in further discussions.
by , 4 years ago
| Attachment: | josm_20102_defaultpresets_v2.patch added |
|---|
preset without emergency, better wording for busway and icon for traffic_island
comment:8 by , 4 years ago
Fine I removed emergency and reworded busway plus found a useful icon for traffic_signal, see josm_20102_defaultpresets_v2.patch.
follow-up: 10 comment:9 by , 4 years ago
Hmmm, the grey area fill style for junction=yes overrides the area:highway=* style as it is at the moment. What's the best way to solve this? Simply moving the area:highway=* tags down?
comment:10 by , 4 years ago
Replying to Woazboat:
What's the best way to solve this? Simply moving the
area:highway=*tags down?
I guess, either moving area:highway=* down or junction=* up. Alternative an own style for area:highway together with junction
comment:11 by , 4 years ago
Moving area:highway below junction=* does not give the information about junction=* anymore. There is another overlap between highway=service + area=yes and area:highway which is best visible between closed and open ways, as area:highway has the condition :closed. Do not get why area:highway always dominates highway=service + area=yes for closed ways independent of the position in the style file.
Best would be respecting highway=service + area=yes + area:highway by an own rendering. Same is true for junction=* + area:highway but I've just started playing around with style syntax and I am not sure how to properly solve it.
comment:12 by , 4 years ago
In this thread in the German forum, layer=* and covered=yes are mentioned as useful optional tags.
by , 4 years ago
| Attachment: | 2021-11-28_area_highway_style.patch added |
|---|
Updated area:highway style with special handling for junctions https://github.com/JOSM/josm/pull/82
follow-up: 14 comment:13 by , 4 years ago
I updated the style to handle the combination of area:highway + junction. No special handling for highway=* + area=yes yet.
by , 4 years ago
| Attachment: | josm_20102_defaultpresets_v3.patch added |
|---|
version 3: add layer and covered plus update to latest revision
follow-up: 15 comment:14 by , 4 years ago
Replying to Woazboat:
I updated the style to handle the combination of
area:highway+junction. No special handling forhighway=*+area=yesyet.
Nice. Do we need a solution for highway=* + area=yes + area:highway? I have no problem with area:highway being prominent but I know I am biased.
Replying to skyper:
In this thread in the German forum,
layer=*andcovered=yesare mentioned as useful optional tags.
I have added the two keys in version 3 and updated the preset patch to recent other changes.
Ready for commit? Should we set a milestone?
comment:15 by , 4 years ago
Replying to skyper:
Ready for commit? Should me set a milestone?
I think so. If we want to have special handling for highway=* + area=yes + area:highway we could always add that later.
comment:16 by , 4 years ago
| Milestone: | → 21.12 |
|---|
comment:17 by , 4 years ago
| Milestone: | 21.12 → 22.01 |
|---|
comment:18 by , 4 years ago
| Summary: | [RFC] [Patch] Add area:highway → [Patch] Add area:highway |
|---|
comment:20 by , 4 years ago
| Milestone: | 22.02 → 22.03 |
|---|
comment:21 by , 4 years ago
Well, I'd never uploaded the all in one patch. Here you go: josm_20102.patch
by , 4 years ago
| Attachment: | josm_20102.patch added |
|---|
adds values_context to preset; all in one patch ready for commit
follow-up: 25 comment:22 by , 4 years ago
@skyper: Did you intend to give roundabouts area styling?
Example: https://osm.org/way/172364379
comment:23 by , 4 years ago
Ah, the style previously only matched on yes while i made the new one match any non-false value for junction (didn't think about roundabouts). Maybe we should switch that back to yes only or exclude roundabouts/circular junctions.
old:
area[junction=yes] {
fill-color: junction#c0c0c0;
}
new:
area["junction"][!"junction"?!] {
set junctionArea;
}
area.junctionArea[!"area:highway"] {
fill-color: junction#c0c0c0;
}
follow-up: 26 comment:24 by , 4 years ago
Maybe just check for "highway"? I can't think of any (valid) cases for highway + area:highway on the same object, but I haven't done extensive mapping with area:highway either. So maybe there is an edge case I don't know about. Maybe pedestrian areas? But those are already covered by the pedestrian area styling.
comment:25 by , 4 years ago
Replying to taylor.smock:
@skyper: Did you intend to give roundabouts area styling?
Of course not thanks for spotting. Though, the mappaint stuff is mostly @Woazboat work.
Regarding highway=* + area:highway this combination is considered as invalid but there are edge cases with pedestrian areas, squares and service roads. You'll find some examples in the data and I doubt that it will change as long as OSM-Carto only supports some highway=* + area=yes but no area:highway=*.
follow-up: 28 comment:26 by , 4 years ago
Replying to taylor.smock:
Maybe just check for
"highway"? I can't think of any (valid) cases forhighway+area:highwayon the same object, but I haven't done extensive mapping witharea:highwayeither. So maybe there is an edge case I don't know about. Maybe pedestrian areas? But those are already covered by the pedestrian area styling.
That might work. If we always include area=yes then that should also cover pedestrian areas.
area["junction"][!"junction"?!][!"area"?!][!"highway"],
area["junction"][!"junction"?!]["area"?] {
set junctionArea;
}
comment:27 by , 4 years ago
I think excluding highway=* should be enough regarding junctions. I have not met a combination of highway=* + area:highway=* + junction=*, yet.
area["junction"][!"junction"?!][!"highway"] { set junctionArea; }
comment:28 by , 4 years ago
Replying to Woazboat:
That might work. If we always include
area=yesthen that should also cover pedestrian areas.
I think area=yes might lead to problems regarding MP-relations.
comment:29 by , 4 years ago
How about splitting it up for object types?
way["junction"][!"junction"?!][!"area"?!][!"highway"]:closed, way["junction"][!"junction"?!]["area"?]:closed; relation["junction"][!"junction"?!][type=multipolygon][!"highway"] { set junctionArea; }
Edit: Removed wrong line for MPs.
comment:30 by , 4 years ago
| Summary: | [Patch] Add area:highway → [WIP Patch] Add area:highway |
|---|
comment:31 by , 4 years ago
| Milestone: | 22.03 |
|---|
I have to test more extensively the rendering with combinations of junction=* with highway=* and/or area:highway=*. Hope I get to it the next weeks.
Maybe a .osm test file with examples is helpful.



(Rudimentary) style for area:highway