Modify

Opened 3 years ago

Last modified 16 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 3 years ago.
(Rudimentary) style for area:highway
josm_area_highway_preset.xml (1.2 KB ) - added by Woazboat 3 years ago.
(Rudimentary) preset for area:highway
2021-08-06_WIP_area_highway_style.patch (6.2 KB ) - added by Woazboat 3 years ago.
Patch for area:highway support in the default style
josm_20102_defaultpresets.patch (37.6 KB ) - added by skyper 3 years ago.
patch for defaultpresets adding area:highway
josm_20102_defaultpresets_v2.patch (37.5 KB ) - added by skyper 3 years 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 2 years 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 2 years ago.
version 3: add layer and covered plus update to latest revision
josm_20102.patch (45.3 KB ) - added by skyper 2 years ago.
adds values_context to preset; all in one patch ready for commit

Download all attachments as: .zip

Change History (41)

by Woazboat, 3 years ago

(Rudimentary) style for area:highway

by Woazboat, 3 years ago

(Rudimentary) preset for area:highway

comment:1 by Woazboat, 3 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 Woazboat, 3 years ago

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

by Woazboat, 3 years ago

Patch for area:highway support in the default style

comment:3 by skyper, 3 years ago

Owner: changed from team to skyper

Thanks, I am working on a nice preset.

by skyper, 3 years ago

patch for defaultpresets adding area:highway

comment:4 by skyper, 3 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:

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 3 years ago by skyper (previous) (diff)

comment:5 by skyper, 3 years ago

Owner: changed from skyper to team

comment:6 by Woazboat, 3 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

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 3 years ago by Woazboat (previous) (diff)

comment:7 by Woazboat, 3 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 skyper, 3 years ago

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

comment:8 by skyper, 3 years ago

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

comment:9 by Woazboat, 3 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?

in reply to:  9 comment:10 by skyper, 3 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 skyper, 3 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 skyper, 2 years ago

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

by Woazboat, 2 years ago

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

comment:13 by Woazboat, 2 years ago

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

by skyper, 2 years ago

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

in reply to:  13 ; comment:14 by skyper, 2 years ago

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 me set a milestone?

Version 0, edited 2 years ago by skyper (next)

in reply to:  14 comment:15 by Woazboat, 2 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 skyper, 2 years ago

Milestone: 21.12

comment:17 by Don-vip, 2 years ago

Milestone: 21.1222.01

comment:18 by Woazboat, 2 years ago

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

comment:19 by stoecker, 2 years ago

Milestone: 22.0122.02

Milestone renamed

comment:20 by Don-vip, 2 years ago

Milestone: 22.0222.03

comment:21 by skyper, 2 years ago

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

Last edited 2 years ago by skyper (previous) (diff)

by skyper, 2 years ago

Attachment: josm_20102.patch added

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

comment:22 by taylor.smock, 2 years ago

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

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

comment:23 by Woazboat, 2 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;
}

comment:24 by taylor.smock, 2 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.

in reply to:  22 comment:25 by skyper, 2 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=*.

in reply to:  24 ; comment:26 by Woazboat, 2 years ago

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 2 years ago by Woazboat (previous) (diff)

comment:27 by skyper, 2 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;
}
Last edited 2 years ago by skyper (previous) (diff)

in reply to:  26 comment:28 by skyper, 2 years ago

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 by skyper, 2 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.

Last edited 2 years ago by skyper (previous) (diff)

comment:30 by taylor.smock, 2 years ago

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

comment:31 by skyper, 2 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.

comment:32 by skyper, 2 years ago

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 by Klumbumbus, 16 months ago

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. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to skyper.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.