-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not use OpenStreetMap export endpoint #117
Comments
Thanks, Paul. Can you make updates and submit a PR making appropriate changes, please? |
No, I don't know R. |
@dkahle it is your responsibility to make releases which abide by OpenStreetMap's T&Cs. Asking someone who devotes a considerable amount of time to OSM (@pnorman is a board member of the Foundation, has been lead of the main website Carto-CSS, sits on the Data Working Group, and develops osm2pgsql inter alia) to do this instead just ain't fair. I came to this issue as we have had a query on the OSM Help site https://help.openstreetmap.org/questions/53975/get-osm-map-in-r about the issue. Static map or tile stitching queries cause a considerable load on donation supported and volunteer maintained OSM servers, and while not completely banned are strongly discouraged. I do realise that it is considerably harder to implement something similar with OSM data as there is no obvious 1:1 substitute for a simple static map call. MapBox do offer something similar, but as was the case with Cloudmade and MapQuest you need an API key. So in the short term that is probably the simplest thing to recommend. |
@SK53 thanks for the comments. I'm not opposed to resolving the issue, but I do have a few thoughts:
As you can tell from the commit log, I work on this project very rarely. As possible, it would be very helpful to have a clear and convincing recommendation as to what to do. |
I think that section of the usage policy is actually weaker than I at least intended. That endpoint was added purely to support the "export" function on www.openstreetmap.org and was never intended to be used by anybody else. In fact as of last week there are now technical measures in place to try and ensure that, which is likely the reason for that help.openstreetmap.org question. I can't recall the details now but I believe this ticket was originally opened because we had encountered a problem that appeared to be down to a user of this function. In any case unless the function provided here allows the user agent and/or referer to be specified then there is no way for anybody using it to meet the other requirements of the usage policy - the purpose of that requirement is to allow us to know who to contact if overuse is causing a problem and if we can only trace the request back to your library then this is where we're going to wind up coming rather than to the actual end user. |
@dkahle I agree that the number of R users making use of this must be very small otherwise we would have seen issues before. It's quite likely that the export call works for very small areas, but even for an end user the chance of success for most requests has been minimal since 2010ish. This is why other map sources are more suitable for this usage, OpenStreetMap tiles are not provided primarily for application usage. The idea that this is helping users format a URL is I think nitpicking, it can be used programmatically. The relevant T&Cs are (note line on the cgi/export call). As @pnorman noted no user agent is passed with the call, and this is mandatory. |
Yes. I'm not sure if it was solved by blocking the IP, blocking this library, blocking any downloads with the default R User-Agent, or it went away on its own. If it happens again, any of those blocks could happen.
I would recommend
I can understand that 3 might be too much work to happen. |
@pnorman, I tried to use the function today, but recieved a 400 error, so unless the University of Toronto ip range is blocked, I imagine the package itself is blocked.
|
No, as I said, the That does not apply to tile downloads however, though we still expect the usage policy to be complied with for those. |
Are there any viable work arounds? |
Would including a dockerised OSM tile server fix this? |
Would it be possible to allow an alternate IP source to be specified as a parameter in the function call? I could see setting up a private tile server to cache the general areas I want my internal users to be able to map, and this would limit the load on the OSM public servers. |
The export call is restricted to use from osm.org only now, so this issue is now moot. Tile usage is governed by the tile usage policy |
The OpenStreetMap tile usage policy states
Stitching images together like BigMap 2 or StaticMap do is a better option to avoid heavy load, but any usage of tile.openstreetmap.org still needs to follow the usage policy. I couldn't find a User-agent in the source, but all the technical usage requirements need to be met.
cc @tomhughes
The text was updated successfully, but these errors were encountered: