wiki:Styles/ParkingLanes

Parking lanes

Example:

StyleParkingLanes.png (NOZIP)

(data used for image ©OpenStreetMap contributors ODbL)

Code:

meta {
    title: "Parking lanes";
    description: "Parking lanes along roads and parking/stopping restrictions.";
    link: "https://wiki.openstreetmap.org/wiki/Key:parking:lane";
    icon: "blue-sign-with-car.svg";
    author: "Sebastian Klemm, Kay Drangmeister, Jeroen Hoek, riiga";
    version: "0.18_2022-01-30";
    min-josm-version: "4399";
}


meta[lang=de]
{
    title: "Parkstreifen";
    description: "Parkstreifen/Parkplätze entlang von Straßen und Park-/Halteverbote.";
}

meta[lang=nl]
{
    title: "Parkeerstroken";
    description: "Parkeerstroken/parkeerhavens langs wegen en parkeer-/stopbeperkingen.";
}

meta[lang=ru]
{
    title: "Парковка вдоль дороги";
    description: "Парковка вдоль дорог/ограничения и запреты у такой парковки";
    link: "https://wiki.openstreetmap.org/wiki/RU:Key:parking:lane";
}

/* Settings. */

setting::show_warnings {
  type: boolean;
  label: tr("Show warning symbols for deprecated or incompatible tag values");
  default: true;
}

setting::highlight_conditions {
  type: boolean;
  label: tr("Use different colours to highlight values of parking:condition:*");
  default: true;
}

/* Mark deprecated tags. */
way[highway][parking:lane:right=~/^(no_parking|no_standing|no_stopping|fire_lane)$/]::parking_lanes_right,
way[highway][parking:lane:both=~/^(no_parking|no_standing|no_stopping|fire_lane)$/]::parking_lanes_right
{
    set deprecated_type;
}

way[highway][parking:lane:left=~/^(no_parking|no_standing|no_stopping|fire_lane)$/]::parking_lanes_left,
way[highway][parking:lane:both=~/^(no_parking|no_standing|no_stopping|fire_lane)$/]::parking_lanes_left
{
    set deprecated_type;
}

way[highway][parking:condition:right:default]::parking_lanes_right,
way[highway][parking:condition:both:default]::parking_lanes_right,
way[highway][parking:condition:right:time_interval]::parking_lanes_right,
way[highway][parking:condition:both:time_interval]::parking_lanes_right
{
    set deprecated_type;
}

way[highway][parking:condition:left:default]::parking_lanes_left,
way[highway][parking:condition:both:default]::parking_lanes_left,
way[highway][parking:condition:left:time_interval]::parking_lanes_left,
way[highway][parking:condition:both:time_interval]::parking_lanes_left
{
    set deprecated_type;
}

way[highway][parking:lane:right]::parking_lanes_right,
way[highway][parking:lane:both]::parking_lanes_right/*,
way[highway][parking:condition:right]::parking_lanes_right,
way[highway][parking:condition:both]::parking_lanes_right*/
{
    z-index: -3;
    linecap: none;
}
way[highway][parking:lane:left]::parking_lanes_left,
way[highway][parking:lane:both]::parking_lanes_left/*,
way[highway][parking:condition:left]::parking_lanes_left,
way[highway][parking:condition:both]::parking_lanes_left*/
{
    z-index: -3;
    linecap: none;
}

way[highway][parking:lane:right=parallel]::parking_lanes_right,
way[highway][parking:lane:both=parallel]::parking_lanes_right
{
    width: 3;
    dashes: 10, 2;
}
way[highway][parking:lane:left=parallel]::parking_lanes_left,
way[highway][parking:lane:both=parallel]::parking_lanes_left
{
    width: 3;
    dashes: 10, 2;
}

way[highway][parking:lane:right=perpendicular]::parking_lanes_right,
way[highway][parking:lane:both=perpendicular]::parking_lanes_right
{
    width: 10;
    dashes: 3, 4;
}
way[highway][parking:lane:left=perpendicular]::parking_lanes_left,
way[highway][parking:lane:both=perpendicular]::parking_lanes_left
{
    width: 10;
    dashes: 3, 4;
}

way[highway][parking:lane:right=diagonal]::parking_lanes_right,
way[highway][parking:lane:both=diagonal]::parking_lanes_right
{
    width: 7;
    dashes: 4, 6;
}
way[highway][parking:lane:left=diagonal]::parking_lanes_left,
way[highway][parking:lane:both=diagonal]::parking_lanes_left
{
    width: 7;
    dashes: 4, 6;
}

