Skip to content

JOSM MapCSS Paint Style Wiki

ddkpisme edited this page Oct 7, 2020 · 13 revisions

Welcome to the applepaintstyles wiki!

Table of Contents

1. Style Information

2. User Guide

3. Setting Documentation

Click to see all settings!
  1. Display address labels
  2. Areas drawn with partial fill
  3. Hide tagged waynodes at low zoom
  4. Large nodes (all zoom levels)
  5. Display highway ref labels
  6. Display larger highway and place name labels
  7. Display destinations on ways and relations
  8. Remove all street labels
  9. Hide icons (at low zoom)
  10. Highlight continuous roads
  11. Inline validation checks
  12. Z-Index check
  13. Sensitive features
  14. Highlight highways by int_ref Tag
  15. Check for missing or mismatching refs
  16. Highlight one-way roads
  17. Highlight bus routes
  18. Highlight highways by ref tag
  19. Highlight associatedStreets
  20. Show landuse labels
  21. Show unconnected nodes
  22. Alternative highways
  23. Highlight pedestrian accessibility

4. Style Guide

5. Additional Information

Style Information

JOSM uses MapCSS stylesheets to customize the map display. Using a series of selectors and declarations, a stylesheet is made up of a series of rules which dictate how different elements style on the map. This stylesheet is intended to be used as a base style which replaces the JOSM default base style.

User Guide

Local Copy Installation

Use this method for manual updates

  1. Copy a zipped version of this repo by clicking 'Clone or download' -> 'Download ZIP'. Unzip this file into a directory of your choosing.

  2. Open JOSM preferences and navigate to Map Paint Styles (third icon down, second over):

    • "+" under Active styles.
    • Name the style.
    • For 'URL / File', navigate to the directory from Step 1, and select the file with the '.mapcss' file extension.
    • Ok.

  1. Installed! You should now see the paint style in the 'Map Paint Styles' window.

Notes:

  • If you do not download a zipped copy, all icons could be broken!
  • Enabling other paint styles may cause unintended display issues!

Github Remote URL Installation

Use this method for automatic updates

  1. Copy HTTPS link to GitHub by clicking 'Clone or download'

    • Ensure dialog box says "Clone with HTTPS". If not, click 'Use HTTPS'
    • Copy URL
  2. Open JOSM preferences and navigate to Map Paint Styles (third icon down, second over):

    • "+" under Active styles.
    • Name the style.
    • Paste the repo link from Step 1 into 'URL / File'.
      • https://github.com/osmlab/applepaintstyles/archive/main.zip
    • Ok.
  3. Installed! You should now see the paint style in the 'Map Paint Styles' window.

Notes:

  • If you do not download a zipped copy, all icons could be broken!
  • Enabling other paint styles may cause unintended display issues!

Usage

By default the 'Hide icons (at low zoom)', 'Areas drawn with partial fill', 'Inline validation checks', 'Sensitive features', and 'Hide tagged waynodes at low zoom' settings are turned on. To enable and disable these and other settings:

  1. Right click on the paint style -> Left click 'Style settings'

  2. Select the appropriate setting group:

    • Feature/Label Display Settings contains settings which dictate general map feature display and labeling
    • Tag/Geometry Check Settings contains settings which operate based on specific tag or geometry interactions
    • Alternative Settings contains settings which offer an alternative to the base style
  3. Select the appropriate setting(s)

  4. Remember that having other paint styles active simultaneously may cause unintended display issues. It is recommended that other styles sit below this style in the 'Map Paint Styles' window.

Setting Documentation

Here is documentation on each setting within the paint style

  • Display address labels

Enabling this setting will display the 'name' field of any POI (Point of Interest). This includes building names, address numbers, shop names, and tourism feature names.

  • Areas drawn with partial fill

Enabling this setting will cause area features to only style around the border of the feature. This helps with visibility and rendering when multiple areas overlap.

  • Hide tagged waynodes at low zoom

Enabling this setting will hide nodes which have tags on them, and that are part of a way.

  • Large nodes (all zoom levels)

Enabling this setting will enlarge connection nodes.

  • Display highway ref labels

Enabling this setting will display the 'ref' tag, instead of the 'name' tag, on highway features.

  • Display larger highway and place name labels

Enabling this setting will enlarge the 'name' label on highway and place features. It will also render these labels at lower zoom levels.

  • Display destinations on ways and relations

Enabling this setting will highlight features with any 'destination' tag or a member of a 'destination_sign' relation. It will also display a label for the 'from' and 'to' roles if applicable.

  • Remove all street labels

