Re: [OSM-dev] Automatically triggering export as PDF from openstreetmap.org -> share?

2017-12-21 Thread Frederik Ramm
Bjoern,

On 12/21/2017 09:40 PM, Bjoern Hassler wrote:
> The idea would be to produce a PDF in the same way as manually going to
> export, selecting format PDF, scale 1:2500 and dimensions 800x1000?

The current usage policies in

https://operations.osmfoundation.org/policies/tiles/

say that

"Calls to /cgi-bin/export may only be triggered by direct end-user
action. (For example: “click here to export”.) The export call is an
expensive (CPU+RAM) function to run and will frequently reject when
server is under high load."

so using a script to produce these PDFs would violate the policy except
in rare circumstances where running the script is triggered by a user
request.

What you could do instead:

* download and stitch tiles, convert to PDF; search for "OSM bigmap" for
different implementations.

* use the "staticmap" script on openstreetmap.de like this:
http://staticmap.openstreetmap.de/staticmap.php?center=40,-50=2=500x350

Both will only give you standard resolution raster images. You could
also try

* https://maposmatic.osm-baustelle.de/ (a working fork of the
discontinued MapOsMatic project, does PDFs)

or the somewhat idiosyncratic but powerful

* http://printmaps-osm.de:8080/ (Europe only, quarterly data updates,
does PDFs in theory but currently only PNG works)

or if you're on Windows or willing to use Mono, Maperitive can also
generate PDFs for any region using data from Overpass, and it's
scriptable (even headless).

Of course, the canonical solution is "install your own
postgres/mapnik/nik4.py and run it locally" ;)

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Automatically triggering export as PDF from openstreetmap.org -> share?

2017-12-21 Thread Bjoern Hassler
Dear friends,

Suppose I have a standard OSM URL, e.g. as follows:
URL1 = http://www.openstreetmap.org/way/450562441#map=16/7.4129/0.4631

Is it possible to automatically produce a PDF, say via URL something like
this:

URL2 = URL1?format=PDF=800x1000=2500

The idea would be to produce a PDF in the same way as manually going to
export, selecting format PDF, scale 1:2500 and dimensions 800x1000?

I suppose there would be some kind of POST request that could be done, that
simulates the form input? Would be great to have a script I could use,
rather than trying to figure it out. I would be most grateful for any
suggestions!!

Many thanks,
Bjoern
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev