]> git.street.me.uk Git - andy/viking.git/commitdiff
[DOC] Document the Mapnik Rendering Layer capability.
authorRob Norris <rw_norris@hotmail.com>
Sat, 31 Jan 2015 11:39:34 +0000 (11:39 +0000)
committerRob Norris <rw_norris@hotmail.com>
Sat, 31 Jan 2015 12:10:58 +0000 (12:10 +0000)
Also mention that Viking now uses some C++.

README
help/C/mapnik_rendering_layer.xml [new file with mode: 0644]
help/C/viking.xml
help/Makefile.am
help/viking.xml
viking.spec.in

diff --git a/README b/README
index e76630950dca20cff4c1191b94ce8da8d954825b..c51a1632b47d36f6ef9be46bf7cb1c225acf99dc 100644 (file)
--- a/README
+++ b/README
@@ -1,8 +1,9 @@
 Viking is a free/open source program to manage GPS data. You can
 import, plot and create tracks, routes and waypoints, show OSM
-and other maps, see real-time GPS position, Geotag Images,
+and other maps, generate maps (using Mapnik),
+see real-time GPS position, Geotag Images,
 control items, upload/download OSM Traces and more.
-It is written in C & the GTK+2 toolkit.
+It is written mainly in C with some C++ and uses the GTK+2 toolkit.
 
 Website: http://viking.sf.net/
 
diff --git a/help/C/mapnik_rendering_layer.xml b/help/C/mapnik_rendering_layer.xml
new file mode 100644 (file)
index 0000000..1325df4
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+   [
+    <!ENTITY appname          "Viking">
+   ]
+>
+<section id="MapnikRendering" xreflabel="Mapnik Rendering">
+<title>Mapnik Rendering Layer</title>
+
+<para>
+The Mapnik Rendering Layer uses the <ulink url="http://mapnik.org/">Mapnik Library</ulink> to generate map images according to the Mapnik configuration.
+</para>
+
+<para>
+When using the this layer it is useful to review the <xref linkend="prefs_mapnik"/> to ensure the settings are correct for your system.
+</para>
+
+<para>
+Mapnik configurations can be created via the CartoCSS Mapnik stylesheet pre-processor.
+&appname; will automatically invoke the <emphasis>carto</emphasis> program when a carto project file is specified.
+Currently &appname; can not tell when an included file of the project has changed, so there is an option to manually run the carto command.
+</para>
+
+<para>
+&appname; will only (re)render tiles when it believes it is necessary - such as when there is no tile in the file cache,
+when there is a new Mapnik configuration style or the tile is over a certain age.
+To force &appname; to (re)render all tiles - create the file <filename>~/.viking/planet-import-complete</filename>
+ and/or update its timestamp. (e.g. using the <emphasis>touch</emphasis> command).
+</para>
+
+<para>
+Creating a Carto project or an initial Mapnik configuration file and maintaining the datasource is beyond the scope of this documentation.
+There are various existing Carto projects such as <ulink url="https://github.com/gravitystorm/openstreetmap-carto">OSM Carto</ulink>
+or <ulink url="https://github.com/mapbox/osm-bright">OSM Bright</ulink>. These use OSM data and contain guides on how to setup the datasource.
+Further detail about using OSM data can be found on the <ulink url="http://switch2osm.org/loading-osm-data/">Switch2OSM</ulink> website.
+</para>
+
+<para>
+If you use a simple Mapnik configuration then the tile rendering time can be negligible and you can avoid having a tile cache.
+However for most systems using a stylesheet of similar complexity to the OSM Carto styling,
+rendering a tile (including reading/acquiring the data) can take some time and thus several seconds to generate a display screen's worth of tiles.
+Hence &appname; runs these tasks in the background and uses the tile cache to save this output.
+</para>
+
+<para>
+Generated 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.
+</para>
+
+<note>
+<para>
+Currently due to code build and dependency complexities, Mapnik Rendering is not available in the <trademark>Windows</trademark> version of &appname;
+</para>
+</note>
+
+<section><title>Layer Properties</title>
+<para>
+Configurable properties:
+</para>
+<formalpara><title>Carto project file</title>
+       <para>When specified, this is used to generate the mapnik configuration file.</para>
+</formalpara>
+<formalpara><title>Mapnik configuration file</title>
+       <para>Specify the Mapnik configuration file or leave it blank when using a Carto project file.</para>
+</formalpara>
+<formalpara><title>Alpha</title>
+       <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>
+</formalpara>
+<formalpara><title>Use File Cache</title>
+       <para>The default is to use a file cache.</para>
+</formalpara>
+<formalpara><title>Tile cache directory</title>
+       <para>The top level directory of where the generated tiles are stored.</para>
+</formalpara>
+</section>
+
+<section><title>Layer Operations</title>
+<para>These extra options are available when right clicking on the Mapnik Rendering Layer in the Layers Panel.</para>
+<formalpara><title>Refresh</title>
+<para>Reload the Mapnik configuration.</para>
+</formalpara>
+<formalpara><title>Run Carto Command</title>
+<para>Force running the carto command and reload the generated Mapnik configuration.</para>
+</formalpara>
+<formalpara><title>About</title>
+<para>Show some information about the Mapnik version in use.</para>
+</formalpara>
+</section>
+
+<section><title>Viewport Tools</title>
+<para>
+When a Mapnik Rendering Layer is selected in the Layers Panel, the <guilabel>Mapnik Features</guilabel> tool can be selected from the toolbar.
+This enables location dependent actions to be invoked by right clicking on the viewport and selecting an action from the drop down menu.
+</para>
+<itemizedlist>
+<listitem>
+       <para>Rerender Tile.</para>
+</listitem>
+<listitem>
+       <para>Tile Info</para>
+</listitem>
+</itemizedlist>
+</section>
+
+</section>
index f30713eb752a276dcc8af709f19c19a9dc39cd2a..2fab04f940a2c319fe832031724e1f0d9060ef25 100644 (file)
@@ -704,6 +704,7 @@ Layers supported by &appname; are:
 <listitem><para><xref linkend="Coordinate"/></para></listitem>
 <listitem><para><xref linkend="Maps"/></para></listitem>
 <listitem><para><xref linkend="GeoRef"/></para></listitem>
