File: population.xml

package info (click to toggle)
tilelite 0.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 648 kB
  • ctags: 95
  • sloc: python: 528; xml: 79; makefile: 10
file content (110 lines) | stat: -rw-r--r-- 4,607 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map>
<!-- Sample Mapnik XML template by Dane Springmeyer -->
<Map bgcolor="transparent" 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">

  <!-- Built from Seven Class sequential YIGnBu from www.colorbrewer.org -->
  <!-- Quantile breaks originally from QGIS layer classification -->  
  <Style name="population">
     
     <Rule>
      <Filter>[POP2005] &gt;= 0 and [POP2005] &lt; 15000</Filter>
      <PolygonSymbolizer>
        <CssParameter name="fill">#c7e9b4</CssParameter>
      </PolygonSymbolizer>
     </Rule>
     
     <Rule>
      <Filter>[POP2005] &gt;= 15000 and [POP2005] &lt; 255000</Filter>
      <PolygonSymbolizer>
        <CssParameter name="fill">#7fcdbb</CssParameter>
      </PolygonSymbolizer>
     </Rule>
     
     <Rule>
      <Filter>[POP2005] &gt;= 255000 and [POP2005] &lt; 1300000</Filter>
      <PolygonSymbolizer>
        <CssParameter name="fill">#1d91c0</CssParameter>
      </PolygonSymbolizer>
     </Rule>
     
     <Rule>
      <Filter>[POP2005] &gt;= 1300000 and [POP2005] &lt; 4320000</Filter>
      <PolygonSymbolizer>
        <CssParameter name="fill">#41b6c3</CssParameter>
      </PolygonSymbolizer>
     </Rule>
          
     <Rule>
      <Filter>[POP2005] &gt;= 4320000 and [POP2005] &lt; 9450000</Filter>
      <PolygonSymbolizer>
        <CssParameter name="fill">#225ea8</CssParameter>
      </PolygonSymbolizer>
     </Rule>
          
     <Rule>
      <Filter>[POP2005] &gt;= 9450000 and [POP2005] &lt; 25650000</Filter>
      <PolygonSymbolizer>
        <CssParameter name="fill">#225ea8</CssParameter>        
      </PolygonSymbolizer>
     </Rule>
          
     <Rule>
      <Filter>[POP2005] &gt;= 25650000 and [POP2005] &lt; 1134000000</Filter>
      <PolygonSymbolizer>
        <CssParameter name="fill">#122F7F</CssParameter>
      </PolygonSymbolizer>
     </Rule>
          
     <Rule>
      <ElseFilter/>
      <!-- This will catch all other values - in this case just India and China -->
      <!-- A dark red polygon fill is used here to highlight these two countries -->
      <PolygonSymbolizer>
        <CssParameter name="fill">darkred</CssParameter>
      </PolygonSymbolizer>
     </Rule>
    
   </Style>
    
   <Style name="countries_label">
     <Rule>
      <!--  Only label those countries with over 9 Million People -->
      <!--  Note: Halo and Fill are reversed to try to make them subtle -->
      <Filter>[POP2005] &gt;= 4320000 and [POP2005] &lt; 9450000</Filter>
      <TextSymbolizer name="NAME" face_name="DejaVu Sans Bold" size="7" fill="black" halo_fill= "#DFDBE3" halo_radius="1" wrap_width="20" spacing="5" allow_overlap="false" avoid_edges="false" min_distance="10"/>
     </Rule>
          
     <Rule>
      <!--  Only label those countries with over 9 Million People -->
      <!--  Note: Halo and Fill are reversed to try to make them subtle -->
      <Filter>[POP2005] &gt;= 9450000 and [POP2005] &lt; 25650000</Filter>
      <TextSymbolizer name="NAME" face_name="DejaVu Sans Book" size="9" fill="black" halo_fill= "#DFDBE3" halo_radius="1" wrap_width="20" spacing="5" allow_overlap="false" avoid_edges="false" min_distance="10"/>
     </Rule>
     
     <Rule>
      <!--  Those with over 25 Million get larger labels -->
      <Filter>[POP2005] &gt;= 25650000 and [POP2005] &lt; 1134000000</Filter>
      <TextSymbolizer name="NAME" face_name="DejaVu Sans Book" size="12" fill="white" halo_fill= "#2E2F39" halo_radius="1" wrap_width="20" spacing="5" allow_overlap="false" avoid_edges="true" min_distance="10"/>
     </Rule>
          
     <Rule>
      <!--  Those with over 25 Million get larger labels -->
      <!--  Note: allow_overlap is true here to allow India to sneak through -->
      <Filter>[POP2005] &gt;= 1134000000</Filter>
      <TextSymbolizer name="NAME" face_name="DejaVu Sans Book" size="15" fill="white" halo_fill= "black" halo_radius="1" wrap_width="20" spacing="5" allow_overlap="true" avoid_edges="true" min_distance="10"/>
     </Rule>
  </Style>
  
  <Layer name="countries" 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">
    <!-- Style order determines layering hierarchy -->
    <!-- Labels go on top so they are listed second -->
    <StyleName>population</StyleName>
    <StyleName>countries_label</StyleName>
    <Datasource>
      <Parameter name="type">shape</Parameter>
      <Parameter name="file">world_merc</Parameter>
    </Datasource>
  </Layer>

</Map>