File: sqlite_attachdb.xml

package info (click to toggle)
mapnik 2.0.0%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 35,496 kB
  • sloc: cpp: 91,793; python: 6,051; xml: 3,528; sh: 848; makefile: 70; lisp: 10
file content (37 lines) | stat: -rw-r--r-- 1,466 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
<?xml version="1.0" encoding="utf-8"?>
<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">

<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: http://trac.mapnik.org/ticket/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>