[OSM-dev] highway=road

Steve Hill steve at nexusuk.org
Mon May 12 14:00:34 BST 2008


As discussed on the talk list, I have created a highway=road style for 
Mapnik (patch at the bottom of this mail) - this renders ways tagged as 
highway=road in a similar style to unclassified roads, but grey in colour 
so they can easilly be identified..

I've also created a proposal for it on the wiki: 
http://wiki.openstreetmap.org/index.php/Proposed_features/Generic_road

Please could someone apply the below patch to the subversion tree? 
Thanks.


  - Steve
    xmpp:steve at nexusuk.org   sip:steve at nexusuk.org   http://www.nexusuk.org/

      Servatis a periculum, servatis a maleficum - Whisper, Evanescence

Index: osm-template.xml
===================================================================
--- osm-template.xml	(revision 7780)
+++ osm-template.xml	(working copy)
@@ -1447,7 +1447,7 @@
      </Rule>

      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and not ([tunnel]='yes' or [tunnel]='true')</Filter>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and not ([tunnel]='yes' or [tunnel]='true')</Filter>
        <MaxScaleDenominator>100000</MaxScaleDenominator>
        <MinScaleDenominator>50000</MinScaleDenominator>
        <LineSymbolizer>
@@ -1458,7 +1458,7 @@
        </LineSymbolizer>
      </Rule>
      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([tunnel]='yes' or [tunnel]='true')</Filter>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and ([tunnel]='yes' or [tunnel]='true')</Filter>
        <MaxScaleDenominator>100000</MaxScaleDenominator>
        <MinScaleDenominator>50000</MinScaleDenominator>
        <LineSymbolizer>
@@ -1491,7 +1491,7 @@
      </Rule>

      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and not ([tunnel]='yes' or [tunnel]='true')</Filter>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and not ([tunnel]='yes' or [tunnel]='true')</Filter>
        <MaxScaleDenominator>50000</MaxScaleDenominator>
        <MinScaleDenominator>25000</MinScaleDenominator>
        <LineSymbolizer>
@@ -1502,7 +1502,7 @@
        </LineSymbolizer>
      </Rule>
      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([tunnel]='yes' or [tunnel]='true')</Filter>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and ([tunnel]='yes' or [tunnel]='true')</Filter>
        <MaxScaleDenominator>50000</MaxScaleDenominator>
        <MinScaleDenominator>25000</MinScaleDenominator>
        <LineSymbolizer>
@@ -1513,7 +1513,7 @@
      </Rule>

      <Rule>