Enabling this setting will remove all labels on highway features. This is useful in data dense areas, or at low zoom levels.

  • Hide icons (at low zoom)

Enabling this setting will hide POI icons and their labels at low zoom.

  • Highlight continuous roads

Enabling this setting will highlight roads segments based on their way ID. Each road segment will be styled using one of 32 random colors. This can be used to identify roads which may need to be split.

  • Inline validation checks

Enabling this setting will highlight a variety of data validation errors directly in the map display without having to validate!

  • Roundabout Check: Check for missing 'roundabout' tags on circular geometry
  • Motorway Oneway Checks: Check for 'oneway' tags on motorway and motorway_links
  • Suspicious Roundabout Check: Check for incorrect 'oneway' direction on roundabouts
  • Large Building (area > 520000): Check for buildings which are larger than 520000 sq. m.
  • Building Crossing Building: Check for buildings with overlapping geometry
  • Floating Roads Check: Check for roads which do not connect to any other features
  • Dead-End Oneways: Check for 'oneway' segments which dead end
  • Bad Building Values: Check for 'building' values which are suspicious or deprecated
  • Buildings as Water or Roads: Check for 'building' features with 'highway' or 'waterway' tags
  • Building Intersecting Road Checks: Check for buildings which intersect roads
  • Building Inside Building: Check for building features which reside inside other building features
  • Water Snapped to Roads and Buildings: Check for water features (ways only) which are snapped to roads or buildings
  • Buildings Within Water: Check for buildings which reside inside water features
  • Waterways Crossing With Buildings: Check for waterways which cross building geometry
  • Strange Character in Tag: Check for strange characters in Key(s): + / & < > ; ' " % # @ \ , . { } ? * ^ $
  • Invalid Multipolygon Check: Identifies when outer member overlaps with another outer member, Identifies inner member intersecting with an outer member (both on the node and polygon), Identifies an outer member within an inner member
  • Z-Index check

Enabling this setting will highlight features based on their 'layer' tag.

  • Sensitive features

Enabling this setting will highlight features which are sensitive or require additional caution when editing. Examples include admin boundaries, military features, and place features.

  • Highlight highways by int_ref Tag

Enabling this setting will highlight highways with an 'int_ref' tag using one of 32 random colors. This can be used to check for gaps or inconsistencies in the 'int_ref' road network.

  • Check for missing or mismatching refs

Enabling this setting will highlight roads with missing 'ref' tags, or roads where there is a mismatch between the 'ref' value on the way and the relation.

  • Highlight one-way roads

Enabling this setting will highlight roads with a 'oneway' tag.

  • Highlight bus routes

Enabling this setting will highlight bus route relations using one of 32 random colors.

  • Highlight highways by ref tag

Enabling this setting will highlight highways with a 'ref' tag using one of 32 random colors. This can be used to check for gaps or inconsistencies in the 'ref' road network.

  • Highlight associatedStreets

Enabling this setting will highlight all members of an 'associatedStreet' relation using one of 32 random colors.

  • Show landuse labels

Enabling this setting will label landuse features with their 'landuse' tag.

  • Show unconnected nodes

Enabling this setting will highlight waynodes which do not connect to another feature.

  • Alternative highways

Enabling this setting will change the base style.

  • Highlight pedestrian accessibility

Enabling this setting will highlight pedestrian tags using green (can access) or red (cannot access) coloring, designated access icons and sidewalk hashing.

Style Guide

Here is a guide on the general format of the style, as well as guidelines for contributing

Indentation 4 spaces

Declaration Format Correct:

#selector-1 {
    symbol-fill-opacity: 1;
    symbol-fill-color: #000000;
}
#selector-1,
#selector-2,
#selector-3 {
    symbol-fill-opacity: 1;
    symbol-fill-color: #000000;	
}

Incorrect:

#selector-1 
{
    symbol-fill-opacity: 1;
    symbol-fill-color: #000000;
}
#selector-1, #selector-2, #selector-3 {
    symbol-fill-opacity: 1;
    symbol-fill-color: #000000;	
}

Commenting and Headings

/*----------------------------------------------------------------------------------------------------------------------*\
                                             Use this comment block for headings
\*----------------------------------------------------------------------------------------------------------------------*/
/*******************************************/
/* Use this comment block for sub-headings */
/*******************************************/
/* Use this comment block for a basic, one line comment */

Additional Information

For more information, please contact Andrew Wiseman.