[OSM-dev] Automatically triggering export as PDF from openstreetmap.org -> share?
Hartmut Holzgraefe
hartmut.holzgraefe at gmail.com
Sat Dec 23 09:05:47 UTC 2017
Hello Bjoern,
On 22.12.2017 10:06, Bjoern Hassler wrote:
> Dear Frederik, dear Paul,
>
> Thank you for your message! I suppose I made the mistake of asking for a
> technical fix, rather than fully explaining the problem...
>
> I have 40 small, discontinues areas in Ghana (the 40 public colleges of
> education), like this
> http://www.openstreetmap.org/way/450562441#map=16/7.4129/0.4631
> <http://www.openstreetmap.org/way/450562441#map=16/7.4129/0.4631>
> 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).
See
https://maposmatic.osm-baustelle.de/maps/10931
for a A2 example of Jasikan
> 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.
>
> Print + small files, means PDF, as its vector, and can be printed at any
> size. I assume PNG at 300dpi, A3, would be massive.
At DIN A2 SVG has ~100KB, PDF ~200KB, 300dpi PNG 1.3MB (~650K when using
reduced color space)
> 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.
You can manually enter lat/lon ranges in the selection form, but it is
not very convenient yet.
Selecting by city name is also possible, but only if border polygons
exist.
But at least search works just fine and can give you correct position
at least.
> 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.
You can re-render the map at any time using the "recreate" icon in
the result page. Unfortunately that's a POST request for now, so
not easy to automate
> You could
> also try
>
> * https://maposmatic.osm-baustelle.de/
> <https://maposmatic.osm-baustelle.de/> (a working fork of the
> discontinued MapOsMatic project, does PDFs)
>
>
> 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.
So an API for generating maps from given parameters automatically is
missing, but at least the "re-print with same settings" functionality
is actually there (just not that easy to spot, the "recreate" button
should have a clear label instead of just the icon.
Good news is that I plan to work on this on 34c3 (chaos communication
congress) between christmas and new year, and better automation is high
on the todo list ...
--
hartmut
More information about the dev
mailing list