Coloured_Postcode: Häuser und Straßen mit dem gleicher PLZ werden in einer Farbe dargestellt. Der CRC-Code der PLZ wird ab Version 2 dafür herangezogen. Postleitzahlengrenzen (boundary=postal_code) werden rot gestrichelt dargestellt. Straßen sollten mit postal_code=..... versehen sein (werden sonst rot markiert). Beachte den Unterschied zwischen addr:postcode und postal_code.
meta { title: "Coloured Postcode"; author: "geozeisig"; version: "2.18_2020-10-05"; description: "Style to ease mapping of Postcode by colouring streets and houses and nodes"; link: "https://josm.openstreetmap.de/wiki/Styles/Coloured_Postcode"; } *["addr:postcode"] { crc: CRC32_checksum(tag("addr:postcode"))/429496.7296; } *["addr:postcode"]::halo { crc: CRC32_checksum(tag("addr:postcode"))/429496.7296; } *["postal_code"] { crc: CRC32_checksum(tag("postal_code"))/429496.7296; } /* highlight buildings and highways */ area[building]["addr:postcode"][prop(crc)<303] { color: #ffffff; fill-color: #ffffff; text-halo-color: #ffffff; } node["addr:postcode"][prop(crc)<303]::halo { symbol-fill-color: #ffffff; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)<303] { color: #ffffff; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #ffffff; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=303][prop(crc)<606] { color: #b88142; fill-color: #b88142; text-halo-color: #b88142; } node["addr:postcode"][prop(crc)>=303][prop(crc)<606]::halo { symbol-fill-color: #b88142; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=303][prop(crc)<606] { color: #b88142; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #b88142; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=606][prop(crc)<909] { color: #a3fe8f; fill-color: #a3fe8f; text-halo-color: #a3fe8f; } node["addr:postcode"][prop(crc)>=606][prop(crc)<909]::halo { symbol-fill-color: #a3fe8f; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=606][prop(crc)<909] { color: #a3fe8f; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #a3fe8f; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=909][prop(crc)<1212] { color: #b8674c; fill-color: #b8674c; text-halo-color: #b8674c; } node["addr:postcode"][prop(crc)>=909][prop(crc)<1212]::halo { symbol-fill-color: #b8674c; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=909][prop(crc)<1212] { color: #b8674c; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #b8674c; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=1212][prop(crc)<1515] { color: #fcff5c; fill-color: #fcff5c; text-halo-color: #fcff5c; } node["addr:postcode"][prop(crc)>=1212][prop(crc)<1515]::halo { symbol-fill-color: #fcff5c; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=1212][prop(crc)<1515] { color: #fcff5c; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #fcff5c; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=1515][prop(crc)<1818] { color: #81c0ff; fill-color: #81c0ff; text-halo-color: #81c0ff; } node["addr:postcode"][prop(crc)>=1515][prop(crc)<1818]::halo { symbol-fill-color: #81c0ff; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=1515][prop(crc)<1818] { color: #81c0ff; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #81c0ff; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=1818][prop(crc)<2121] { color: #6b8e23; fill-color: #6b8e23; text-halo-color: #6b8e23; } node["addr:postcode"][prop(crc)>=1818][prop(crc)<2121]::halo { symbol-fill-color: #6b8e23; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=1818][prop(crc)<2121] { color: #6b8e23; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #6b8e23; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=2121][prop(crc)<2424] { color: #e1bd6a; fill-color: #e1bd6a; text-halo-color: #e1bd6a; } node["addr:postcode"][prop(crc)>=2121][prop(crc)<2424]::halo { symbol-fill-color: #e1bd6a; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=2121][prop(crc)<2424] { color: #e1bd6a; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #e1bd6a; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=2424][prop(crc)<2727] { color: #7fffd4; fill-color: #7fffd4; text-halo-color: #7fffd4; } node["addr:postcode"][prop(crc)>=2424][prop(crc)<2727]::halo { symbol-fill-color: #7fffd4; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=2424][prop(crc)<2727] { color: #7fffd4; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #7fffd4; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=2727][prop(crc)<3030] { color: #8a2be2; fill-color: #8a2be2; text-halo-color: #8a2be2; } node["addr:postcode"][prop(crc)>=2727][prop(crc)<3030]::halo { symbol-fill-color: #8a2be2; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=2727][prop(crc)<3030] { color: #8a2be2; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #8a2be2; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=3030][prop(crc)<3333] { color: #a52a2a; fill-color: #a52a2a; text-halo-color: #a52a2a; } node["addr:postcode"][prop(crc)>=3030][prop(crc)<3333]::halo { symbol-fill-color: #a52a2a; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=3030][prop(crc)<3333] { color: #a52a2a; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #a52a2a; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=3333][prop(crc)<3636] { color: #f0b9a6; fill-color: #f0b9a6; text-halo-color: #f0b9a6; } node["addr:postcode"][prop(crc)>=3333][prop(crc)<3636]::halo { symbol-fill-color: #f0b9a6; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=3333][prop(crc)<3636] { color: #f0b9a6; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #f0b9a6; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=3636][prop(crc)<3939] { color: #8fbc8f; fill-color: #8fbc8f; text-halo-color: #8fbc8f; } node["addr:postcode"][prop(crc)>=3636][prop(crc)<3939]::halo { symbol-fill-color: #8fbc8f; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=3636][prop(crc)<3939] { color: #8fbc8f; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #8fbc8f; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=3939][prop(crc)<4242] { color: #1b7777; fill-color: #1b7777; text-halo-color: #1b7777; } node["addr:postcode"][prop(crc)>=3939][prop(crc)<4242]::halo { symbol-fill-color: #1b7777; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=3939][prop(crc)<4242] { color: #1b7777; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #1b7777; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=4242][prop(crc)<4545] { color: #ff1493; fill-color: #ff1493; text-halo-color: #ff1493; } node["addr:postcode"][prop(crc)>=4242][prop(crc)<4545]::halo { symbol-fill-color: #ff1493; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=4242][prop(crc)<4545] { color: #ff1493; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #ff1493; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=4545][prop(crc)<4848] { color: #0072e2; fill-color: #0072e2; text-halo-color: #0072e2; } node["addr:postcode"][prop(crc)>=4545][prop(crc)<4848]::halo { symbol-fill-color: #0072e2; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=4545][prop(crc)<4848] { color: #0072e2; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #0072e2; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=4848][prop(crc)<5151] { color: #008f00; fill-color: #008f00; text-halo-color: #008f00; } node["addr:postcode"][prop(crc)>=4848][prop(crc)<5151]::halo { symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=4848][prop(crc)<5151] { color: #008f00; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #008f00; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=5151][prop(crc)<5454] { color: #ffe400; fill-color: #ffe400; text-halo-color: #ffe400; } node["addr:postcode"][prop(crc)>=5151][prop(crc)<5454]::halo { symbol-fill-color: #ffe400; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=5151][prop(crc)<5454] { color: #ffe400; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #ffe400; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=5454][prop(crc)<5757] { color: #BF9017; fill-color: #BF9017; text-halo-color: #BF9017; } node["addr:postcode"][prop(crc)>=5454][prop(crc)<5757]::halo { symbol-fill-color: #BF9017; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=5454][prop(crc)<5757] { color: #BF9017; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #BF9017; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=5757][prop(crc)<6060] { color: #adff2f; fill-color: #adff2f; text-halo-color: #adff2f; } node["addr:postcode"][prop(crc)>=5757][prop(crc)<6060]::halo { symbol-fill-color: #adff2f; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=5757][prop(crc)<6060] { color: #adff2f; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #adff2f; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=6060][prop(crc)<6363] { color: #ff69b4; fill-color: #ff69b4; text-halo-color: #ff69b4; } node["addr:postcode"][prop(crc)>=6060][prop(crc)<6363]::halo { symbol-fill-color: #ff69b4; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=6060][prop(crc)<6363] { color: #ff69b4; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #ff69b4; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=6363][prop(crc)<6666] { color: #cd5c5c; fill-color: #cd5c5c; text-halo-color: #cd5c5c; } node["addr:postcode"][prop(crc)>=6363][prop(crc)<6666]::halo { symbol-fill-color: #cd5c5c; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=6363][prop(crc)<6666] { color: #cd5c5c; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #cd5c5c; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=6666][prop(crc)<6969] { color: #7d5a07; fill-color: #7d5a07; text-halo-color: #7d5a07; } node["addr:postcode"][prop(crc)>=6666][prop(crc)<6969]::halo { symbol-fill-color: #7d5a07; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=6666][prop(crc)<6969] { color: #7d5a07; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #7d5a07; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=6969][prop(crc)<7272] { color: #824600; fill-color: #824600; text-halo-color: #824600; } node["addr:postcode"][prop(crc)>=6969][prop(crc)<7272]::halo { symbol-fill-color: #824600; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=6969][prop(crc)<7272] { color: #824600; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #824600; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=7272][prop(crc)<7575] { color: #f08080; fill-color: #f08080; text-halo-color: #f08080; } node["addr:postcode"][prop(crc)>=7272][prop(crc)<7575]::halo { symbol-fill-color: #f08080; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=7272][prop(crc)<7575] { color: #f08080; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #f08080; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=7575][prop(crc)<7878] { color: #F75617; fill-color: #F75617; text-halo-color: #F75617; } node["addr:postcode"][prop(crc)>=7575][prop(crc)<7878]::halo { symbol-fill-color: #F75617; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=7575][prop(crc)<7878] { color: #F75617; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #F75617; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=7878][prop(crc)<8181] { color: #54d954; fill-color: #54d954; text-halo-color: #54d954; } node["addr:postcode"][prop(crc)>=7878][prop(crc)<8181]::halo { symbol-fill-color: #54d954; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=7878][prop(crc)<8181] { color: #54d954; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #54d954; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=8181][prop(crc)<8484] { color: #ba55d3; fill-color: #ba55d3; text-halo-color: #ba55d3; } node["addr:postcode"][prop(crc)>=8181][prop(crc)<8484]::halo { symbol-fill-color: #ba55d3; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=8181][prop(crc)<8484] { color: #ba55d3; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #ba55d3; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=8484][prop(crc)<8787] { color: #9370db; fill-color: #9370db; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #0FF05E; text-halo-radius:2 } node["addr:postcode"][prop(crc)>=8484][prop(crc)<8787]::halo { symbol-fill-color: #9370db; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=8484][prop(crc)<8787] { color: #9370db; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #9370db; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=8787][prop(crc)<9090] { color: #ff7c00; fill-color: #ff7c00; text-halo-color: #ff7c00; } node["addr:postcode"][prop(crc)>=8787][prop(crc)<9090]::halo { symbol-fill-color: #ff7c00; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=8787][prop(crc)<9090] { color: #ff7c00; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #ff7c00; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=9090][prop(crc)<9393] { color: #3cb371; fill-color: #3cb371; text-halo-color: #3cb371; } node["addr:postcode"][prop(crc)>=9090][prop(crc)<9393]::halo { symbol-fill-color: #3cb371; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=9090][prop(crc)<9393] { color: #3cb371; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #3cb371; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=9393][prop(crc)<9696] { color: #707000; fill-color: #707000; text-halo-color: #707000; } node["addr:postcode"][prop(crc)>=9393][prop(crc)<9696]::halo { symbol-fill-color: #707000; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=9393][prop(crc)<9696] { color: #707000; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #707000; text-halo-radius:2 } /* --------- */ area[building]["addr:postcode"][prop(crc)>=9696] { color: #ff4444; fill-color: #ff4444; text-halo-color: #ff4444; } node["addr:postcode"][prop(crc)>=9696]::halo { symbol-fill-color: #ff4444; symbol-shape: circle; symbol-size: 20; z-index: -1; } way["postal_code"][prop(crc)>=9696] { color: #ff4444; width: 3; font-size: 12; text-color: #000000; text-position: line; text: "postal_code"; text-offset: 0; text-halo-color: #ff4444; text-halo-radius:2 } /* all marked housenumber in black color */ node["addr:postcode"] { font-size: 10; text-color: black; } area[building]["addr:postcode"] { text-color: black; font-size: 10; } /* have housenumber, miss postcode */ area[building][addr:housenumber][!addr:postcode] { text: eval("postcode?"); width: 2; fill-color: #FF0000; fill-opacity:0.9; font-size: 10; casing-width: 1; casing-color: #FFFF00; } node[addr:housenumber][!addr:postcode]::halo { symbol-shape: triangle; symbol-fill-opacity:0.7; symbol-fill-color: #FF0000; symbol-size: 30; symbol-stroke-color: #FFFF00; symbol-stroke-width:2; z-index: -1; } node[addr:housenumber][!addr:postcode] { text: eval("postcode?"); text-color: white; font-size: 10; } /* have highway, miss postal_code */ way[highway=residential][!postal_code], way[highway=primary][name][!postal_code], way[highway=primary_link][name][!postal_code], way[highway=tertiary][name][!postal_code], way[highway=tertiary_link][name][!postal_code], way[highway=secondary][name][!postal_code], way[highway=secondary_link][name][!postal_code], way[highway=pedestrian][name][!postal_code], way[highway=living_street][name][!postal_code] { text: eval("postal_code?"); font-size: 12; color: red; width: 5; dashes: 20,4; dashes-background-color: #FFFF00; } /* highlight boundary */ relation[type=boundary][boundary=postal_code] { width: 5; color: red; dashes: 10; }
Styles_Coloured_Postcode-style.mapcss, Styles_Coloured_Postcode.zip
Attachments (1)
-
Help_postcode.2.jpg
(163.5 KB
) - added by 12 years ago.
(NOZIP)
Download all attachments as: .zip