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

Last change on this file since 9669 was 6130, checked in by jochen, 12 years ago

Added comparison between zoom levels and the scale denominator numbers needed for the Mapnik Map file.

File size: 3.3 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
69mkshield.pl
70    Perl script to generate highway shield images. You normally don't
71    have to run this because prerendered images are already stored in
72    the 'symbols' directory.
73
74openstreetmap-mapnik-data
75openstreetmap-mapnik-world-boundaries
76    These directories contain the things needed to create Debian packages
77    for OSM Mapnik stuff.
78
79osm-template.xml
80    A template for the osm.xml file which contains the rules on how
81    Mapnik should render data.
82
83osm.xml
84    The file which contains the rules on how Mapnik should render data.
85    You should generate your own version from the osm-template.xml file.
86
87osm2pgsl.py
88    Older script to read OSM data into a PostgreSQL/PostGIS database. Use
89    the newer C version in ../../utils/export/osm2pgsql instead!
90
91set-mapnik-env
92    Used to customize the environment needed by the other Mapnik OSM
93    scripts.
94
95setup_z_order.sql
96    SQL commands to set up Z order for rendering. This is included in
97    the C version of osm2pgsql in ../../utils/export/osm2pgsql, so you
98    don't need this any more.
99
100symbols
101    Directory with icons and highway shield images.
102
103zoom-to-scale.txt
104    Comparison between zoom levels and the scale denominator numbers needed
105    for the Mapnik Map file.
106
107
108More Information
109----------------
110
111Mapnik: www.mapnik.org
112
113OSM maps with Mapnik: http://wiki.openstreetmap.org/index.php/Mapnik
114
115osm2pgsql: ../../utils/export/osm2pgsql
116
Note: See TracBrowser for help on using the repository browser.