[osmosis-dev] lost relations while clipping
brett at bretth.com
Sat Oct 16 23:34:29 BST 2010
2010/10/12 Maxim Dubinin <sim at gis-lab.info>
> Hi osmosis-devs,
> On our regional extraction system we've ran into what seems to be a
> Relations, that are members by themselves are dropped while extracting.
> Example of such relation:
> Code and example to reproduce this behavior is attached.
Thanks for the detailed example, it makes it much easier to diagnose your
The reason for the dropped relation is a limitation of how Osmosis performs
bounding-box/bounding-polygon processing. Osmosis processes all data in a
stream. First it processes all nodes one by one and keeps track of which
nodes are in the bounding box. It then processes each way one by one and
uses the node list to determine which ways are in the bounding box. Then it
processes the relations one by one and uses the list of nodes, ways, and
already selected relations to determine if a relation is in the bounding
In your example, relation 795 is processed first and contains relation 792.
But 792 hasn't been processed (in your example, the two ids are out of
order) yet so Osmosis doesn't know that it will be inside the bounding box
and ignores it. It then processes 792 which has two ways inside the
bounding box so it includes that relation. But it never goes back to
include relation 795 because it has forgotten about it. In your example, if
you switched the order of relation 792 and 795 then 795 *would* get
The only way to avoid this limitation is to replace your existing --bp step:
--bp file=test.poly completeWays=yes completeRelations=yes
This makes Osmosis run *much* slower and might not be acceptable. With
those options enabled, it builds temporary stores of nodes, ways and
relations so that it can go back and randomly access data. But the
temporary data stores are quite slow which has a very large impact on
Hope that helps.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osmosis-dev