new in the overlay: draw bus stops and show which bus lines depart from there.
authorUser for running Openstreetmap-things <osm@osm.rrze.uni-erlangen.de>
Sat, 31 Jan 2015 22:47:00 +0000 (23:47 +0100)
committerUser for running Openstreetmap-things <osm@osm.rrze.uni-erlangen.de>
Sat, 31 Jan 2015 22:47:00 +0000 (23:47 +0100)
This isn't a graphically pleasing as it could be, the shieldsymbolizer placement-type list seems to be broken, so all routes are just drawn onto one label as a workaround..

styles/mapnik-osm-data/rrze-overlay.xml
styles/mapnik-osm-data/rrzesymbols/bus_stop.svg [new file with mode: 0644]
styles/mapnik-osm-data/rrzesymbols/busshield.svg [new file with mode: 0644]
styles/mapnik-osm-data/rrzesymbols/busshieldwide.svg [new file with mode: 0644]

index 0b5824262d83ad045a72fd161a00d553128de324..82425965d773f6fb4e236eb9afd5a910e0332450 100644 (file)
     <Rule>
       &maxscale_zoom15;
       <Filter>[amenity] = 'bicycle_parking' and ([access] = 'public' or [access] = 'yes' or not [access] != '')</Filter>
-      <PointSymbolizer file="rrze&symbols;/parking_bicycle.p.16.png" allow-overlap="false" placement="interior"/>
+      <PointSymbolizer file="rrzesymbols/parking_bicycle.p.16.png" allow-overlap="false" placement="interior"/>
     </Rule>
 </Style>
 
+<Style name="busstop" filter-mode="first">
+  <Rule>
+    &maxscale_zoom15;
+    <Filter>([name] != null) and ([llength] &gt; 3) and ([line] != null)</Filter>
+    <MarkersSymbolizer file="rrzesymbols/bus_stop.svg" placement="interior" transform="scale(0.025)" />
+    <ShieldSymbolizer placement="point" horizontal-alignment="middle" vertical-alignment="middle" fill="#ffffff" file="rrzesymbols/busshieldwide.svg" fontset-name="book-fonts" unlock-image="true" shield-dy="-19" dy="0" spacing="40" min_distance="1" >[line]</ShieldSymbolizer>
+    <TextSymbolizer size="9" fill="#0092da" fontset-name="book-fonts" halo-radius="1" dy="10" ><![CDATA[[name]]]></TextSymbolizer>
+  </Rule>
+  <Rule>
+    &maxscale_zoom15;
+    <Filter>([name] != null) and ([line] != null)</Filter>
+    <MarkersSymbolizer file="rrzesymbols/bus_stop.svg" placement="interior" transform="scale(0.025)" />
+    <ShieldSymbolizer placement="point" horizontal-alignment="middle" vertical-alignment="middle" fill="#ffffff" file="rrzesymbols/busshield.svg" fontset-name="book-fonts" unlock-image="true" shield-dy="-19" dy="0" spacing="40" min_distance="1" >[line]</ShieldSymbolizer>
+    <TextSymbolizer size="9" fill="#0092da" fontset-name="book-fonts" halo-radius="1" dy="10" ><![CDATA[[name]]]></TextSymbolizer>
+  </Rule>
+  <Rule>
+    &maxscale_zoom15;
+    <Filter>([name] != null)</Filter>
+    <MarkersSymbolizer file="rrzesymbols/bus_stop.svg" placement="interior" transform="scale(0.025)" />
+    <TextSymbolizer size="9" fill="#0092da" fontset-name="book-fonts" halo-radius="1" dy="10" ><![CDATA[[name]]]></TextSymbolizer>
+  </Rule>
+  <Rule>
+    &maxscale_zoom15;
+    <Filter>([line] != null) and ([llength] &gt; 3)</Filter>
+    <MarkersSymbolizer file="rrzesymbols/bus_stop.svg" placement="interior" transform="scale(0.025)" />
+    <ShieldSymbolizer placement="point" horizontal-alignment="middle" vertical-alignment="middle" fill="#ffffff" file="rrzesymbols/busshieldwide.svg" fontset-name="book-fonts" unlock-image="true" shield-dy="-19" dy="0" spacing="40" min_distance="1" >[line]</ShieldSymbolizer>
+  </Rule>
+  <Rule>
+    &maxscale_zoom15;
+    <Filter>([line] != null)</Filter>
+    <MarkersSymbolizer file="rrzesymbols/bus_stop.svg" placement="interior" transform="scale(0.025)" />
+    <ShieldSymbolizer placement="point" horizontal-alignment="middle" vertical-alignment="middle" fill="#ffffff" file="rrzesymbols/busshield.svg" fontset-name="book-fonts" unlock-image="true" shield-dy="-19" dy="0" spacing="40" min_distance="1" >[line]</ShieldSymbolizer>
+  </Rule>
+  <Rule>
+    &maxscale_zoom15;
+    <MarkersSymbolizer file="rrzesymbols/bus_stop.svg" placement="interior" transform="scale(0.025)" />
+  </Rule>
+</Style>
+
 <Layer name="amenity-points" status="on" srs="&osm2pgsql_projection;">
     <StyleName>points</StyleName>
     <Datasource>
       &datasource-settings;
     </Datasource>
 </Layer>
+<Layer name="busstop" status="on" srs="&osm2pgsql_projection;">
+    <StyleName>busstop</StyleName>
+    <Datasource>
+      <Parameter name="table">
+      (select way,name,replace(tags->'line',',',';') as line,length(tags->'line') as llength
+       from &prefix;_point
+       where highway='bus_stop' or (public_transport='stop_position' and tags->'bus'='yes')
+      ) as busstop
+      </Parameter>
+      &datasource-settings;
+    </Datasource>
+</Layer>
 </Map>