+<listitem><para><xref linkend="MapnikRendering"/></para></listitem>
 </itemizedlist>
 <para>
 For each layer there are a few standard options:
@@ -1831,6 +1832,8 @@ Tracks are searched first in preference over waypoints.
 
 <xi:include href="georef_layer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<xi:include href="mapnik_rendering_layer.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <section id="Coordinate" xreflabel="Coordinate"><title>Coordinate Layer</title>
 <para>
 This layer is allows drawing of grid lines on the viewport.
@@ -2292,6 +2295,33 @@ Your OSM password will be stored in plain text.
 </section>
 </section>
 
+<section id="prefs_mapnik" xreflabel="Mapnik Preferences"><title>Mapnik</title>
+<note>
+<para>If any changes to these settings are made, you will need to restart &appname; to make them be applied.
+</para>
+</note>
+<section><title>Plugins Directory</title>
+<para>The location of Mapnik plugins. An attempt is made to automatically determine the initial value,
+ however if this is wrong or Mapnik is upgraded then the directory can be set here.</para>
+</section>
+<section><title>Fonts Directory</title>
+<para>
+The location of fonts for use with Mapnik. Normally it is best to simply use the System's font directory.
+</para>
+</section>
+<section><title>Recurse Fonts Directory</title>
+<para>Load fonts in any sub-directories of the main font directory.</para>
+</section>
+<section><title>Rerender Timeout</title>
+<para>The time in hours before any tile is rerendered.</para>
+<para>This is useful in case the underlying source data for the tiles changes (e.g. OSM data is continually evovling).
+ &appname; normally has no way of knowing when the data has changed, so this simple timeout method is provided to maintain consistency of the tile images.</para>
+</section>
+<section><title>CartoCSS</title>
+<para>This allows setting the specific location of the <emphasis>carto</emphasis> executable.</para>
+</section>
+</section>
+
 <section id="prefs_routing" xreflabel="Routing Preferences"><title>Routing</title>
 <section><title>Routing engine</title>
 <para>You can select the routing engine used by default, ie by features that do not propose a live selection, like <xref linkend="route_finder"/>.</para>
