From: Rob Norris Date: Sat, 31 Jan 2015 11:39:34 +0000 (+0000) Subject: [DOC] Document the Mapnik Rendering Layer capability. X-Git-Url: https://git.street.me.uk/andy/viking.git/commitdiff_plain/e5ee3c87f81421addce043e47e3ed4f823b87ed3?hp=b200bb91b075711cf0e58e7b8c53fe0e256ea3a4 [DOC] Document the Mapnik Rendering Layer capability. Also mention that Viking now uses some C++. --- diff --git a/README b/README index e7663095..c51a1632 100644 --- 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 index 00000000..1325df41 --- /dev/null +++ b/help/C/mapnik_rendering_layer.xml @@ -0,0 +1,105 @@ + + + ] +> +
+Mapnik Rendering Layer + + +The Mapnik Rendering Layer uses the Mapnik Library to generate map images according to the Mapnik configuration. + + + +When using the this layer it is useful to review the to ensure the settings are correct for your system. + + + +Mapnik configurations can be created via the CartoCSS Mapnik stylesheet pre-processor. +&appname; will automatically invoke the carto 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. + + + +&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 ~/.viking/planet-import-complete + and/or update its timestamp. (e.g. using the touch command). + + + +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 OSM Carto +or OSM Bright. These use OSM data and contain guides on how to setup the datasource. +Further detail about using OSM data can be found on the Switch2OSM website. + + + +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. + + + +Generated tiles are stored in the PNG format in the standard OSM Tile name layout. + + + + +Currently due to code build and dependency complexities, Mapnik Rendering is not available in the Windows version of &appname; + + + +
Layer Properties + +Configurable properties: + +Carto project file + When specified, this is used to generate the mapnik configuration file. + +Mapnik configuration file + Specify the Mapnik configuration file or leave it blank when using a Carto project file. + +Alpha + 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. + +Use File Cache + The default is to use a file cache. + +Tile cache directory + The top level directory of where the generated tiles are stored. + +
+ +
Layer Operations +These extra options are available when right clicking on the Mapnik Rendering Layer in the Layers Panel. +Refresh +Reload the Mapnik configuration. + +Run Carto Command +Force running the carto command and reload the generated Mapnik configuration. + +About +Show some information about the Mapnik version in use. + +
+ +
Viewport Tools + +When a Mapnik Rendering Layer is selected in the Layers Panel, the Mapnik Features 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. + + + + Rerender Tile. + + + Tile Info + + +
+ +
diff --git a/help/C/viking.xml b/help/C/viking.xml index f30713eb..2fab04f9 100644 --- a/help/C/viking.xml +++ b/help/C/viking.xml @@ -704,6 +704,7 @@ Layers supported by &appname; are: + For each layer there are a few standard options: @@ -1831,6 +1832,8 @@ Tracks are searched first in preference over waypoints. + +
Coordinate Layer This layer is allows drawing of grid lines on the viewport. @@ -2292,6 +2295,33 @@ Your OSM password will be stored in plain text.
+
Mapnik + +If any changes to these settings are made, you will need to restart &appname; to make them be applied. + + +
Plugins Directory +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. +
+
Fonts Directory + +The location of fonts for use with Mapnik. Normally it is best to simply use the System's font directory. + +
+
Recurse Fonts Directory +Load fonts in any sub-directories of the main font directory. +
+
Rerender Timeout +The time in hours before any tile is rerendered. +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. +
+
CartoCSS +This allows setting the specific location of the carto executable. +
+
+
Routing
Routing engine You can select the routing engine used by default, ie by features that do not propose a live selection, like . @@ -3280,6 +3310,9 @@ Accept: */* maps_scale_smaller_zoom_first=true + + mapnik_buffer_size=128 (in pixels) + background_max_threads=10 diff --git a/help/Makefile.am b/help/Makefile.am index eee6b04a..fc27781e 100644 --- a/help/Makefile.am +++ b/help/Makefile.am @@ -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 = \ diff --git a/help/viking.xml b/help/viking.xml index 4feb9018..46581a42 100644 --- a/help/viking.xml +++ b/help/viking.xml @@ -132,9 +132,9 @@ and docbook-xsl in your Build-Depends control field. Viking is a program to manage GPS data. - 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. Homepage: http://viking.sf.net @@ -597,7 +597,7 @@ and docbook-xsl in your Build-Depends control field. ~/.viking-maps/ - Map cache of tiles downloaded by &dhpackage;. + Default location of the map cache of tiles downloaded or created by &dhpackage;. diff --git a/viking.spec.in b/viking.spec.in index 40187e3e..cb0100df 100644 --- a/viking.spec.in +++ b/viking.spec.in @@ -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