[OSM-dev] Use API to get bbox of way/relation ids?

Anthony osm at inbox.org
Sun Dec 20 21:31:52 GMT 2009

On Sun, Dec 20, 2009 at 3:43 PM, Laurence Penney <lorp at lorp.org> wrote:

> Thanks... seems a little wasteful to have to get all the individual
> nodes and tags. Is this the only way to get the bbox of a given way
> without one's own planet db?

How does http://www.openstreetmap.org/browse/relation/# do it?  Considering
how long it took to load http://www.openstreetmap.org/browse/relation/62899,
I'm guessing it downloads the entire relation and uses javascript to
calculate the bbox and draw the relation.  Pretty inefficient, but looking
at the database schema (http://wiki.openstreetmap.org/wiki/Database_schema),
that information doesn't even seem to be cached in the db, so it's something
that has to be recalculated every single time by someone - just a matter of
whether to waste bandwidth or CPU.

I'd say if this is something you're going to be doing a lot of, it's
probably best to download the whole planet (or the part of it you're working
on).  For the sake of not overloading the API as much as for making things
easier on your end.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20091220/9b8efcc8/attachment.html>

More information about the dev mailing list