[osmosis-dev] completeRelations flag for --bp/--bb not working
Brett Henderson
brett at bretth.com
Sun Jan 10 10:41:14 GMT 2010
On Sat, Jan 9, 2010 at 9:15 PM, Frederik Ramm <frederik at remote.org> wrote:
> Hi,
>
> consider this test case (run with 0.31.3):
>
> <osm version="0.6">
> <node id="1" version="1" timestamp="2007-10-31T23:48:54Z" uid="1"
> user="fred" changeset="1" lat="53" lon="10"/>
> <node id="2" version="1" timestamp="2008-09-28T17:44:53Z" uid="1"
> user="fred" changeset="1" lat="54" lon="10" />
> <node id="3" version="1" timestamp="2008-09-28T17:44:53Z" uid="1"
> user="fred" changeset="1" lat="55" lon="10" />
> <relation id="1" version="1" timestamp="2005-07-05T02:14:07Z"
> uid="1" user="fred" changeset="1">
> <member type="node" role="" ref="1" />
> <member type="node" role="" ref="2" />
> </relation>
> <relation id="2" version="1" timestamp="2005-07-05T02:14:07Z"
> uid="1" user="fred" changeset="1">
> <member type="node" role="" ref="3" />
> </relation>
> </osm>
>
> Cutting out from this a bbox that only contains node #1, such as
>
> osmosis --rx test.osm --bb left=1 right=90 top=53.5 bottom=52.5 --wx -
>
> one would expect to find in the output:
>
> * without extra flags: node #1, relation #1 referring to nodes #1,#2
>
> --> pass
>
> * with clipIncompleteEntities: node #1, relation #1 refering to node #1
>
> --> pass
>
> * with completeRelations: nodes #1,#2, relation #1 referring to both
>
> --> fail; instead, you get node #1 only, but relations #1 and #2.
>
> It seems that completeRelations always acts as "copy all relations from
> input to output no matter what" and has no influence on handling nodes
> and ways. Re-writing the same example to use ways, and the trying it
> with completeWays=true, yields the expected result.
>
> The Wiki documentation on completeRelations says:
>
> "Include all available relations which are members of relations which
> have at least one member in the bounding polygon."
>
> This describes neither the behaviour I had expected, nor the behaviour I
> have observed. I believe the intended behaviour is really "Include all
> available *objects* ..."- no?
>
My expectation is much the same as yours. I have no idea what's going on
there. I'll check it out when I get time. If you have the time to patch it
to give you the expected behaviour I'd appreciate it.
Thanks for the detailed example, that should make it much easier to debug
:-)
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20100110/8e249ddf/attachment.html>
More information about the osmosis-dev
mailing list