Maps/Exporting PDF from OSM
1 Printing PDFs: An example
For printing the Atlas of the Colleges of Education Ghana, once the colleges were mapped and validated, we used the OpenStreetMap site to produce individual PDFs, with scales 1:4,000 and 1:2,000 for most colleges (when printed on a4 paper). For some colleges a map at 1:8000 was added, to show the full college are on one A4 sheet of paper.
Importantly, The output map scale depends on the viewport (set to 1685 x 1190 for our maps, with z=17, and at input scale 1,2000), the input scale and the zoom factors (z=18 or 17, and 16 for the largest scale maps).
The output scale is calculated as follows
- Image pixels are converted to cm: images are at 72dpi, or ~28 dots per cm.
- input scale, e.g. 1:2000, gives real-world extent. (This turns out to be incorrect - see discussion on mailing list. In the meantime we're calculating the atlas scale from the lat/lon extent. More updates soon. Bjoern (talk) 15:56, 1 January 2018 (UTC))
- Image is scaled to fit a4, so output scale is ratio (real world extent)/(extent of a4)
For example, 1190 / 28 * 2,000 / 21 = 4,000
The input map scale affects label size (set to 1:1000, 1:2000 and 1:2850 in our cases). With these two settings, map pages were exported to PDF individually, and then collated.
On each page, underneath the college name, coordinates are provided in the format
zoom/lat/lon, e.g. 17/6.66639/-0.73969
which can be used to locate the area on OpenStreetMap, e.g. http://www.openstreetmap.org/#map=17/6.66639/-0.73969
Underneath the coordinates, the scale is provided (when printed on A4), as well as the area covered by a full A4 sheet (1:2,000 → 542m x 420m; 1:4,000 → 1,084m x 840m; 1:8,000 → 2,168m x 1,680m). In other words, the actual distance left-to-right on an A4 landscape page (271mm) is roughly 0.5 km, 1 km and 2km.
Each page is built from with scalable vector data. This enables large scale printing for individual pages for college use. For large scale printing (e.g. on A3 or A2, the scale is reduced accordingly).
2 Other options.
There are various options for printing, for instance including Field Papers (as above, which is particularly useful annotation), MyOSMatic (which offers a scale bar as well), as well as InkAtlas, which we have compared below.
2.1 Overview table
|Site/URL,||API,||Road width adjust,||Scale bar,||Scale setting,||PDF output,||PDF is vector,||Multi-page,||Large area||Free|
3 Inkatlas API
InkAtlas has the advantage that the scale can be specified exactly (like the OSM site) and (at the time of writing) it is the only site that offers an API (as part of the paid subscription). The Inkatlas team generously gave us free access to Inkatlas and the API, enabling us to produce atlas pages using Inkatlas. Inkatlas produces PDF, but with raster data, for printing at 300dpi on the specified size.(e.g. A4).
For details, see Maps/Inkatlas API.
- Brief instructions, similar to the above, are also in the Atlas of the Colleges of Education Ghana.