diff --git a/styles/mapnik-osm-data/rrzesymbols/bus_stop.svg b/styles/mapnik-osm-data/rrzesymbols/bus_stop.svg
new file mode 100644 (file)
index 0000000..305bba2
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.0"
+   width="580"
+   height="580"
+   id="svg2">
+  <metadata
+     id="metadata1976">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <cc:license
+           rdf:resource="http://web.resource.org/cc/PublicDomain" />
+        <dc:language>en</dc:language>
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4">
+    <marker
+       markerUnits="strokeWidth"
+       refX="10"
+       refY="5"
+       markerWidth="4"
+       markerHeight="3"
+       orient="auto"
+       viewBox="0 0 10 10"
+       id="ArrowStart">
+      <path
+         d="M 10,0 0,5 10,10 z"
+         id="path2111" />
+    </marker>
+    <marker
+       markerUnits="strokeWidth"
+       refX="0"
+       refY="5"
+       markerWidth="4"
+       markerHeight="3"
+       orient="auto"
+       viewBox="0 0 10 10"
+       id="ArrowEnd">
+      <path
+         d="M 0,0 10,5 0,10 z"
+         id="path2108" />
+    </marker>
+  </defs>
+  <path
+     d="m 290.625,34.5625 c 0.67637,0 1.37906,0.02587 2.0625,0.03125 0.68817,-0.0055 1.3815,-0.03125 2.0625,-0.03125 l -4.125,0 z m 2.0625,0.03125 c -48.02485,0.380502 -113.09179,13.902829 -140.25,25.21875 -27.54737,11.478075 -45.91781,22.961674 -51.65625,51.65625 L 80.125,270.5625 l 0,219.1875 35.59375,0 0,34.375 c 0,41.91264 61.3125,41.91262 61.3125,0 l 0,-34.375 113.25,0 0.34375,0 117.71875,0 0,34.375 c 0,41.91264 61.34375,41.91262 61.34375,0 l 0,-34.375 35.59375,0 0,-219.1875 L 484.625,111.46875 C 478.88656,82.774174 460.51613,71.290573 432.96875,59.8125 405.80789,48.495478 340.71371,34.971722 292.6875,34.59375 z M 205.25,74.75 l 85.375,0 89.53125,0 c 17.2177,4e-6 17.21771,25.8125 0,25.8125 l -89.71875,0 -85.1875,0 c -17.2177,0 -17.21771,-25.8125 0,-25.8125 z m -46.4375,51.90625 131.625,0 136.125,0 c 18.18768,0 22.94807,9.23202 25.15625,23.25 l 16.09375,115.375 c 1.49927,11.05895 -1.72106,22.03124 -17,22.03125 l -160.1875,0 -156.0625,0 c -15.27895,0 -18.46802,-10.97231 -16.96875,-22.03125 l 16.09375,-115.375 c 2.2082,-14.01798 6.93731,-23.25 25.125,-23.25 z M 146.40625,362.1875 c 16.24773,-10e-6 29.40625,13.18977 29.40625,29.4375 0,16.24774 -13.15852,29.40625 -29.40625,29.40625 -16.24773,10e-6 -29.4375,-13.15852 -29.4375,-29.40625 0,-16.24772 13.18977,-29.4375 29.4375,-29.4375 z m 292.59375,0 c 16.24773,0 29.40624,13.18978 29.40625,29.4375 0,16.24773 -13.15852,29.40626 -29.40625,29.40625 -16.24773,0 -29.43751,-13.15851 -29.4375,-29.40625 0,-16.24773 13.18978,-29.43751 29.4375,-29.4375 z"
+     id="path2115"
+     style="fill:#0092da;fill-opacity:1;stroke:none" />
+  <g
+     transform="matrix(1.1975036,0,0,1.1975036,80.128205,34.575832)"
+     id="g2117"
+     style="fill:#000000">
+    <g
+       id="g2119"
+       style="fill:#000000">
+      <g
+         id="g2121"
+         style="fill:#000000">
+        <path
+           d=""
+           id="path2125"
+           style="fill:#000000;stroke:none" />
+      </g>
+      <g
+         id="g2127"
+         style="fill:#000000">
+        <path
+           d=""
+           id="path2131"
+           style="fill:#000000;stroke:none" />
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/styles/mapnik-osm-data/rrzesymbols/busshield.svg b/styles/mapnik-osm-data/rrzesymbols/busshield.svg
new file mode 100644 (file)
index 0000000..191f35c
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="100%"
+   height="100%"
+   viewBox="0 0 33.75 19.75"
+   id="svg5655">
+  <metadata
+     id="metadata5667">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs5665" />
+  <rect
+     width="32.5"
+     height="18"
+     rx="9"
+     x="1.25"
+     y="1.75"
+     id="rect5657"
+     style="fill:#e70029;fill-opacity:1;stroke:none" />
+</svg>
diff --git a/styles/mapnik-osm-data/rrzesymbols/busshieldwide.svg b/styles/mapnik-osm-data/rrzesymbols/busshieldwide.svg
new file mode 100644 (file)
index 0000000..2d35392
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="100%"
+   height="100%"
+   viewBox="0 0 124 20"
+   id="svg5655">
+  <metadata
+     id="metadata5667">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs5665" />
+  <rect
+     width="122.5"
+     height="18"
+     rx="9"
+     ry="9"
+     x="1.25"
+     y="2"
+     id="rect5657"
+     style="fill:#e70029;fill-opacity:1;stroke:none" />
+</svg>
This page took 0.234636 seconds and 4 git commands to generate.