Modify

Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#15483 closed enhancement (fixed)

[RFC][PATCH] Small improvements in default style

Reported by: naoliv Owned by: team
Priority: normal Milestone: 18.01
Component: Internal mappaint style Version:
Keywords: mapcss Cc:

Description

Consider it as a proof of concept, please.

Have this area https://www.openstreetmap.org/#map=12/-21.4232/-45.9483 downloaded in JOSM, at zoom level 12.
We can see this:
https://i.imgur.com/jOY3rdF.png

And we can spot two problems:
1) highway=residential are on top of major highways (primary and secondary, for example)
2) a lot of blue nodes (for traffic_calming, turning_loop, etc) when we select to hide the nodes

Considering that the default z-index is 0, for 1 I did test this:

  • styles/standard/elemstyles.mapcss

     
    476476    color: motorroad#3377ff;
    477477}
    478478way[highway=motorway] {
     479    z-index: 1.3;
    479480    width: 3;
    480481    color: motorway#809bc0;
    481482}
    482483way[highway=motorway_link] {
     484    z-index: 1.2;
    483485    width: 3;
    484486    color: motorway#809bc0;
    485487}
    486488way[highway=trunk] {
     489    z-index: 1.1;
    487490    width: 3;
    488491    color: trunk#7fc97f;
    489492}
    490493way[highway=trunk_link] {
     494    z-index: 1.0;
    491495    width: 3;
    492496    color: trunk#7fc97f;
    493497}
    494498way[highway=primary] {
     499    z-index: 0.9;
    495500    width: 3;
    496501    color: primary#fb805f;
    497502}
    498503way[highway=primary_link] {
     504    z-index: 0.8;
    499505    width: 3;
    500506    color: primary#fb805f;
    501507}
    502508way[highway=secondary] {
     509    z-index: 0.7;
    503510    width: 3;
    504511    color: secondary#fdbf6f;
    505512}
    506513way[highway=secondary_link] {
     514    z-index: 0.6;
    507515    width: 3;
    508516    color: secondary#fdbf6f;
    509517}
    510518way[highway=tertiary] {
     519    z-index: 0.5;
    511520    width: 2;
    512521    color: tertiary#f7f496;
    513522}
    514523way[highway=tertiary_link] {
     524    z-index: 0.4;
    515525    width: 2;
    516526    color: tertiary#f7f496;
    517527}
    518528way[highway=unclassified] {
     529    z-index: 0.3;
    519530    width: 2;
    520531    color: street#c0c0c0;
    521532}
     
    538549    color: highway_track#6e541c;
    539550}
    540551way[highway=residential] {
     552    z-index: 0.2;
    541553    width: 2;
    542554    color: street#c0c0c0;
    543555}
    544556way[highway=living_street] {
     557    z-index: 0.1;
    545558    width: 2;
    546559    dashes: 9,9;
    547560    dashes-background-color: livingdashed#00ff00;

And got a nicer result:
https://i.imgur.com/sM0gDnQ.png https://i.imgur.com/IScnCj4.gif

Most probably a proper fix will need another values and/or major-z-index (or even something else) to achieve the result.

For 2 I did this:

  • styles/standard/elemstyles.mapcss

     
    47004700
    47014701*/
    47024702
    4703 node|z-16[setting("hide_icons")],
     4703node|z-14[setting("hide_icons")] {
     4704        symbol-size: 1;
     4705}
     4706
     4707node|z15-[setting("hide_icons")],
    47044708node|z17-[!is_prop_set("icon-image")][setting("hide_icons")]!.maxspeedclass,
    47054709node[!is_prop_set("icon-image")][!setting("hide_icons")]!.maxspeedclass {
    47064710    symbol-size: 2;

And got this (it doesn't have the z-layer part applied):
https://i.imgur.com/JEu3BJV.png https://i.imgur.com/9diFoEp.gif

ie, at zoom levels 16 and 15 we still see the small blue squares; 14 upwards we hide them.

Attachments (2)

01.gif (2.1 KB ) - added by Klumbumbus 7 years ago.
02.gif (805.5 KB ) - added by Klumbumbus 7 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 by bastiK, 7 years ago

+1 for the highways, z-index is the right tool to use here.

As for the blue dots, I would rather keep them. This an editor and not a renderer and the advantage of always having tagged nodes visible outweighs the cost (slightly cluttered map). You can still use filters, to get rid of them temporarily.

comment:2 by naoliv, 7 years ago

Maybe only some nodes could be hidden, then?
In lower zoom levels we usually don't need to see nodes connected to highways (highway=stop, crossing, turning_loop, traffic_signals, etc), since we are already seeing that there is a highway there.

comment:3 by Klumbumbus, 7 years ago

Milestone: 17.11

comment:4 by Klumbumbus, 7 years ago

In 13125/josm:

see #15483 - improve mappaint by layering highways (patch by naoliv)

comment:5 by Klumbumbus, 7 years ago

This change also improves the rendering on waterway tunnels:


I kept the numbers between 0 and 1 to avoid regressions with objects already using z-index: 1

by Klumbumbus, 7 years ago

Attachment: 01.gif added

comment:6 by Klumbumbus, 7 years ago

I'll test if it makes sense to hide node:tagged!:unconnected on low zoom. Maybe configurable as Help/Dialog/MapPaint/StyleSettings

comment:7 by Klumbumbus, 7 years ago

Milestone: 17.1117.12

comment:9 by Klumbumbus, 7 years ago

regression: #15698

in reply to:  8 comment:10 by bastiK, 7 years ago

Replying to Klumbumbus:

Has anyone an idea about https://lists.openstreetmap.org/pipermail/josm-dev/2017-December/007951.html?

Both should be similar, but I cannot really say without testing.

comment:11 by Klumbumbus, 7 years ago

Milestone: 17.1218.01

stabilization phase -> next milestone; the regression will be fixed in 17.12 in #15698

comment:12 by Klumbumbus, 7 years ago

In 13255/josm:

fix #15698, see #15483 - restore display of cycleway=opposite and limit it to ways with oneway=* except oneway=no

comment:13 by Klumbumbus, 7 years ago

In 13321/josm:

see #15483 - hide tagged waynodes at low zoom for better view and easier selection of ways. Deactivatable via a new style setting.

by Klumbumbus, 7 years ago

Attachment: 02.gif added

comment:15 by Klumbumbus, 7 years ago

Resolution: fixed
Status: newclosed

comment:16 by Klumbumbus, 5 years ago

regression: #18070

comment:17 by Klumbumbus, 5 years ago

In 15314/josm:

fix #18070, see #15483, fix #17022, see #11270 - restore display of tram when tagged together or overlapping with highway, handle light_rail the same as tram, i.e. draw on top of highway and don't warn about missing railway=crossing|level_crossing

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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