I want to get image from "http://www.openstreetmap.org/export/finish" or "http://api06.dev.openstreetmap.org/export/finish" with Python. I tried this command.
but r is Response [400] and r.content is this
Why I can't get image? How should I do? |
The export facility on the web site is not meant to be used programmatically. (See https://operations.osmfoundation.org/policies/tiles/ which says "Calls to /cgi-bin/export may only be triggered by direct end-user action." - even though you're not calling /cgi-bin/export this is the same thing.) So even if the problem you are seeing could be fixed, you'd be using the interface in disregard of the policy. Generally the best and most reliable way to generate static map images is to run your own rendering server - that way you can make as many requests as you like and you're not killing anyone else's server with it. If you absolutely must use a hosted service, have a look at http://wiki.openstreetmap.org/wiki/Static_map_images but be aware that the services listed there are not suitable for massive use either. answered 04 Jan '17, 09:53 Frederik Ramm ♦ Oh, I see. Thank you.
(10 Jan '17, 13:19)
taki_
Well, the same error occurs from the web gui when trying to export a page, to any format.
(29 Mar '17, 22:38)
quazgar
|