way[highway][parking:lane:right=marked]::parking_lanes_right,
way[highway][parking:lane:both=marked]::parking_lanes_right
{
    width: 3;
    dashes: 10, 12;
}
way[highway][parking:lane:left=marked]::parking_lanes_left,
way[highway][parking:lane:both=marked]::parking_lanes_left
{
    width: 3;
    dashes: 10, 12;
}

way[highway][parking:lane:right=separate]::parking_lanes_right,
way[highway][parking:lane:both=separate]::parking_lanes_right
{
    repeat-image: images/separate-flipped.svg;
}
way[highway][parking:lane:left=separate]::parking_lanes_left,
way[highway][parking:lane:both=separate]::parking_lanes_left
{
    repeat-image: images/separate.svg;
}

way[highway][parking:lane:right=no]::parking_lanes_right,
way[highway][parking:lane:both=no]::parking_lanes_right
{
    width: 6;
    dashes: 6, 12;
}
way[highway][parking:lane:left=no]::parking_lanes_left,
way[highway][parking:lane:both=no]::parking_lanes_left
{
    width: 6;
    dashes: 6, 12;
}

way[highway][parking:lane:right=yes]::parking_lanes_right,
way[highway][parking:lane:both=yes]::parking_lanes_right
{
    width: 9;
    dashes: 5, 5;
}
way[highway][parking:lane:left=yes]::parking_lanes_left,
way[highway][parking:lane:both=yes]::parking_lanes_left
{
    width: 9;
    dashes: 5, 5;
}

/* Support ways without lane, but with condition */
way[highway][parking:condition:right][!parking:lane:right][!parking:lane:both]::parking_lanes_right,
way[highway][parking:condition:both][!parking:lane:right][!parking:lane:both]::parking_lanes_right
{
    width: 4;
    dashes: 4;
}
way[highway][parking:condition:left][!parking:lane:left][!parking:lane:both]::parking_lanes_left,
way[highway][parking:condition:both][!parking:lane:left][!parking:lane:both]::parking_lanes_left
{
    width: 4;
    dashes: 4;
}

way[highway][parking:lane:right]::parking_lanes_right,
way[highway][parking:lane:both]::parking_lanes_right,
way[highway][parking:condition:right]::parking_lanes_right,
way[highway][parking:condition:both]::parking_lanes_right
{
    offset: eval(0 - 4 - (prop("width") * 0.5) - (prop("width", "default") * 0.5));
    repeat-image-offset: -8;
    repeat-image-width: 8;
    repeat-image-height: 8;
    repeat-image-spacing: 16;
}

way[highway][parking:lane:left]::parking_lanes_left,
way[highway][parking:lane:both]::parking_lanes_left,
way[highway][parking:condition:left]::parking_lanes_left,
way[highway][parking:condition:both]::parking_lanes_left
{
    offset: eval(4 + (prop("width") * 0.5) + (prop("width", "default") * 0.5));
    repeat-image-width: 8;
    repeat-image-height: 8;
    repeat-image-offset: 8;
    repeat-image-spacing: 16;
}

/* Set warnings for deprecated tags. */
way[highway][parking:lane:right].deprecated_type::parking_lanes_right,
way[highway][parking:lane:both].deprecated_type::parking_lanes_right,
way[highway][parking:condition:right].deprecated_type::parking_lanes_right,
way[highway][parking:condition:both].deprecated_type::parking_lanes_right
{
    set warning;
}

way[highway][parking:lane:left].deprecated_type::parking_lanes_left,
way[highway][parking:lane:both].deprecated_type::parking_lanes_left,
way[highway][parking:condition:left].deprecated_type::parking_lanes_left,
way[highway][parking:condition:both].deprecated_type::parking_lanes_left
{
    set warning;
}

/* Tags should either document 'both' sides or 'left' and 'right' separately. */
way[highway][parking:condition:both][parking:condition:right]::parking_lanes_right,
way[highway][parking:lane:both][parking:lane:right]::parking_lanes_right
{
    set warning;
}

way[highway][parking:condition:both][parking:condition:left]::parking_lanes_left,
way[highway][parking:lane:both][parking:lane:left]::parking_lanes_left
{
    set warning;
}

way[highway][parking:condition:right=free][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=free][setting("highlight_conditions")]::parking_lanes_right
{
    color: chartreuse;
}

way[highway][parking:condition:left=free][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=free][setting("highlight_conditions")]::parking_lanes_left
{
    color: chartreuse;
}

way[highway][parking:condition:right=disc][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=disc][setting("highlight_conditions")]::parking_lanes_right
{
    color: #1c86ee;
}
way[highway][parking:condition:left=disc][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=disc][setting("highlight_conditions")]::parking_lanes_left
{
    color: #1c86ee;
}

way[highway][parking:condition:right=ticket][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=ticket][setting("highlight_conditions")]::parking_lanes_right
{
    color: #009999;
}
way[highway][parking:condition:left=ticket][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=ticket][setting("highlight_conditions")]::parking_lanes_left
{
    color: #009999;
}

way[highway][parking:condition:right=residents][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=residents][setting("highlight_conditions")]::parking_lanes_right
{
    color: darkviolet;
}
way[highway][parking:condition:left=residents][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=residents][setting("highlight_conditions")]::parking_lanes_left
{
    color: darkviolet;
}

way[highway][parking:condition:right=customers][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=customers][setting("highlight_conditions")]::parking_lanes_right
{
    color: #ff3399;
}
way[highway][parking:condition:left=customers][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=customers][setting("highlight_conditions")]::parking_lanes_left
{
    color: #ff3399;
}

way[highway][parking:condition:right=private][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=private][setting("highlight_conditions")]::parking_lanes_right
{
    color: gold;
}
way[highway][parking:condition:left=private][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=private][setting("highlight_conditions")]::parking_lanes_left
{
    color: gold;
}

way[highway][parking:condition:right=disabled][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=disabled][setting("highlight_conditions")]::parking_lanes_right
{
    color: turquoise;
}
way[highway][parking:condition:left=disabled][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=disabled][setting("highlight_conditions")]::parking_lanes_left
{
    color: turquoise;
}

way[highway][parking:condition:right=no_parking][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=no_parking][setting("highlight_conditions")]::parking_lanes_right
{
    color: orange;
}
way[highway][parking:condition:left=no_parking][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=no_parking][setting("highlight_conditions")]::parking_lanes_left
{
    color: orange;
}

way[highway][parking:condition:right=no_standing][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=no_standing][setting("highlight_conditions")]::parking_lanes_right
{
    color: salmon;
}
way[highway][parking:condition:left=no_standing][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=no_standing][setting("highlight_conditions")]::parking_lanes_left
{
    color: salmon;
}

way[highway][parking:condition:right=no_stopping][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=no_stopping][setting("highlight_conditions")]::parking_lanes_right
{
    color: red;
}
way[highway][parking:condition:left=no_stopping][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=no_stopping][setting("highlight_conditions")]::parking_lanes_left
{
    color: red;
}
way[highway][parking:condition:right=no][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=no][setting("highlight_conditions")]::parking_lanes_right
{
    color: maroon;
}
way[highway][parking:condition:left=no][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=no][setting("highlight_conditions")]::parking_lanes_left
{
    color: maroon;
}

/* Support showing the more restrictive form of parking when the default is free or disc */
way[highway][parking:condition:right=free][parking:condition:right:conditional=~/disc/][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=free][parking:condition:both:conditional=~/disc/][setting("highlight_conditions")]::parking_lanes_right
{
    color: #1c86ee;
}

way[highway][parking:condition:left=free][parking:condition:left:conditional=~/disc/][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=free][parking:condition:both:conditional=~/disc/][setting("highlight_conditions")]::parking_lanes_left
{
    color: #1c86ee;
}

way[highway][parking:condition:right=~/^(free|disc)$/][parking:condition:right:conditional=~/ticket/][setting("highlight_conditions")]::parking_lanes_right,
way[highway][parking:condition:both=~/^(free|disc)$/][parking:condition:both:conditional=~/ticket/][setting("highlight_conditions")]::parking_lanes_right
{
    color: #009999;
}

way[highway][parking:condition:left=~/^(free|disc)$/][parking:condition:left:conditional=~/ticket/][setting("highlight_conditions")]::parking_lanes_left,
way[highway][parking:condition:both=~/^(free|disc)$/][parking:condition:both:conditional=~/ticket/][setting("highlight_conditions")]::parking_lanes_left
{
    color: #009999;
}

way.warning[setting("show_warnings")]::parking_lanes_right
{
    width: 0;
    repeat-image: images/warning-flipped.svg;
    repeat-image-offset: -12;
    repeat-image-width: 16;
    repeat-image-height: 16;
    repeat-image-spacing: 12;
}

way.warning[setting("show_warnings")]::parking_lanes_left
{
    width: 0;
    repeat-image: images/warning.svg;
    repeat-image-offset: 12;
    repeat-image-width: 16;
    repeat-image-height: 16;
    repeat-image-spacing: 12;
}

Styles_ParkingLanes-style.mapcss, Styles_ParkingLanes.zip

Last modified 4 months ago Last modified on 2022-01-30T14:51:37+01:00

Attachments (4)

Download all attachments as: .zip