Permalink
Browse files

Added park and water labels in green and blue

  • Loading branch information...
1 parent 2accf1a commit 6c988b343b5e8adc3cd5c27b7e22a288a9c2d4cb Michal Migurski committed Dec 21, 2011
Showing with 1,747 additions and 463 deletions.
  1. +43 −0 labels.mss
  2. BIN solar-light-16.act
  3. +67 −1 style.mml
  4. +1,637 −462 tile-style.xml
View
@@ -52,6 +52,49 @@
/*
+ * Water and Park labels.
+ */
+
+#water-labels name
+{
+ text-fill: #268bd2;
+}
+
+#green-labels name
+{
+ text-fill: #859900;
+}
+
+.area-labels[zoom=11][sq_km>3.2768][sq_km<51200] name,
+.area-labels[zoom=12][sq_km>0.8192][sq_km<25600] name,
+.area-labels[zoom=13][sq_km>0.2048][sq_km<12800] name,
+.area-labels[zoom=14][sq_km>0.0512][sq_km<6400] name,
+.area-labels[zoom=15][sq_km>0.0128][sq_km<3200] name,
+.area-labels[zoom=16][sq_km>0.0064][sq_km<1600] name,
+.area-labels[zoom=17][sq_km>0.0032][sq_km<800] name,
+.area-labels[zoom=18][sq_km>0.0016][sq_km<400] name,
+.area-labels[zoom>=19][sq_km<200] name
+{
+ text-face-name: 'DejaVu Sans Condensed';
+
+ text-halo-fill: #fdf6e3;
+ text-halo-radius: 2;
+
+ text-wrap-width: 96;
+}
+
+.area-labels[zoom<13] name
+{
+ text-size: 12;
+}
+
+.area-labels[zoom>=13] name
+{
+ text-size: 14;
+}
+
+
+/*
* Road labels.
*/
View
Binary file not shown.
View
@@ -114,7 +114,7 @@
<Parameter name="dbname">&osm_name;</Parameter>
<Parameter name="estimate_extent">false</Parameter>
<Parameter name="extent">&epsg900913_extent;</Parameter>
- <Parameter name="table">(SELECT way FROM planet_osm_polygon WHERE building IS NOT NULL) AS footprints</Parameter>
+ <Parameter name="table">(SELECT way, ST_Area(way) AS area FROM planet_osm_polygon WHERE building IS NOT NULL) AS footprints</Parameter>
</Datasource>
</Layer>
@@ -228,6 +228,72 @@
</Datasource>
</Layer>
+
+ <Layer id="water-labels" class="area-labels" srs="&epsg900913;">
+ <Datasource>
+ <Parameter name="type">postgis</Parameter>
+ <Parameter name="host">&osm_host;</Parameter>
+ <Parameter name="port">&osm_port;</Parameter>
+ <Parameter name="user">&osm_user;</Parameter>
+ <Parameter name="password">&osm_pass;</Parameter>
+ <Parameter name="dbname">&osm_name;</Parameter>
+ <Parameter name="estimate_extent">false</Parameter>
+ <Parameter name="extent">&epsg900913_extent;</Parameter>
+
+ <Parameter name="table"><![CDATA[
+ (SELECT way,
+ name,
+ ST_Area(way) / 1000000 AS sq_km
+ FROM planet_osm_polygon
+ WHERE "natural" IN ('water', 'bay')
+ OR waterway IN ('riverbank')
+ ORDER BY z_order ASC, way_area DESC
+
+ ) AS water]]></Parameter>
+ </Datasource>
+ </Layer>
+
+ <Layer id="green-labels" class="area-labels" srs="&epsg900913;">
+ <Datasource>
+ <Parameter name="type">postgis</Parameter>
+ <Parameter name="host">&osm_host;</Parameter>
+ <Parameter name="port">&osm_port;</Parameter>
+ <Parameter name="user">&osm_user;</Parameter>
+ <Parameter name="password">&osm_pass;</Parameter>
+ <Parameter name="dbname">&osm_name;</Parameter>
+ <Parameter name="estimate_extent">false</Parameter>
+ <Parameter name="extent">&epsg900913_extent;</Parameter>
+
+ <Parameter name="table"><![CDATA[
+ (SELECT way,
+ name,
+ ST_Area(way) / 1000000 AS sq_km,
+ (CASE WHEN leisure IN ('park', 'water_park', 'marina',
+ 'nature_reserve', 'playground',
+ 'garden', 'common') THEN 'park'
+ WHEN amenity IN ('graveyard') THEN 'cemetery'
+ WHEN landuse IN ('cemetery') THEN 'cemetery'
+ WHEN leisure IN ('sports_centre', 'golf_course',
+ 'stadium', 'track', 'pitch') THEN 'sport'
+ WHEN landuse IN ('recreation_ground') THEN 'sport'
+ WHEN landuse IN ('forest', 'wood') THEN 'forest'
+ ELSE '' END) AS kind
+ FROM planet_osm_polygon
+ WHERE leisure IN ('park', 'water_park', 'marina', 'nature_reserve',
+ 'playground', 'garden', 'common')
+ OR amenity IN ('graveyard')
+ OR landuse IN ('cemetery')
+ OR leisure IN ('sports_centre', 'golf_course', 'stadium',
+ 'track', 'pitch')
+ OR landuse IN ('recreation_ground')
+ OR landuse IN ('forest', 'wood')
+
+ ORDER BY ST_Area(way) DESC
+
+ ) AS green]]></Parameter>
+ </Datasource>
+ </Layer>
+
<Layer id="major-road-labels" srs="&epsg900913;">
<Datasource>
<Parameter name="type">postgis</Parameter>
Oops, something went wrong.

0 comments on commit 6c988b3

Please sign in to comment.