wiki:Styles/SimpleBuildingTags

Version 12 (modified by heilbron, 11 years ago) ( diff )

Treat building:parts, too. Eliminated special treatment for special colours that actualkly aren't allowed.

This is a style to visualize the presence of some of the simple 3D building tags (i.e. building:colour, building:levels roof:levels), which can be obtained during ground surveys. Therefore, it helps mapping these tags in JOSM faster and more efficiently because you can see easily where these tags are missing.

Please add ideas for further improvement at the bottom of this page.

meta   
{
        title: "Simple building tags";
        author: "heilbron"; 
        version: "1.21_2020-10-05"; 
        description: "Visualize the presence of some basic simple 3D building tags (wall colour, number of building and roof levels)";
        link: "http://josm.openstreetmap.de/wiki/Styles/SimpleBuildingTags";
        watch-modified: true;
}
        
       
area[building], area[building:part]
{
        z-index: 1;
        fill-opacity: 0.03; /* let the background, i.e. the roof, be recognizable */
}

area[building]["building:colour"], area[building:part]["building:colour"]
{
        z-index: 1;
        opacity: 0.9;
        color: (tag("building:colour")); /* if a color is set, use it to color the outline ... */
}

area[building]["building:colour"=grey], area[building:part]["building:colour"=grey]
{
        color: #AAAAAA; /* ... but make grey (#BEBEBE) a little darker*/
}

area[building]["building:colour"=darkgrey], area[building:part]["building:colour"=darkgrey]
{
        color: #505050; /* ... but make darkgrey (#A9A9A9) quite darker*/
}

area[building]["building:colour"=brown], area[building:part]["building:colour"=brown]
{
        color: #802020; /* ... but make brown (#A52A2A) darker*/
}

area[building]["building:colour"=rosexxx], area[building:part]["building:colour"=rosexxx]
{
        color: #E8ADAA; /* ... does not and should not understand "rose" ?! */
}

area[building]["building:colour"=creamxxx], area[building:part]["building:colour"=creamxxx]
{
        color: #FFFFCC; /* ... JOSM does not and should not understand "cream" ?! */
}

area[building]["building:colour"=mustardxxx], area[building:part]["building:colour"=mustardxxx]
{
        color: #FFDB58; /* ... JOSM does not and should not understand "mustard" ?! */
}

area[building]["building:colour"=icebergxxx], area[building:part]["building:colour"=icebergxxx]
{
        color: #56A5EC; /* ... JOSM does not and should not understand "iceberg" ?! */
}

area[building]["building:colour"="light bluexxx"], area[building:part]["building:colour"="light bluexxx"]
{
        color: #ADDFFF; /* ... JOSM does not and should not  understand "light blue" ?! */
}

area[building]["building:colour"=peachxxx], area[building:part]["building:colour"=peachxxx]
{
        color: #FFE5B4; /* ... JOSM does not and should not understand "peach" ?! */
}

area[building]["building:colour"="lemon chiffon"], area[building:part]["building:colour"="lemon chiffon"]
{
        color: #FFF8C6; /* ... JOSM does not and should not understand "lemon chiffon" ("sandig" in German), should have no space in between */
}

area[building][!"building:colour"], area[building:part][!"building:colour"]
{
        z-index: 1;
        color: #080808; /* no building:colour tag => make the outline look almost black */
}


area|z17-[building][!"building:levels"], area|z17-[building:part][!"building:levels"] /* no building:levels set? => dash the outline */
{
        z-index: 1;
        width: 4;
        dashes: 3,3; /* any building WITHOUT a building:levels tag (except fpr garages) gets a 4 pixel outline */
}

area|z17-[building=~/garage.*/] /* almost ignore building tags for garages, i.e. make them all look the same */
{
        z-index: 0;
        width: 2;
        dashes: 8,1;
        color: #282828; /* garages get a thin, dashed, almost black outline, unless tagged otherwise */
}

area|z17-[building]["building:levels"], area|z17-[building:part]["building:levels"]
{
        z-index: 1;
        fill-opacity: 0.03; /* let the background, i.e. the roof, be recognizable */
        width: 5; /* any building WITH a building:levels tag (except for garages) gets a 5 pixel thick outline ... */
        /* text-halo-radius: 2; */  
        /* ... as well as a text tag giving the house number as well as the number of building:levels and roof:levels (and roof height in brackets): */
        text: eval(concat( cond(has_tag_key("addr:housenumber"), tag("addr:housenumber"), "."), " - ", tag("building:levels"), "/", cond(has_tag_key("roof:levels"), tag("roof:levels"), "") ,   cond(has_tag_key("roof:height"), concat("(",tag("roof:height"),"m)"), "")  )) ; 
        /* font-size: 9; */
        font-weight: bold;
}

Styles_SimpleBuildingTags-style.mapcss, Styles_SimpleBuildingTags.zip

Ideas for improvements:

  • Visualize the number of building:levels --> added in version 4.
  • Visualize roof:height in round brackets, too. --> added in version 11.
  • Treat building:part's the same as buildings. --> added in version 12.

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.