[OSM-dev] return multiple objects - api function?

Tom Hughes tom at compton.nu
Fri Jul 20 12:34:38 BST 2007


In message <46A0998B.5080100 at eigenheimstrasse.de>
        Immanuel Scholz <imi at eigenheimstrasse.de> wrote:

> I like to have an API-function which returns more than one specific object.
>
> As example I want to provide a function in JOSM to recheck some specific
> (currently selected) objects rather than a bounding box.
>
> Another example for this would be the history function in JOSM (not
> implemented yet), I need to download several object's history at once (I
> plan to get history for the users selection).
>
> I could start to repeatedly hit the server with single statements, as I
> did with the "incomplete download" thingie, but I guess that would be
> worse in speed and traffic that one function to call with a list of id's?

There already calls to get groups of nodes/segments/ways (but not
history IIRC), so you should only ever need a maximum of three calls
to the API I think.

> I would do the changes to the ruby code, no problem there.. Should I do
> it as an RoR-Controller or hack the stuff into the existing code? What
> do you say?

Existing - in the API controller if it covers multiple object types,
otherwise in the controller for the object type in question.

I'd like to understand better exactly what you envisage though...

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the dev mailing list