Skip to content
This repository has been archived by the owner on Nov 9, 2019. It is now read-only.

Support efficient requests for multiple elements at once #4

Open
rhomeister opened this issue May 6, 2012 · 1 comment
Open

Support efficient requests for multiple elements at once #4

rhomeister opened this issue May 6, 2012 · 1 comment
Assignees

Comments

@rhomeister
Copy link

It is currently not possible to retrieve multiple elements at once. For instance, if I want to download all nodes relating to a relation, I have to load all its ways first, and then all corresponding nodes. Each element generates a HTTP get request. As a result, a relation consisting of say 10 ways with 10 nodes each requires 111 HTTP get requests.

The API, however, supports the retrieval of multiple elements at once:

"Multi fetch: GET /api/0.6/[nodes|ways|relations]?#parameters
Allows a user to fetch multiple elements at once.
Parameters
[nodes|ways|relations]=comma separated list
The parameter has to be the same in the URL (e.g. /api/0.6/nodes?nodes=123,456,789)"
(from http://wiki.openstreetmap.org/wiki/API_v0.6)

It would be really nice if your API could implement methods like "api.find_nodes([1,2,3,4,5])" to get multiple elements at once.

@freundchen
Copy link
Contributor

Hello,

sorry for not getting back to you earlier - we are developing rosemary on a as-needed-basis for our website http://www.wheelmap.org - until now we didn't have the need for batch operations ourselves. Since they are already supported by the OSM API, they should not be too hard to add, so why don't you fork and try yourself? We will be happy to accept a pull request or give feedback on it.

Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants