Modify

Opened 2 years ago

Last modified 2 months 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)

josm_area_highway_style.mapcss (400 bytes) - added by Woazboat 2 years ago.
(Rudimentary) style for area:highway
josm_area_highway_preset.xml (1.2 KB) - added by Woazboat 2 years ago.
(Rudimentary) preset for area:highway
2021-08-06_WIP_area_highway_style.patch (6.2 KB) - added by Woazboat 20 months ago.
Patch for area:highway support in the default style
josm_20102_defaultpresets.patch (37.6 KB) - added by skyper 20 months ago.
patch for defaultpresets adding area:highway
josm_20102_defaultpresets_v2.patch (37.5 KB) - added by skyper 20 months ago.
preset without emergency, better wording for busway and icon for traffic_island
2021-11-28_area_highway_style.patch (8.4 KB) - added by Woazboat 16 months ago.
Updated area:highway style with special handling for junctions https://github.com/JOSM/josm/pull/82
josm_20102_defaultpresets_v3.patch (37.5 KB) - added by skyper 15 months ago.
version 3: add layer and covered plus update to latest revision
josm_20102.patch (45.3 KB) - added by skyper 12 months ago.
adds values_context to preset; all in one patch ready for commit

Download all attachments as: .zip

Change History (41)

Changed 2 years ago by Woazboat

(Rudimentary) style for area:highway

Changed 2 years ago by Woazboat

(Rudimentary) preset for area:highway

comment:1 Changed 2 years ago by Woazboat

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 Changed 20 months ago by Woazboat

Cc: Woazboat 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

Changed 20 months ago by Woazboat

Patch for area:highway support in the default style

comment:3 Changed 20 months ago by skyper

Owner: changed from team to skyper

Thanks, I am working on a nice preset.

Changed 20 months ago by skyper

patch for defaultpresets adding area:highway

comment:4 Changed 20 months ago by skyper

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:

screenshot with unaligned entries

I regrouped the "Highway" group a bit, including raising the road restriction presets one level.

screenshot of menu without centered icons

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.

Last edited 20 months ago by skyper (previous) (diff)

comment:5 Changed 20 months ago by skyper

Owner: changed from skyper to team

comment:6 Changed 20 months ago by Woazboat

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

https://upload.wikimedia.org/wikipedia/commons/b/b0/Cultural_Centre_busway_station_February_2016.jpg
(In this case ironically depicting a bus stop on a BRT busway)

Last edited 20 months ago by Woazboat (previous) (diff)

comment:7 Changed 20 months ago by Woazboat

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.

Changed 20 months ago by skyper

preset without emergency, better wording for busway and icon for traffic_island

comment:8 Changed 20 months ago by skyper

Fine I removed emergency and reworded busway plus found a useful icon for traffic_signal, see josm_20102_defaultpresets_v2.patch.

comment:9 Changed 20 months ago by Woazboat

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 in reply to:  9 Changed 18 months ago by skyper

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 Changed 18 months ago by skyper

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 Changed 16 months ago by skyper

In this thread in the German forum, layer=* and covered=yes are mentioned as useful optional tags.

Changed 16 months ago by Woazboat

Updated area:highway style with special handling for junctions https://github.com/JOSM/josm/pull/82

comment:13 Changed 16 months ago by Woazboat

I updated the style to handle the combination of area:highway + junction. No special handling for highway=* + area=yes yet.

Changed 15 months ago by skyper

version 3: add layer and covered plus update to latest revision

comment:14 in reply to:  13 ; Changed 15 months ago by skyper

Replying to Woazboat:

I updated the style to handle the combination of area:highway + junction. No special handling for highway=* + area=yes yet.

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=* and covered=yes are 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?

Last edited 15 months ago by skyper (previous) (diff)

comment:15 in reply to:  14 Changed 15 months ago by Woazboat

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 Changed 15 months ago by skyper

Milestone: 21.12

comment:17 Changed 15 months ago by Don-vip

Milestone: 21.1222.01

comment:18 Changed 13 months ago by Woazboat

Summary: [RFC] [Patch] Add area:highway[Patch] Add area:highway

comment:19 Changed 13 months ago by stoecker

Milestone: 22.0122.02

Milestone renamed

comment:20 Changed 13 months ago by Don-vip

Milestone: 22.0222.03

comment:21 Changed 12 months ago by skyper

Well, I'd never uploaded the all in one patch. Here you go: josm_20102.patch

Last edited 12 months ago by skyper (previous) (diff)

Changed 12 months ago by skyper

Attachment: josm_20102.patch added

adds values_context to preset; all in one patch ready for commit

comment:22 Changed 12 months ago by taylor.smock

@skyper: Did you intend to give roundabouts area styling?

Example: https://osm.org/way/172364379

comment:23 Changed 12 months ago by Woazboat

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;
}

comment:24 Changed 12 months ago by taylor.smock

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 in reply to:  22 Changed 12 months ago by skyper

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=*.

comment:26 in reply to:  24 ; Changed 12 months ago by Woazboat

Replying to taylor.smock:

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.

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;
}
Last edited 12 months ago by Woazboat (previous) (diff)

comment:27 Changed 12 months ago by skyper

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;
}
Last edited 12 months ago by skyper (previous) (diff)

comment:28 in reply to:  26 Changed 12 months ago by skyper

Replying to Woazboat:

That might work. If we always include area=yes then that should also cover pedestrian areas.

I think area=yes might lead to problems regarding MP-relations.

comment:29 Changed 12 months ago by skyper

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.

Last edited 12 months ago by skyper (previous) (diff)

comment:30 Changed 12 months ago by taylor.smock

Summary: [Patch] Add area:highway[WIP Patch] Add area:highway

comment:31 Changed 12 months ago by skyper

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.

comment:32 Changed 12 months ago by skyper

The mappaint style part interacts with validator warnings and in its current form leads to false positive for split roundabouts, see #22004 and #17623.

comment:33 Changed 2 months ago by Klumbumbus

Ticket #22646 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to skyper
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.