@@ -3280,6 +3310,9 @@ Accept: */*
          <listitem>
            <para>maps_scale_smaller_zoom_first=true</para>
          </listitem>
+         <listitem>
+           <para>mapnik_buffer_size=128 (in pixels)</para>
+         </listitem>
          <listitem>
            <para>background_max_threads=10</para>
          </listitem>
index eee6b04a0798dce81cc7433b4acb3610e0d1103f..fc27781e51543cd757422883e6f90a0fa19eab8c 100644 (file)
@@ -16,6 +16,7 @@ DOC_ENTITIES = legal.xml \
     attribution.xml \
     commandline.xml \
     georef_layer.xml \
+    mapnik_rendering_layer.xml \
     recommends.xml
 DOC_INCLUDES =
 DOC_FIGURES = \
index 4feb9018b0286e45c292e751528b7bab999c40fb..46581a42405479fc8c4d6d06f4032b2dfa9b047f 100644 (file)
@@ -132,9 +132,9 @@ and docbook-xsl in your Build-Depends control field.
       Viking is a program to manage GPS data.
     </para>
     <para>  
-      You can import and plot tracks, routes and waypoints, show OpenStreetMap (OSM) maps and/or
-      Terraserver maps under it, add coordinate lines, make new tracks, routes and waypoints, hide different things, etc.
-      It is written in C with the GTK+ 2 toolkit, available for Linux, other POSIX operating systems and Windows.
+      You can import and plot tracks, routes and waypoints, show OpenStreetMap (OSM) and/or other maps, generate maps (using Mapnik),
+       geotag images, add coordinate lines, make new tracks, routes and waypoints, hide different things, etc.
+      It is written mainly in C with some C++ and uses the GTK+ 2 toolkit. It is available for Linux, other POSIX operating systems and Windows.
     </para>
     <para>  
       Homepage: <ulink type="http" url="http://viking.sf.net">http://viking.sf.net</ulink>
@@ -597,7 +597,7 @@ and docbook-xsl in your Build-Depends control field.
       <varlistentry>
         <term><filename>~/.viking-maps/</filename></term>
         <listitem>
-          <para>Map cache of tiles downloaded by &dhpackage;.</para>
+          <para>Default location of the map cache of tiles downloaded or created by &dhpackage;.</para>
         </listitem>
       </varlistentry>
     </variablelist>
index 40187e3e9dd3e1c7b33ecb833c323574ca86882a..cb0100df087ac868411176110c1253542f8d8012 100644 (file)
@@ -31,8 +31,8 @@ BuildRequires:  libmapnik-devel
 %description
 Viking is a free/open source program to manage GPS data.
 You can import, plot and create tracks, routes and waypoints, show OSM and other maps, see real-time GPS position, control items, etc.
-Other advanced capabilities include Geotagging Images, Upload and Download tracks from OSM, Routing from OSRM or Google, Name Searches from OSM Nominatim or Google and more.
-It is written in C with the GTK+2 toolkit.
+Other advanced capabilities include Geotagging Images, generate Maps (using Mapnik), Upload and Download tracks from OSM, Routing from OSRM or Google, Name Searches from OSM Nominatim or Google and more.
+It is written in mainly in C with some C++ and uses the GTK+2 toolkit.
 
 %prep
 %setup -q