Modify

Opened 8 weeks ago

Last modified 3 weeks ago

#15483 new enhancement

[RFC][PATCH] Small improvements in default style

Reported by: naoliv Owned by: team
Priority: normal Milestone: 17.12
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 (1)

01.gif (2.1 KB) - added by Klumbumbus 4 weeks ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 weeks ago by bastiK

+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 Changed 8 weeks ago by naoliv

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 Changed 7 weeks ago by Klumbumbus

Milestone: 17.11

comment:4 Changed 4 weeks ago by Klumbumbus

In 13125/josm:

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

comment:5 Changed 4 weeks ago by Klumbumbus

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

Changed 4 weeks ago by Klumbumbus

Attachment: 01.gif added

comment:6 Changed 4 weeks ago by Klumbumbus

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

comment:7 Changed 3 weeks ago by Klumbumbus

Milestone: 17.1117.12

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 naoliv
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.