source: subversion/applications/rendering/osm-atlas/README.html @ 34619

Last change on this file since 34619 was 20793, checked in by avantman42, 9 years ago
File size: 6.7 KB
Line 
1<html>
2<!--
3 This file is part of OSM-Atlas, a script to create an atlas from
4 OpenStreetMap (www.openstreetmap.org) data.
5-->
6<head>
7<title>OSM-Atlas</title>
8<style>
9body {
10        font-family: Arial, sans-serif;
11        font-size: 12pt;
12        color: black;
13        background-color: white;
14}
15
16h1 {
17        text-align: center;
18}
19</style>
20</head>
21<body>
22
23<h1>OSM-Atlas</h1>
24
25<p>
26OSM-Atlas is a script to create a PDF atlas from <a href = "http://www.openstreetmap.org/">OpenStreetMap</a> data. It creates a PDF file, with front &amp; back covers, overview map, detailed map pages, and index.
27</p>
28
29<p>
30It can be used to create both street atlases of a local area, and road atlases of larger areas.
31</p>
32
33<h1>Initial Setup</h1>
34
35<p>
36You will need the following installed and working:
37</p>
38
39<ul>
40<li><a href = "http://wiki.openstreetmap.org/wiki/Osmosis">Osmosis</a></li>
41<li><a href = "http://wiki.openstreetmap.org/wiki/Osmarender">Osmarender</a></li>
42<li><a href = "http://www.php.net">PHP v5</a>, set up to be run from a <a href = "http://www.php.net/features.commandline">command line</a>, with GD support included</li>
43<li><a href = "http://www.inkscape.org">Inkscape</a></li>
44<li><a href = "http://www.latex-project.org">Pdflatex</a></li>
45</ul>
46
47<p>
48Also, xsltproc and sed, which are normally included in a Linux install by default.
49</p>
50
51<h1>Configuration</h1>
52
53<p>
54When OSM-Atlas is run, a configuration file is specified. This means that you can have several configuration files set up, for different areas. There are two sample configuration files included - <tt>inc_roadatlas.php</tt> (with sensible defaults for a road atlas of a large area) and <tt>inc_streetatlas.php</tt> (with sensible defaults for a street atlas of a smaller area, eg a city).
55<p>
56
57<p>
58Copy one of the sample configuration files, and rename the file to something sensible. Then, edit the file in a text editor. The configuration items are detailed below:
59</p>
60
61<p>
62<b>$LEFT = 0</b>, <b>$RIGHT = 0</b>, <b>$TOP = 0</b>, <b>$BOTTOM = 0</b>: These four settings define the bounding box of the area that the atlas will cover.
63</p>
64
65<p>
66<b>$HORIZ_TILES</b>, <b>$VERT_TILES</b>: The number of horizontal and vertical tiles (images) that the atlas will split the map into. Each tile is on a single page.
67</p>
68
69<p>
70<b>$OV_FONT</b>, <b>$OV_FONT_SIZE</b>: The file name and size of a TTF font that can be used to add numbers to the overview map.
71</p>
72
73<p>
74<b>$OSMARENDER_DIR</b>, <b>$OSMOSIS_DIR</b>: The directories containing osmarender and osmosis.
75</p>
76
77<p>
78<b>$OUTPUT_DIR</b>: The directory where files should be placed. Temporary working files and the created PDF will be put in this directory.
79</p>
80
81<p>
82<b>$DATA_FILE</b>: The location of the .osm data file. Must be a local file. The OSM Wiki <a href = "http://wiki.openstreetmap.org/wiki/Planet">Planet page</a> has links to suitable files (note that they are compressed using bzip2, and will need to be uncompressed).
83</p>
84
85<p>
86<i>The configuration settings shown above are the only settings that have to be configured. Those detailed below can be safely left at their defaults.</i><br>
87</p>
88
89<p><hr></p>
90
91<p>
92<b>$TITLE</b>: The title used on the title page.
93</p>
94
95<p>
96<b>$INDEX_STREET_NAMES</b>, <b>$INDEX_PLACE_NAMES</b>: Set to True to include an index of street/place names, False to not include the index. In the sample files, the street atlas includes street names but not place names, while the road atlas includes place names but not street names.
97</p>
98
99<b>$INKSCAPE_DPI</b>: Each image in the atlas is a .png file, exported from Inkscape. This sets the DPI (dots per inch) setting that Inkscape uses when exporting.<br>
100
101<p>
102<b>$STYLESHEET</b>: The osmarender stylesheet to use. <tt>osm_atlas-z16.xml</tt>, included with OSM-Atlas, is a customised version of the standard z16 stylesheet, for use when making a street atlas.<br>
103<b>$STYLESHEET_THUMBS</b>: The osmarender stylesheet to use for the thumbnail images in the overview map. <tt>osm_atlas-z12.xml</tt>, included with OSM-Atlas, is a customised version of the standard z12 stylesheet, for use when making a street atlas.
104</p>
105
106<p>
107<b>$DELETE_WORKING_FILES</b>: OSM-Atlas creates many temporary files. If this is true, these files are deleted when OSM-Atlas has finished. Setting this to false will mean that these temporary files are not deleted, which may be useful for debugging, or if you wish to manually edit the LaTeX file.
108</p>
109
110<p>
111<b>$PDFTITLE</b>, <b>$PDFAUTHOR</b>, <b>$PDFSUBJECT</b>, <b>$PDFKEYWORDS</b>: PDF file metadata.
112</p>
113
114<p>
115<b>$LOG_FILE</b>: Full path to a log file. This will not be deleted when OSM-Atlas has finished. Set it to <tt>/dev/null</tt> if you don't need a log.
116</p>
117
118<p>
119<b>$DEBUG</b>: If set to True, OSM-Atlas will output extra debugging information to the log file.
120</p>
121
122<h1>Running</h1>
123
124<p>
125Once the configuration file is set up, open a terminal and cd to the directory, then run:
126<pre>
127./osm-atlas.php config.php
128</pre>
129where config.php is the name of the configuration file to use. <i>Note: OSM-Atlas cannot cope with paths or files that include spaces.</i>
130<p>
131
132<p>
133OSM-Atlas will display progress as it works. When it has finished, it will have created a PDF file, with front &amp; back covers, overview map, detailed map pages, and index (if either <tt>$INDEX_STREET_NAMES</tt> or <tt>$INDEX_PLACE_NAMES</tt> was set to True).
134</p>
135
136<h1>Licence Information</h1>
137
138<p>Copyright &copy; 2009 Russell Phillips</p>
139
140<p>
141Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
142</p>
143
144<p>
145The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
146</p>
147
148<p>
149THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
150</p>
151
152<p>
153Map data &copy; <a href = "http://www.openstreetmap.org/">OpenStreetMap</a> (and) <a href = "http://wiki.openstreetmap.org/wiki/Contributors">contributors</a>, <a href = "http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>. (<a href = "http://donate.openstreetmap.org/">Donate to OpenStreetMap</a>)<br>
154</p>
155
156</body>
157</html>
Note: See TracBrowser for help on using the repository browser.