source: subversion/applications/rendering/mapnik/inc/layer-placenames.xml.inc @ 20176

Last change on this file since 20176 was 18140, checked in by ldp, 10 years ago

Split placenames layer into high/medium/low zoom layers

File size: 6.7 KB
Line 
1<Style name="country">
2    <Rule>
3      <Filter>[place] = 'country'</Filter>
4      &maxscale_zoom2;
5      &minscale_zoom3;
6      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#9d6c9d" dy="0" halo_radius="1" wrap_width="0"/>
7    </Rule>
8    <Rule>
9      <Filter>[place] = 'country'</Filter>
10      &maxscale_zoom4;
11      &minscale_zoom6;
12      <TextSymbolizer name="name" fontset_name="book-fonts" size="11" fill="#9d6c9d" dy="0" halo_radius="1" wrap_width="0"/>
13    </Rule>
14</Style>
15<Style name="state">
16    <Rule>
17      <Filter>[place] = 'state'</Filter>
18      &maxscale_zoom4;
19      &minscale_zoom4;
20      <TextSymbolizer name="ref" fontset_name="oblique-fonts" size="9" fill="#9d6c9d" dy="0" halo_radius="1" wrap_width="0"/>
21    </Rule>
22    <Rule>
23      <Filter>[place] = 'state'</Filter>
24      &maxscale_zoom5;
25      &minscale_zoom6;
26      <TextSymbolizer name="name" fontset_name="oblique-fonts" size="9" fill="#9d6c9d" dy="0" halo_radius="1" wrap_width="0"/>
27    </Rule>
28    <Rule>
29      <Filter>[place] = 'state'</Filter>
30      &maxscale_zoom7;
31      &minscale_zoom8;
32      <TextSymbolizer name="name" fontset_name="oblique-fonts" size="11" fill="#9d6c9d" dy="0" halo_radius="1" wrap_width="0"/>
33    </Rule>
34</Style>
35<Style name="capital">
36     <Rule>
37      <Filter>[place] = 'city' or [place]='metropolis'</Filter>
38      &maxscale_zoom4;
39      &minscale_zoom5;
40      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#000" dy="0" halo_radius="1" wrap_width="0"/>
41    </Rule>
42    <Rule>
43      <Filter>[place] = 'city' or [place]='metropolis'</Filter>
44      &maxscale_zoom6;
45      &minscale_zoom8;
46      <TextSymbolizer name="name" fontset_name="book-fonts" size="11" fill="#000" dy="0" halo_radius="1" wrap_width="0"/>
47    </Rule>
48    <Rule>
49      <Filter>[place] = 'city' or [place]='metropolis'</Filter>
50      &maxscale_zoom9;
51      &minscale_zoom10;
52      <TextSymbolizer name="name" fontset_name="book-fonts" size="11" fill="#000" dy="0" halo_radius="1" wrap_width="0"/>
53    </Rule>
54    <Rule>
55      <Filter>[place] = 'city' or [place]='metropolis'</Filter>
56      &maxscale_zoom11;
57      &minscale_zoom14;
58      <TextSymbolizer name="name" fontset_name="book-fonts" size="14" fill="#000" dy="0" halo_radius="1" wrap_width="0"/>
59    </Rule>
60</Style>
61<Style name="city">
62    <Rule>
63      <Filter>[place] = 'city' or [place]='metropolis'</Filter>
64      &maxscale_zoom6;
65      &minscale_zoom8;
66      <TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#000" dy="0" halo_radius="1" wrap_width="0"/>
67    </Rule>
68    <Rule>
69      <Filter>[place] = 'city' or [place]='metropolis'</Filter>
70      &maxscale_zoom9;
71      &minscale_zoom10;
72      <TextSymbolizer name="name" fontset_name="book-fonts" size="11" fill="#000" dy="0" halo_radius="1" wrap_width="0"/>
73    </Rule>
74    <Rule>
75      <Filter>[place] = 'city' or [place]='metropolis'</Filter>
76      &maxscale_zoom11;
77      &minscale_zoom14;
78      <TextSymbolizer name="name" fontset_name="book-fonts" size="14" fill="#000" dy="0" halo_radius="1" wrap_width="0"/>
79    </Rule>
80</Style>
81<Style name="town">
82    <Rule>
83      <Filter>[place] = 'town' or [place]='large_town' or [place]='small_town'</Filter>
84      &maxscale_zoom9;
85      &minscale_zoom10;
86      <TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#000" halo_radius="1" wrap_width="20"/>
87    </Rule>
88    <Rule>
89      <Filter>[place] = 'town' or [place]='large_town' or [place]='small_town'</Filter>
90      &maxscale_zoom11;
91      &minscale_zoom13;
92      <TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#000" halo_radius="1" wrap_width="20"/>
93    </Rule>
94    <Rule>
95      <Filter>[place] = 'town' or [place]='large_town' or [place]='small_town'</Filter>
96      &maxscale_zoom14;
97      <TextSymbolizer name="name" fontset_name="book-fonts" size="14" fill="#777777" halo_radius="1" wrap_width="20"/>
98    </Rule>
99</Style>
100<Style name="suburb">
101    <Rule>
102      <Filter>[place] = 'suburb'</Filter>
103      &maxscale_zoom12;
104      &minscale_zoom13;
105      <TextSymbolizer name="name" fontset_name="book-fonts" size="10" fill="#000" halo_radius="1" wrap_width="0"/>
106    </Rule>
107    <Rule>
108      <Filter>[place] = 'suburb'</Filter>
109      &maxscale_zoom14;
110      <TextSymbolizer name="name" fontset_name="book-fonts" size="13" fill="#777777" halo_radius="1" wrap_width="0"/>
111    </Rule>
112</Style>
113<Style name="village">
114    <Rule>
115      <Filter>[place] = 'village' or [place]='large_village'</Filter>
116      &maxscale_zoom12;
117      &minscale_zoom14;
118      <TextSymbolizer name="name" fontset_name="book-fonts" size="9" fill="#000" halo_radius="1" wrap_width="0"/>
119    </Rule>
120    <Rule>
121      <Filter>[place] = 'village' or [place]='large_village'</Filter>
122      &maxscale_zoom15;
123      <TextSymbolizer name="name" fontset_name="book-fonts" size="12" fill="#777777" halo_radius="1" wrap_width="0"/>
124    </Rule>
125</Style>
126<Style name="hamlet">
127    <Rule>
128      <Filter>[place] = 'hamlet' or [place] = 'locality'</Filter>
129      &maxscale_zoom14;
130      &minscale_zoom15;
131      <TextSymbolizer name="name" fontset_name="book-fonts" size="8" fill="#000" halo_radius="1" wrap_width="0"/>
132    </Rule>
133    <Rule>
134      <Filter>[place] = 'hamlet' or [place] = 'locality'</Filter>
135      &maxscale_zoom16;
136      <TextSymbolizer name="name" fontset_name="book-fonts" size="11" fill="#777777" halo_radius="1" wrap_width="0"/>
137    </Rule>
138</Style>
139
140<Layer name="placenames-large" status="on" srs="&osm2pgsql_projection;">
141    <StyleName>country</StyleName>
142    <StyleName>state</StyleName>
143    <StyleName>capital</StyleName>
144    <Datasource>
145      <Parameter name="table">
146      (select way,place,name,ref
147      from &prefix;_point
148      where place in ('country','state')
149         or (place in ('city','metropolis') and capital='yes')
150      ) as placenames</Parameter>
151      &datasource-settings;
152    </Datasource>
153</Layer>
154<Layer name="placenames-medium" status="on" srs="&osm2pgsql_projection;">
155    <StyleName>city</StyleName>
156    <StyleName>town</StyleName>
157    <Datasource>
158      <Parameter name="table">
159      (select way,place,name
160      from &prefix;_point
161      where place in ('city','metropolis','town','large_town','small_town')
162        and (capital is null or capital&lt;&gt;'yes')
163      ) as placenames</Parameter>
164      &datasource-settings;
165    </Datasource>
166</Layer>
167<Layer name="placenames-small" status="on" srs="&osm2pgsql_projection;">
168    <StyleName>suburb</StyleName>
169    <StyleName>village</StyleName>
170    <StyleName>hamlet</StyleName>
171    <Datasource>
172      <Parameter name="table">
173      (select way,place,name
174      from &prefix;_point
175      where place in ('suburb','village','large_village','hamlet','locality')
176      ) as placenames</Parameter>
177      &datasource-settings;
178    </Datasource>
179</Layer>
180
Note: See TracBrowser for help on using the repository browser.