On Fri, Oct 3, 2008 at 11:14 PM, Ævar Arnfjörð Bjarmason
<[EMAIL PROTECTED]> wrote:
> Currently osmarender does not have a rule to render glaciers, these
> are major landmarks in the areas that have them.
>
> Glaciers are traditionally white (#fff) in most maps, osmarenderer
> currently renders natural=land as #fff so there's the question of how
> they should be colored. White with a thick border of another color?
> Blue-ish? Something else?

Attached is a patch to osmarenderer to implement glacier rendering, I
went with a rendering suggested on the wiki [1] which fills the area
with #fafaff and draws a lightblue line around it.

I've uploaded this rendering to the main [EMAIL PROTECTED] servers for one 
glacier
in Iceland[2] for reference (screenshot: http://u.nix.is/glacier-z14.png)

It would be nice to get the name of the glacier rendered in the center
of it but I didn't know how to implement this, the diagonal lines
discussed previously might also be nice but I didn't know how do do
those either.

The rendering I've implemented however is similar to how glaciers are
traditionally rendered on maps, aside from lacking the name.

1. http://wiki.openstreetmap.org/index.php/Tag:natural%3Dglacier#Comments
2. 
http://server.tah.openstreetmap.org/Browse/slippy/?zoom=12&lat=63.78855&lon=-19.58213&layers=BF
Index: osmAtHome/osm-map-features.xml
===================================================================
--- osmAtHome/osm-map-features.xml	(revision 11520)
+++ osmAtHome/osm-map-features.xml	(working copy)
@@ -66,6 +66,9 @@
 		<rule e="way|area" k="natural" v="coastline">
 		   <line class='natural-coastline'/> 
 		</rule>
+		<rule e="way|area" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
 		<rule e="way|area" k="natural" v="land">
 			<area class='natural-land' /> 
 		</rule>
@@ -1266,6 +1269,12 @@
 			  stroke-width: 1.5px;
 			  }
 
+			.natural-glacier {
+			  fill: #fafaff;
+			  stroke: lightblue;
+			  stroke-width: 0.4px;
+			  }
+
 			.natural-land {
 			  fill: #ffffff;
 			  stroke: #e0e0e0;
Index: stylesheets/osm-map-features-z6.xml
===================================================================
--- stylesheets/osm-map-features-z6.xml	(revision 11520)
+++ stylesheets/osm-map-features-z6.xml	(working copy)
@@ -1073,6 +1073,12 @@
                 stroke-width: 1.5px;
             }
 
+            .natural-glacier {
+                fill: #fafaff;
+                stroke: lightblue;
+                stroke-width: 1.5px;
+            }
+
             .natural-land {
                 fill: #ffffff;
                 stroke: #e0e0e0;
Index: stylesheets/osm-map-features-z7.xml
===================================================================
--- stylesheets/osm-map-features-z7.xml	(revision 11520)
+++ stylesheets/osm-map-features-z7.xml	(working copy)
@@ -40,6 +40,9 @@
         <rule e="way" k="natural" v="coastline">
             <area class="natural-coastline"/>
         </rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
         <rule e="way" k="landuse|natural" v="forest|wood">
             <area class="landuse-wood"/>
         </rule>
@@ -1069,6 +1072,12 @@
                 stroke-width: 1.5px;
             }
 
+            .natural-glacier {
+                fill: #fafaff;
+                stroke: lightblue;
+                stroke-width: 1.5px;
+            }
+
             .natural-land {
                 fill: #ffffff;
                 stroke: #e0e0e0;
Index: stylesheets/osm-map-features-z8.xml
===================================================================
--- stylesheets/osm-map-features-z8.xml	(revision 11520)
+++ stylesheets/osm-map-features-z8.xml	(working copy)
@@ -40,6 +40,9 @@
         <rule e="way" k="natural" v="coastline">
             <area class="natural-coastline"/>
         </rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
         <rule e="way" k="landuse|natural" v="forest|wood">
             <area class="landuse-wood"/>
         </rule>
@@ -428,6 +431,12 @@
                 stroke-width: 15px;
             }
 
+            .natural-glacier {
+                fill: #fafaff;
+                stroke: lightblue;
+                stroke-width: 15px;
+            }
+
             .natural-land {
                 fill: #ffffff;
                 stroke: #e0e0e0;
Index: stylesheets/osm-map-features-z9.xml
===================================================================
--- stylesheets/osm-map-features-z9.xml	(revision 11520)
+++ stylesheets/osm-map-features-z9.xml	(working copy)
@@ -40,6 +40,9 @@
         <rule e="way" k="natural" v="coastline">
             <area class="natural-coastline"/>
         </rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
         <rule e="way" k="landuse|natural" v="forest|wood">
             <area class="landuse-wood"/>
         </rule>
@@ -429,6 +432,12 @@
                 stroke-width: 15px;
             }
 
+            .natural-glacier {
+                fill: #fafaff;
+                stroke: lightblue;
+                stroke-width: 15px;
+            }
+
             .natural-land {
                 fill: #ffffff;
                 stroke: #e0e0e0;
Index: stylesheets/osm-map-features-z10.xml
===================================================================
--- stylesheets/osm-map-features-z10.xml	(revision 11520)
+++ stylesheets/osm-map-features-z10.xml	(working copy)
@@ -40,6 +40,9 @@
         <rule e="way" k="natural" v="coastline">
             <area class="natural-coastline"/>
         </rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
         <rule e="way" k="landuse|natural" v="forest|wood">
             <area class="landuse-wood"/>
         </rule>
@@ -1103,6 +1106,12 @@
                 stroke-width: 1.5px;
             }
 
+            .natural-glacier {
+                fill: #fafaff;
+                stroke: lightblue;
+                stroke-width: 1.5px;
+            }
+
             .natural-land {
                 fill: #ffffff;
                 stroke: #e0e0e0;
Index: stylesheets/osm-map-features-z11.xml
===================================================================
--- stylesheets/osm-map-features-z11.xml	(revision 11520)
+++ stylesheets/osm-map-features-z11.xml	(working copy)
@@ -40,6 +40,9 @@
         <rule e="way" k="natural" v="coastline">
             <area class="natural-coastline"/>
         </rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
         <rule e="way" k="landuse|natural" v="forest|wood">
             <area class="landuse-wood"/>
         </rule>
@@ -1102,6 +1105,12 @@
                 stroke-width: 1.5px;
             }
 
+            .natural-glacier {
+                fill: #fafaff;
+                stroke: lightblue;
+                stroke-width: 1.5px;
+            }
+
             .natural-land {
                 fill: #ffffff;
                 stroke: #e0e0e0;
Index: stylesheets/captionless-z12.xml
===================================================================
--- stylesheets/captionless-z12.xml	(revision 11520)
+++ stylesheets/captionless-z12.xml	(working copy)
@@ -837,6 +837,12 @@
                 stroke-width: 1.5px;
             }
 
+            .natural-glacier {
+                fill: #fafaff;
+                stroke: lightblue;
+                stroke-width: 1.5px;
+            }
+
             .natural-land {
                 fill: #f8f8f8;
                 stroke: #e0e0e0;
Index: stylesheets/osm-map-features-z12.xml
===================================================================
--- stylesheets/osm-map-features-z12.xml	(revision 11520)
+++ stylesheets/osm-map-features-z12.xml	(working copy)
@@ -36,6 +36,9 @@
 		<rule e="way" k="natural" v="coastline">
 			<area class="natural-coastline"/>
 		</rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
 		<rule e="way" k="landuse|natural" v="forest|wood|scrub">
 			<area class="landuse-wood"/>
 		</rule>
@@ -1261,6 +1264,12 @@
 			stroke: #b5d6f1;
 			stroke-width: 1.5px;
 			}
+
+			.natural-glacier {
+			fill: #fafaff;
+			stroke: lightblue;
+			stroke-width: 1.5px;
+			}
 			
 			.natural-land {
 			fill: #f8f8f8;
Index: stylesheets/osm-map-features-z13.xml
===================================================================
--- stylesheets/osm-map-features-z13.xml	(revision 11520)
+++ stylesheets/osm-map-features-z13.xml	(working copy)
@@ -42,6 +42,9 @@
 		<rule e="way" k="natural" v="coastline">
 			<area class="natural-coastline"/>
 		</rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
 		<rule e="way" k="natural" v="land">
 			<area class="natural-land"/>
 		</rule>
@@ -1397,6 +1400,12 @@
 			stroke: #b5d6f1;
 			stroke-width: 1.5px;
 			}
+
+			.natural-glacier {
+			fill: #fafaff;
+			stroke: lightblue;
+			stroke-width: 1.5px;
+			}
 			
 			.natural-land {
 			fill: #f8f8f8;
Index: stylesheets/standard.xml
===================================================================
--- stylesheets/standard.xml	(revision 11520)
+++ stylesheets/standard.xml	(working copy)
@@ -72,6 +72,9 @@
             <rule e="way" k="natural" v="coastline">
                 <line class='natural-coastline'/>
             </rule>
+		    <rule e="way" k="natural" v="glacier">
+		        <line class='natural-glacier'/> 
+		    </rule>
             <rule e="way" k="natural" v="land">
                 <area class='natural-land' />
             </rule>
@@ -1783,6 +1786,12 @@
                 stroke-width: 0.4px;
             }
 
+            .natural-glacier {
+                fill: #fafaff;
+                stroke: lightblue;
+                stroke-width: 0.4px;
+            }
+
             .natural-land {
                 fill: #ffffff;
                 stroke: #e0e0e0;
Index: stylesheets/osm-map-features-z14.xml
===================================================================
--- stylesheets/osm-map-features-z14.xml	(revision 11520)
+++ stylesheets/osm-map-features-z14.xml	(working copy)
@@ -47,6 +47,9 @@
 		<rule e="way" k="natural" v="coastline">
 			<area class="natural-coastline"/>
 		</rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
 		<rule e="way" k="natural" v="land">
 			<area class="natural-land"/>
 		</rule>
@@ -1688,6 +1691,12 @@
 			stroke: #b5d6f1;
 			stroke-width: 0.8px;
 			}
+
+			.natural-glacier {
+			fill: #fafaff;
+			stroke: lightblue;
+			stroke-width: 0.8px;
+			}
 			
 			.natural-land {
 			fill: #f8f8f8;
Index: stylesheets/osm-map-features-z15.xml
===================================================================
--- stylesheets/osm-map-features-z15.xml	(revision 11520)
+++ stylesheets/osm-map-features-z15.xml	(working copy)
@@ -48,6 +48,9 @@
 		<rule e="way" k="natural" v="coastline">
 			<area class="natural-coastline"/>
 		</rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
 		<rule e="way" k="natural" v="land">
 			<area class="natural-land"/>
 		</rule>
@@ -1855,6 +1858,12 @@
 			stroke: #b5d6f1;
 			stroke-width: 0.8px;
 			}
+
+			.natural-glacier {
+			fill: #fafaff;
+			stroke: lightblue;
+			stroke-width: 0.8px;
+			}
 			
 			.natural-land {
 			fill: #f8f8f8;
Index: stylesheets/osm-map-features-z16.xml
===================================================================
--- stylesheets/osm-map-features-z16.xml	(revision 11520)
+++ stylesheets/osm-map-features-z16.xml	(working copy)
@@ -48,6 +48,9 @@
 		<rule e="way" k="natural" v="coastline">
 			<area class="natural-coastline"/>
 		</rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
 		<rule e="way" k="natural" v="land">
 			<area class="natural-land"/>
 		</rule>
@@ -2417,6 +2420,12 @@
 			stroke: #b5d6f1;
 			stroke-width: 0.8px;
 			}
+
+			.natural-glacier {
+			fill: #fafaff;
+			stroke: lightblue;
+			stroke-width: 0.8px;
+			}
 			
 			.natural-land {
 			fill: #f8f8f8;
Index: stylesheets/osm-map-features-z17.xml
===================================================================
--- stylesheets/osm-map-features-z17.xml	(revision 11520)
+++ stylesheets/osm-map-features-z17.xml	(working copy)
@@ -51,6 +51,9 @@
 		<rule e="way" k="natural" v="coastline">
 			<area class="natural-coastline"/>
 		</rule>
+		<rule e="way" k="natural" v="glacier">
+		   <line class='natural-glacier'/> 
+		</rule>
 		<rule e="way" k="natural" v="land">
 			<area class="natural-land"/>
 		</rule>
@@ -2867,6 +2870,12 @@
 			stroke: #b5d6f1;
 			stroke-width: 0.4px;
 			}
+
+			.natural-glacier {
+			fill: #fafaff;
+			stroke: lightblue;
+			stroke-width: 0.8px;
+			}
 			
 			.natural-land {
 			fill: #f8f8f8;
_______________________________________________
Tilesathome mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/tilesathome

Reply via email to