source: subversion/sites/www.openstreetbrowser.org/render/overlay_services.mml @ 17961

Last change on this file since 17961 was 16408, checked in by skunk, 11 years ago

Files missing (please don't ask me why)

File size: 3.9 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<!DOCTYPE Map>
3
4<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">
5   <Stylesheet src="overlay_services.mss" />
6
7   <Layer class="amenity_services" status="on" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">
8    <Datasource>
9      <Parameter name="type">postgis</Parameter>
10      <Parameter name="dbname">__DBNAME__</Parameter>
11      <Parameter name="table">(select name, way,
12                (CASE
13             WHEN "amenity" in ('post_box', 'post_office', 'post_office;atm')
14               THEN 'communication'
15             WHEN "amenity" in ('bank', 'bank;atm', 'atm;bank', 'atm')
16               THEN 'economic'
17             WHEN "man_made" is not null
18               THEN 'man_made'
19             WHEN "amenity" in ('recycling')
20               THEN 'services'
21             WHEN "amenity" in ('hospital', 'emergency_phone', 'fire_station', 'police')
22               THEN 'emergency'
23             WHEN "amenity" in ('pharmacy', 'baby_hatch', 'dentist', 'doctors', 'veterinary')
24               THEN 'health'
25             WHEN "amenity" in ('university', 'college', 'school', 'preschool', 'kindergarten', 'library')
26               THEN 'education'
27             WHEN "amenity" in ('government', 'gouvernment', 'public_building', 'court_house', 'embassy', 'prison', 'townhall')
28               THEN 'public'
29             WHEN "tourism" in ('hotel', 'hostel', 'guest_house', 'motel', 'camp_site', 'caravan_site', 'mountain_hut', 'chalet', 'information') THEN 'tourism'
30             ELSE 't0'
31           END) as type,
32           (CASE
33             /* type = communication */
34             WHEN "amenity" in ('post_box') THEN 't1'
35             WHEN "amenity" in ('post_office') THEN 't2'
36
37             /* type = economic */
38             WHEN "amenity" in ('atm') THEN 't1'
39             WHEN "amenity" in ('bank', 'bank;atm', 'bank') THEN 't2'
40
41             /* type = man_made */
42             WHEN "man_made" in ('tower', 'mast') THEN 't1'
43             WHEN "man_made" in ('power_wind') THEN 't2'
44             WHEN "man_made" in ('windmill') THEN 't3'
45
46             /* type = services */
47             WHEN "amenity" in ('recycling') THEN 't1'
48
49             /* type = emergency */
50             WHEN "amenity" in ('hospital') THEN 't1'
51
52             /* type = health */
53             WHEN "amenity" in ('pharmacy') THEN 't1'
54
55             /* type = education */
56             /* type = public */
57             /* type = tourism*/
58             WHEN "tourism" in ('hotel', 'hostel', 'guest_house', 'motel') THEN 't1'
59             WHEN "tourism" in ('camp_site', 'caravan_site') THEN 't2'
60             WHEN "tourism" in ('information') THEN 't3'
61
62             /* else */
63             ELSE 'no'
64           END) as sub_type,
65           (CASE
66             WHEN "natural" in ('peak', 'volcano', 'glacier')
67               THEN '1000m'
68             WHEN "amenity" in ('university', 'college', 'school', 'preschool',
69                                'kindergarten', 'library')
70               THEN "amenity"
71             WHEN "amenity" in ('government', 'gouvernment', 'public_building',
72                                'court_house', 'embassy', 'prison', 'townhall')
73               THEN "amenity"
74             WHEN "tourism" is not null
75               THEN "tourism"
76           END) as desc
77      from ((select
78        name, way, "natural", "amenity", "highway", "railway", "man_made", "aeroway", "tourism", "ref"
79        from planet_osm_polygon
80        where "natural" is not null or "amenity" is not null or "highway" is not null or "railway" is not null or "man_made" is not null or "aeroway" is not null or "tourism" is not null
81        order by z_order desc, way_area desc)
82      union (select
83        name, way, "natural", "amenity", "highway", "railway", "man_made", "aeroway", "tourism", "ref"
84        from planet_osm_point
85        where "natural" is not null or "amenity" is not null or "highway" is not null or "railway" is not null or "man_made" is not null or "aeroway" is not null or "tourism" is not null
86        order by z_order desc
87      )) as t1)
88      as t2</Parameter>
89      <Parameter name="estimate_extent">false</Parameter>
90      <Parameter name="extent">-20037508,-19929239,20037508,19929239</Parameter>
91    </Datasource>
92   </Layer>
93</Map>
Note: See TracBrowser for help on using the repository browser.