]> git.street.me.uk Git - andy/viking.git/blame_incremental - help/C/mapnik_rendering_layer.xml
Make a newly loaded file layer more accessible in the layers panel
[andy/viking.git] / help / C / mapnik_rendering_layer.xml
... / ...
CommitLineData
1<?xml version="1.0"?>
2<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
4 [
5 <!ENTITY appname "Viking">
6 ]
7>
8<section id="MapnikRendering" xreflabel="Mapnik Rendering">
9<title>Mapnik Rendering Layer</title>
10
11<para>
12The Mapnik Rendering Layer uses the <ulink url="http://mapnik.org/">Mapnik Library</ulink> to generate map images according to the Mapnik configuration.
13</para>
14
15<para>
16When using this layer it is useful to review the <xref linkend="prefs_mapnik"/> to ensure the settings are correct for your system.
17</para>
18
19<para>
20Mapnik configurations can be created via the CartoCSS Mapnik stylesheet pre-processor.
21&appname; will automatically invoke the <emphasis>carto</emphasis> program when a carto project file is specified.
22Currently &appname; can not tell when an included file of the project has changed, so there is an option to manually run the carto command.
23</para>
24
25<para>
26&appname; will only (re)render tiles when it believes it is necessary - such as when there is no tile in the file cache,
27when there is a new Mapnik configuration style or the tile is over a certain age.
28To force &appname; to (re)render all tiles - create the file <filename>~/.viking/planet-import-complete</filename>
29 and/or update its timestamp. (e.g. using the <emphasis>touch</emphasis> command).
30</para>
31
32<para>
33Creating a Carto project or an initial Mapnik configuration file and maintaining the datasource is beyond the scope of this documentation.
34There are various existing Carto projects such as <ulink url="https://github.com/gravitystorm/openstreetmap-carto">OSM Carto</ulink>
35or <ulink url="https://github.com/mapbox/osm-bright">OSM Bright</ulink>. These use OSM data and contain guides on how to setup the datasource.
36Further detail about using OSM data can be found on the <ulink url="http://switch2osm.org/loading-osm-data/">Switch2OSM</ulink> website.
37</para>
38
39<para>
40If you use a simple Mapnik configuration then the tile rendering time can be negligible and you can avoid having a tile cache.
41However for most systems using a stylesheet of similar complexity to the OSM Carto styling,
42rendering a tile (including reading/acquiring the data) can take some time and thus several seconds to generate a display screen's worth of tiles.
43Hence &appname; runs these tasks in the background and uses the tile cache to save this output.
44</para>
45
46<para>
47Generated tiles are stored in the <emphasis>PNG</emphasis> format in the standard <ulink url="http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames">OSM Tile name</ulink> layout.
48</para>
49
50<note>
51<para>
52Currently due to code build and dependency complexities, Mapnik Rendering is not available in the <trademark>Windows</trademark> version of &appname;
53</para>
54</note>
55
56<section><title>Layer Properties</title>
57<para>
58Configurable properties:
59</para>
60<formalpara><title>Carto project file</title>
61 <para>When specified, this is used to generate the mapnik configuration file.</para>
62</formalpara>
63<formalpara><title>Mapnik configuration file</title>
64 <para>Specify the Mapnik configuration file or leave it blank when using a Carto project file.</para>
65</formalpara>
66<formalpara><title>Alpha</title>
67 <para>Control the Alpha value for transparency effects using a value between 0 and 255 with the default being 255 for a fully solid image, whereas 0 is transparent.</para>
68</formalpara>
69<formalpara><title>Use File Cache</title>
70 <para>The default is to use a file cache.</para>
71</formalpara>
72<formalpara><title>Tile cache directory</title>
73 <para>The top level directory of where the generated tiles are stored.</para>
74</formalpara>
75</section>
76
77<section><title>Layer Operations</title>
78<para>These extra options are available when right clicking on the Mapnik Rendering Layer in the Layers Panel.</para>
79<formalpara><title>Refresh</title>
80<para>Reload the Mapnik configuration.</para>
81</formalpara>
82<formalpara><title>Run Carto Command</title>
83<para>Force running the carto command and reload the generated Mapnik configuration.</para>
84</formalpara>
85<formalpara><title>About</title>
86<para>Show some information about the Mapnik version in use.</para>
87</formalpara>
88</section>
89
90<section><title>Viewport Tools</title>
91<para>
92When a Mapnik Rendering Layer is selected in the Layers Panel, the <guilabel>Mapnik Features</guilabel> tool can be selected from the toolbar.
93This enables location dependent actions to be invoked by right clicking on the viewport and selecting an action from the drop down menu.
94</para>
95<itemizedlist>
96<listitem>
97 <para>Rerender Tile.</para>
98</listitem>
99<listitem>
100 <para>Tile Info</para>
101</listitem>
102</itemizedlist>
103</section>
104
105</section>