[OSM-dev] [OSM-talk] Circular relation by user mapper_07
andrzej zaborowski
balrogg at gmail.com
Thu Jul 16 20:19:33 BST 2009
2009/7/16 Chris Browet <cbro at semperpax.com>:
> 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...
The spec says
* adding a relation member or changing tag values causes all node and
way members to be added to the bounding box.
..but when you reach R1 you know every way or node member of this
relation has already been added to the bbox or will be added when we
return from adding R2 so it's safe to just return doing nothing. I
don't know whether the API implements this.
Cheers
More information about the dev
mailing list