[OSM-dev] API 0.6: Changeset Access

Frederik Ramm frederik at remote.org
Thu Jan 29 10:08:28 GMT 2009


Hi,

80n wrote:
> Can someone remind me again please.  What's the purpose of calculating and
> storing the bbox for each changeset?

So that it is possible to query the database effectively for something 
like "all changesets possibly affecting London". Without changeset 
bboxes this would mean retrieving all nodes in the London bbox, then 
retrieving all ways that use these nodes, then retrieving all relations 
that use these nodes or ways, then retrieve all changesets that affect 
any of these ways, nodes, or relations, and then return them. This would 
be a very expensive operation - and we expect *many* people to make 
these queries in regular intervals as they're keeping a "watch" on their 
area!

Of course the expensive method sketched above has the advantage of only 
returning changesets that really affect the area in question, whereas 
the bbox method we're using might also return a changeset that has one 
edit in Southampton and one in Cambridge... but even if we want the 
precision of the expensive method, the bbox method can be used as a kind 
of index.

Bye
Frederik




More information about the dev mailing list