<br><br><div class="gmail_quote">2009/7/16 Matt Amos <span dir="ltr"><<a href="mailto:zerebubuth@gmail.com">zerebubuth@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Thu, Jul 16, 2009 at 10:41 AM, Chris Browet<<a href="mailto:cbro@semperpax.com">cbro@semperpax.com</a>> wrote:<br>
> 2009/7/16 Frederik Ramm <<a href="mailto:frederik@remote.org">frederik@remote.org</a>><br>
</div><div><div></div><div class="h5">>> Chris Browet wrote:<br>
>>><br>
>>> I'd be curious to know how the api calculates the bounding box of such a<br>
>>> relation<br>
>><br>
>><br>
>> <a href="http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6#Bounding_box_computation" target="_blank">http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6#Bounding_box_computation</a><br>
>><br>
>>> assuming the api definition is "the smallest bbox containg all<br>
>>> children bbox'es".<br>
>><br>
>> It isn't.<br>
>><br>
><br>
> Ok. If I understand well, it adds to a relation bbox all the nodes and ways<br>
> of children relations (+ the "pure" ways and nodes, of course).<br>
><br>
> That won't remove the problem of infinite recursion: R1 -> R2 -> R1; it will<br>
> add to R1 all ways/nodes of R2, which itself will add all ways/nodes of R1,<br>
> which will...<br>
><br>
> Bottomline question is: How does the api handle the case?<br>
<br>
</div></div>short answer: it doesn't.<br>
<br>
long answer: the position taken by the API for both map calls and<br>
changeset bboxes is that relations don't have physical extent - only<br>
their node and way members do. bboxes are calculated only from the<br>
immediate members of the relation, so recursion is necessary.<br>
<br></blockquote><div><br>Err... I'm feeling thick, today...<br><br>You are saying that the api IS recursing thru the children relations and that the api also has an infinite loop problem, right?<br>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).<br>
<br>Sorry for bothering about this, I'd just like to be sure on how to best handle the case...<br><br>- Chris -<br></div></div>