source: subversion/applications/rendering/mapnik/README @ 17224

Last change on this file since 17224 was 13138, checked in by crschmidt, 11 years ago

Add a simple legend generating tool.

File size: 3.4 KB
Line 
1
2Rendering OpenStreetMap-Maps with Mapnik
3----------------------------------------
4
5In this directory you'll find most of the things you need to render OSM
6data into nice maps using the Mapnik renderer.
7
8Note that this is not the code used to generate the "official" OSM tiles
9on tile.openstreetmap.org, see
10svn.openstreetmap.org/sites/tile.openstreetmap.org for that.
11
12
13Customzing Files
14----------------
15
16If you want to use Mapnik to render OSM data you'll have to do the following:
17
181. Install or compile Mapnik and osm2pgsl, set up PostGIS and download the
19   world_boundaries file as described on
20   http://wiki.openstreetmap.org/index.php/Mapnik
21
222. Edit 'set-mapnik-env'. Change all the MAPNIK_* environment variable
23   definitions to fit your file locations and database parameters.
24
253. Create a local copy of the Mapnik Map file:
26   source ./set-mapnik-env
27   ./customize-mapnik-map >$MAPNIK_MAP_FILE
28
29You can now call
30
31  ./generate_tiles.py
32
33or
34
35  ./generate_image.py
36
37to generate maps.
38
39
40Files and Directories
41---------------------
42
43all_tiles
44    ??
45
46convert
47    OBSOLETE. Use customize-mapnik-map instead.
48
49customize-mapnik-map
50    Run this script to convert osm-template.xml into osm.xml with your
51    settings.
52
53generate_image.py
54    A script to generate a map image from OSM data using Mapnik. Will
55    read mapping instructions from $MAPNIK_MAP_FILE (or 'osm.xml') and
56    write the finished map to 'image.png'. You have to change the script
57    to change the bounding box or image size.
58
59generate_tiles.py
60    A script to generate map tiles from OSM data using Mapnik. Will
61    read mapping instructions from $MAPNIK_MAP_FILE (or 'osm.xml') and
62    write the finished maps to the $MAPNIK_TILE_DIR directory. You have
63    to change the script to change the bounding boxes or zoom levels
64    for which tiles are created.
65
66install.txt
67    An almost cut-and-paste documentation on how to use all this.
68
69legend.py
70    Script for generating a simple legend from osm-template.xml, useful
71    for visualizing existing styles and changes.
72
73mkshield.pl
74    Perl script to generate highway shield images. You normally don't
75    have to run this because prerendered images are already stored in
76    the 'symbols' directory.
77
78openstreetmap-mapnik-data
79openstreetmap-mapnik-world-boundaries
80    These directories contain the things needed to create Debian packages
81    for OSM Mapnik stuff.
82
83osm-template.xml
84    A template for the osm.xml file which contains the rules on how
85    Mapnik should render data.
86
87osm.xml
88    The file which contains the rules on how Mapnik should render data.
89    You should generate your own version from the osm-template.xml file.
90
91osm2pgsl.py
92    Older script to read OSM data into a PostgreSQL/PostGIS database. Use
93    the newer C version in ../../utils/export/osm2pgsql instead!
94
95set-mapnik-env
96    Used to customize the environment needed by the other Mapnik OSM
97    scripts.
98
99setup_z_order.sql
100    SQL commands to set up Z order for rendering. This is included in
101    the C version of osm2pgsql in ../../utils/export/osm2pgsql, so you
102    don't need this any more.
103
104symbols
105    Directory with icons and highway shield images.
106
107zoom-to-scale.txt
108    Comparison between zoom levels and the scale denominator numbers needed
109    for the Mapnik Map file.
110
111
112More Information
113----------------
114
115Mapnik: www.mapnik.org
116
117OSM maps with Mapnik: http://wiki.openstreetmap.org/index.php/Mapnik
118
119osm2pgsql: ../../utils/export/osm2pgsql
120
Note: See TracBrowser for help on using the repository browser.