File: sqlite_attachdb.xml

package info (click to toggle)
mapnik 2.2.0%2Bds1-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 30,288 kB
  • ctags: 18,382
  • sloc: cpp: 115,128; python: 9,298; xml: 5,692; ansic: 3,726; makefile: 160; sh: 159; lisp: 13
file content (36 lines) | stat: -rw-r--r-- 1,460 bytes parent folder | download | duplicates (2)
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
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2">

<Style name="world">
  <Rule>
    <PolygonSymbolizer fill="green"/>
  </Rule>
</Style>

<Layer name="world" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
    <StyleName>world</StyleName>
    <Datasource>
       <Parameter name="type">sqlite</Parameter>
       <Parameter name="file">../sqlite/world.sqlite</Parameter>
       <!-- should work with or without leveraging and index -->
       <Parameter name="use_spatial_index">true</Parameter>

       <!-- key_field is required if a subquery AND spatial index
         is used. see: https://github.com/mapnik/mapnik/issues/821
       -->
       <Parameter name="key_field">OGC_FID</Parameter>
       <!--
       <Parameter name="table">(SELECT * FROM world_merc)</Parameter>
       -->
       <Parameter name="table">(SELECT *,world_merc.rowid FROM world_merc INNER JOIN business ON business.ISO3 = world_merc.iso3) as s</Parameter>

       <!--
       sqlite3 world.sqlite
       ATTACH DATABASE 'business.sqlite' AS business;
       SELECT count(*) FROM "10m_admin_0_countries" INNER JOIN business ON business.ISO3 = iso_a3;
       -->
       <Parameter name="attachdb">business@business.sqlite</Parameter>
       
    </Datasource>
  </Layer>

</Map>