[osmosis-dev] Single node ways
Toby Murray
toby.murray at gmail.com
Mon Nov 5 05:25:50 GMT 2012
It seems osmosis intentionally drops ways with only one node in them
when importing[1]. From another thread[2] on this mailing list, I
understand this is because postgis does not handle such things very
well. However, when consuming diffs, single node ways do make it into
the database. In some situations this seems to cause errors when
querying the data, but not every time.
So first of all, there is an inconsistency between how the load
process and the diff process handles these ways. But is there any
other way to handle this besides dropping them completely? There are a
couple of uses of the pgnsapshot schema that assume that it is a
lossless way of storing OSM data and as far as I know, it is - except
for this one exception. While single node ways are definitely a bug,
they happen with unfortunate regularity, mostly due to bugs in editing
software. Would it be acceptable to add in a phantom node 3cm away
from the first oneor something, just while building the geometry? I
think that happens in SQL while applying diffs which would make it
more difficult since you don't actually want to insert nodes that
don't exist... Thoughts?
[1] https://github.com/ToeBee/osmosis/blob/master/pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/CopyFilesetBuilder.java#L186
[2] http://gis.19327.n5.nabble.com/osmosis-dev-one-node-ways-td5338301.html
Toby
More information about the osmosis-dev
mailing list