-      <Filter>([highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and not ([tunnel]='yes' or [tunnel]='true')</Filter>
+      <Filter>([highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and not ([tunnel]='yes' or [tunnel]='true')</Filter>
        <MaxScaleDenominator>25000</MaxScaleDenominator>
        <MinScaleDenominator>5000</MinScaleDenominator>
        <LineSymbolizer>
@@ -1524,7 +1524,7 @@
        </LineSymbolizer>
      </Rule>
     <Rule>
-      <Filter>([highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([tunnel]='yes' or [tunnel]='true')</Filter>
+      <Filter>([highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and ([tunnel]='yes' or [tunnel]='true')</Filter>
        <MaxScaleDenominator>25000</MaxScaleDenominator>
        <MinScaleDenominator>5000</MinScaleDenominator>
        <LineSymbolizer>
@@ -1535,7 +1535,7 @@
      </Rule>

      <Rule>
-      <Filter>([highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and not ([tunnel]='yes' or [tunnel]='true')</Filter>
+      <Filter>([highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and not ([tunnel]='yes' or [tunnel]='true')</Filter>
        <MaxScaleDenominator>5000</MaxScaleDenominator>
        <MinScaleDenominator>1000</MinScaleDenominator>
        <LineSymbolizer>
@@ -1546,7 +1546,7 @@
        </LineSymbolizer>
      </Rule>
      <Rule>
-      <Filter>([highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([tunnel]='yes' or [tunnel]='true')</Filter>
+      <Filter>([highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and ([tunnel]='yes' or [tunnel]='true')</Filter>
        <MaxScaleDenominator>5000</MaxScaleDenominator>
        <MinScaleDenominator>1000</MinScaleDenominator>
        <LineSymbolizer>
@@ -2072,7 +2072,7 @@
      </Rule>

      <Rule>
-      <Filter>[highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'road'</Filter>
+      <Filter>[highway] = 'tertiary' or [highway] = 'residential' or [highway] = 'unclassified' or [highway] = 'road'</Filter>
        <MaxScaleDenominator>1000000</MaxScaleDenominator>
        <MinScaleDenominator>100000</MinScaleDenominator>
        <LineSymbolizer>
@@ -2082,10 +2082,58 @@
      </Rule>

      <Rule>
-      <Filter>[highway] = 'residential' or [highway] = 'minor' or [highway] = 'road'</Filter>
+      <Filter>[highway] = 'road'</Filter>
        <MaxScaleDenominator>100000</MaxScaleDenominator>
        <MinScaleDenominator>50000</MinScaleDenominator>
        <LineSymbolizer>
+        <CssParameter name="stroke">#ddd</CssParameter>
+        <CssParameter name="stroke-width">2</CssParameter>
+        <CssParameter name="stroke-linejoin">round</CssParameter>
+        <CssParameter name="stroke-linecap">round</CssParameter>
+      </LineSymbolizer>
+    </Rule>
+
+    <Rule>
+      <Filter>[highway] = 'road'</Filter>
+      <MaxScaleDenominator>50000</MaxScaleDenominator>
+      <MinScaleDenominator>15000</MinScaleDenominator>
+      <LineSymbolizer>
+        <CssParameter name="stroke">#ddd</CssParameter>
+        <CssParameter name="stroke-width">3</CssParameter>
+        <CssParameter name="stroke-linejoin">round</CssParameter>
+        <CssParameter name="stroke-linecap">round</CssParameter>
+      </LineSymbolizer>
+    </Rule>
+
+    <Rule>
+      <Filter>[highway] = 'road'</Filter>
+      <MaxScaleDenominator>25000</MaxScaleDenominator>
+      <MinScaleDenominator>5000</MinScaleDenominator>
+      <LineSymbolizer>
+        <CssParameter name="stroke">#ddd</CssParameter>
+        <CssParameter name="stroke-width">9.4</CssParameter>
+        <CssParameter name="stroke-linejoin">round</CssParameter>
+        <CssParameter name="stroke-linecap">round</CssParameter>
+      </LineSymbolizer>
+    </Rule>
+
+
+    <Rule>
+      <Filter>[highway] = 'road'</Filter>
+      <MaxScaleDenominator>5000</MaxScaleDenominator>
+      <MinScaleDenominator>100</MinScaleDenominator>
+      <LineSymbolizer>
+        <CssParameter name="stroke">#ddd</CssParameter>
+        <CssParameter name="stroke-width">13</CssParameter>
+        <CssParameter name="stroke-linejoin">round</CssParameter>
+        <CssParameter name="stroke-linecap">round</CssParameter>
+      </LineSymbolizer>
+    </Rule>
+    <Rule>
+      <Filter>[highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified'</Filter>
+      <MaxScaleDenominator>100000</MaxScaleDenominator>
+      <MinScaleDenominator>50000</MinScaleDenominator>
+      <LineSymbolizer>
          <CssParameter name="stroke">#fff</CssParameter>
          <CssParameter name="stroke-width">2</CssParameter>
          <CssParameter name="stroke-linejoin">round</CssParameter>
@@ -2094,7 +2142,7 @@
      </Rule>

      <Rule>
-      <Filter>[highway] = 'residential'  or [highway] = 'minor' or [highway] = 'road'</Filter>
+      <Filter>[highway] = 'residential'  or [highway] = 'minor' or [highway] = 'unclassified'</Filter>
        <MaxScaleDenominator>50000</MaxScaleDenominator>
        <MinScaleDenominator>15000</MinScaleDenominator>
        <LineSymbolizer>
@@ -2106,7 +2154,7 @@
      </Rule>

      <Rule>
-      <Filter>[highway] = 'residential'  or [highway] = 'minor' or [highway] = 'road'</Filter>
+      <Filter>[highway] = 'residential'  or [highway] = 'minor' or [highway] = 'unclassified'</Filter>
        <MaxScaleDenominator>25000</MaxScaleDenominator>
        <MinScaleDenominator>5000</MinScaleDenominator>
        <LineSymbolizer>
@@ -2119,7 +2167,7 @@


      <Rule>
-      <Filter>[highway] = 'residential'  or [highway] = 'minor' or [highway] = 'road'</Filter>
+      <Filter>[highway] = 'residential'  or [highway] = 'minor' or [highway] = 'unclassified'</Filter>
        <MaxScaleDenominator>5000</MaxScaleDenominator>
        <MinScaleDenominator>100</MinScaleDenominator>
        <LineSymbolizer>
@@ -2744,7 +2792,7 @@
        </LineSymbolizer>
      </Rule>
      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([bridge] = 'yes' or [bridge]='true')</Filter>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and ([bridge] = 'yes' or [bridge]='true')</Filter>
        <MaxScaleDenominator>50000</MaxScaleDenominator>
        <MinScaleDenominator>25000</MinScaleDenominator>
        <LineSymbolizer>
@@ -2753,7 +2801,7 @@
        </LineSymbolizer>
      </Rule>
      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([bridge] = 'yes' or [bridge]='true')</Filter>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and ([bridge] = 'yes' or [bridge]='true')</Filter>
        <MaxScaleDenominator>25000</MaxScaleDenominator>
        <MinScaleDenominator>5000</MinScaleDenominator>
        <LineSymbolizer>
@@ -2762,7 +2810,7 @@
        </LineSymbolizer>
      </Rule>
      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([bridge] = 'yes' or [bridge]='true')</Filter>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified' or [highway] = 'road') and ([bridge] = 'yes' or [bridge]='true')</Filter>
        <MaxScaleDenominator>5000</MaxScaleDenominator>
        <MinScaleDenominator>1000</MinScaleDenominator>
        <LineSymbolizer>
@@ -3010,10 +3058,44 @@
        </LineSymbolizer>
      </Rule>
      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([bridge] = 'yes' or [bridge]='true')</Filter>
+      <Filter>[highway] = 'road' and ([bridge] = 'yes' or [bridge]='true')</Filter>
        <MaxScaleDenominator>50000</MaxScaleDenominator>
        <MinScaleDenominator>25000</MinScaleDenominator>
        <LineSymbolizer>
+        <CssParameter name="stroke">#ddd</CssParameter>
+        <CssParameter name="stroke-width">3.5</CssParameter>
+        <CssParameter name="stroke-linejoin">round</CssParameter>
+        <CssParameter name="stroke-linecap">round</CssParameter>
+      </LineSymbolizer>
+    </Rule>
+    <Rule>
+      <Filter>[highway] = 'road' and ([bridge] = 'yes' or [bridge]='true')</Filter>
+      <MaxScaleDenominator>25000</MaxScaleDenominator>
+      <MinScaleDenominator>5000</MinScaleDenominator>
+      <LineSymbolizer>
+        <CssParameter name="stroke">#ddd</CssParameter>
+        <CssParameter name="stroke-width">9.5</CssParameter>
+        <CssParameter name="stroke-linejoin">round</CssParameter>
+        <CssParameter name="stroke-linecap">round</CssParameter>
+      </LineSymbolizer>
+    </Rule>
+    <Rule>
+      <Filter>[highway] = 'road' and ([bridge] = 'yes' or [bridge]='true')</Filter>
+      <MaxScaleDenominator>5000</MaxScaleDenominator>
+      <MinScaleDenominator>1000</MinScaleDenominator>
+      <LineSymbolizer>
+        <CssParameter name="stroke">#ddd</CssParameter>
+        <CssParameter name="stroke-width">14</CssParameter>
+        <CssParameter name="stroke-linejoin">round</CssParameter>
+        <CssParameter name="stroke-linecap">round</CssParameter>
+      </LineSymbolizer>
+    </Rule>
+
+    <Rule>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified') and ([bridge] = 'yes' or [bridge]='true')</Filter>
+      <MaxScaleDenominator>50000</MaxScaleDenominator>
+      <MinScaleDenominator>25000</MinScaleDenominator>
+      <LineSymbolizer>
          <CssParameter name="stroke">white</CssParameter>
          <CssParameter name="stroke-width">3.5</CssParameter>
          <CssParameter name="stroke-linejoin">round</CssParameter>
@@ -3021,7 +3103,7 @@
        </LineSymbolizer>
      </Rule>
      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([bridge] = 'yes' or [bridge]='true')</Filter>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified') and ([bridge] = 'yes' or [bridge]='true')</Filter>
        <MaxScaleDenominator>25000</MaxScaleDenominator>
        <MinScaleDenominator>5000</MinScaleDenominator>
        <LineSymbolizer>
@@ -3032,7 +3114,7 @@
        </LineSymbolizer>
      </Rule>
      <Rule>
-      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'road') and ([bridge] = 'yes' or [bridge]='true')</Filter>
+      <Filter>([highway] = 'residential' or [highway] = 'minor' or [highway] = 'unclassified') and ([bridge] = 'yes' or [bridge]='true')</Filter>
        <MaxScaleDenominator>5000</MaxScaleDenominator>
        <MinScaleDenominator>1000</MinScaleDenominator>
        <LineSymbolizer>




More information about the dev mailing list