[OSM-dev] [OSM-talk] Circular relation by user mapper_07
Chris Browet
cbro at semperpax.com
Thu Jul 16 11:46:11 BST 2009
2009/7/16 Matt Amos <zerebubuth at gmail.com>
> On Thu, Jul 16, 2009 at 10:41 AM, Chris Browet<cbro at semperpax.com> wrote:
> > 2009/7/16 Frederik Ramm <frederik at remote.org>
> >> Chris Browet wrote:
> >>>
> >>> I'd be curious to know how the api calculates the bounding box of such
> a
> >>> relation
> >>
> >>
> >>
> http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6#Bounding_box_computation
> >>
> >>> assuming the api definition is "the smallest bbox containg all
> >>> children bbox'es".
> >>
> >> It isn't.
> >>
> >
> > Ok. If I understand well, it adds to a relation bbox all the nodes and
> ways
> > of children relations (+ the "pure" ways and nodes, of course).
> >
> > That won't remove the problem of infinite recursion: R1 -> R2 -> R1; it
> will
> > add to R1 all ways/nodes of R2, which itself will add all ways/nodes of
> R1,
> > which will...
> >
> > Bottomline question is: How does the api handle the case?
>
> short answer: it doesn't.
>
> long answer: the position taken by the API for both map calls and
> changeset bboxes is that relations don't have physical extent - only
> their node and way members do. bboxes are calculated only from the
> immediate members of the relation, so recursion is necessary.
>
>
Err... I'm feeling thick, today...
You are saying that the api IS recursing thru the children relations and
that the api also has an infinite loop problem, right?
OTOH, you saying "only from the immediate members", would mean it DOESN'T
recurse thru the relations?? (But it cannot be that or what would happen
with relations only comprising relations).
Sorry for bothering about this, I'd just like to be sure on how to best
handle the case...
- Chris -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090716/b057c1b0/attachment.html>
More information about the dev
mailing list