[OSM-dev] Relations without members?
brett at bretth.com
Thu Oct 11 13:51:42 BST 2007
My apologies, I've been meaning to post this to the list for a couple of
days. Osmosis filtering tasks are currently broken. I will take a look
at these as soon as I can.
I am curious how filtering should work with the new data model though,
ideally I should use the same mechanism as the perl scripts. Note that
osmosis uses most of the same code for polygon filtering and bounding
box filtering, the only difference is the logic deciding whether a node
lies within an area.
I make the assumption that the data is ordered by type then id (eg.
nodes, then ways, then relations).
For nodes the decision is straightforward. If the node is inside the
area it is selected, otherwise discarded. The selected node ids are
added to a bitset.
Ways are selected if one or more of its nodes are in the bitset. The
way is modified to only include nodes that are inside the area. The
selected way ids are added to a bitset.
Relations are trickier, obviously they are selected if one or more of
its members are already in the node bitset or way bitset. And I can
modify the relations to only include nodes and ways that are inside the
However, what do I do if a relation has another relation as a member?
How does the perl script handle relations containing relations?
Frederik Ramm wrote:
>> Further tests have revealed that the issue occurs in Osmosis when
>> the bounding-box task is used. I’ve just tested that in the latest
>> version of Osmosis (0.18).
> You might want to give the applications/utils/osm-extract/polygons/
> extract_polygon_0.5.pl script a try.
More information about the dev