<html><head></head><body>Have a look at the print function at <a href="http://Opensnowmap.org">Opensnowmap.org</a>, it's just a bit of Javascript and Leaflet or Openlayers to achieve a pdf printing from a browser. <br>
Yves <br><br><div class="gmail_quote">Le 22 décembre 2017 10:06:00 GMT+01:00, Bjoern Hassler <bjohas+mw@gmail.com> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">Dear Frederik, dear Paul,<div><br /></div><div>Thank you for your message! I suppose I made the mistake of asking for a technical fix, rather than fully explaining the problem...</div><div><br /></div><div>I have 40 small, discontinues areas in Ghana (the 40 public colleges of education), like this</div><div><a href="http://www.openstreetmap.org/way/450562441#map=16/7.4129/0.4631" target="_blank" style="font-size:12.8px">http://www.openstreetmap.<wbr />org/way/450562441#map=16/7.<wbr />4129/0.4631</a><br /></div><div>and I want to produce print. The files itself will be downloaded locally (or emailed), and then printed locally. So the file needs to be small, and print resolution (say for A2 or A3).<br /></div><div><br /></div><div>We're actively editing this at the moment (and have been over the last year), so we'd like to print from up-to-date data.</div><div><br /></div><div>Print + small files, means PDF, as its vector, and can be printed at any size. I assume PNG at 300dpi, A3, would be massive.<br /></div><div><br /></div><div>There aren't loads of areas, and manual export would be ok. However, because the areas are discontinuous, I am looking for a solution where I can work from lat/lon, rather than having to manually select areas. Once this would be ok, but we'd like to be able to repeat the export later. Most tools don't allow you to go back to maps that you've already produced, to reprint simply with data a year on.</div><div><br /></div><div><br /></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br />
<a href="https://operations.osmfoundation.org/policies/tiles/" rel="noreferrer" target="_blank">https://operations.<wbr />osmfoundation.org/policies/<wbr />tiles/</a><br />
...</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
so using a script to produce these PDFs would violate the policy except<br />
in rare circumstances where running the script is triggered by a user<br />
request.<br /></blockquote><div><br /></div><div>I'd be quite happy to click manually. At the moment, I enter the values for scale manually, resize the browser window so it gives me the right nominal dimensions (for PDF), then export. However, it would be helpful to have a preconfigured link, that gives me my settings (scale, dimensions). </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br />
* download and stitch tiles, convert to PDF; search for "OSM bigmap" for<br />
different implementations.</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* use the "staticmap" script on <a href="http://openstreetmap.de" rel="noreferrer" target="_blank">openstreetmap.de</a> like this:<br />
<a href="http://staticmap.openstreetmap.de/staticmap.php?center=40,-50&zoom=2&size=500x350" rel="noreferrer" target="_blank">http://staticmap.<wbr />openstreetmap.de/staticmap.<wbr />php?center=40,-50&zoom=2&size=<wbr />500x350</a><br />
<br />
Both will only give you standard resolution raster images. </blockquote><div><br /></div><div>As above, vector would be preferable.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You could<br />
also try<br />
<br />
* <a href="https://maposmatic.osm-baustelle.de/" rel="noreferrer" target="_blank">https://maposmatic.osm-<wbr />baustelle.de/</a> (a working fork of the<br />
discontinued MapOsMatic project, does PDFs)<br /></blockquote><div><br /></div><div>I'll see whether it's possible to generate maps of predefined areas or re-print maps (with the same boundaries). At least from the web UI, it doesn't look like it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* <a href="http://printmaps-osm.de:8080/" rel="noreferrer" target="_blank">http://printmaps-osm.de:8080/</a> (Europe only, quarterly data updates,<br />
does PDFs in theory but currently only PNG works)<br /></blockquote><div><br /></div><div>I'm outside Europe, and need up-to-date data.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
or if you're on Windows or willing to use Mono, Maperitive can also<br />
generate PDFs for any region using data from Overpass, and it's<br />
scriptable (even headless).<br /></blockquote><div><br /></div><div>OK, I'll have a look. However, it looks like it produces only SVG, which I'd then have to process. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br />
Of course, the canonical solution is "install your own<br />
postgres/mapnik/nik4.py and run it locally" ;)<br />
<br /></blockquote><div><br /></div><div>Paul, why is the recommendation to produce PNG first?</div><div> </div><div>Thanks both for you input - much appreciated!!</div><div>Bjoern</div></div><br /></div></div>
</blockquote></div></body></html>