[osmosis-dev] Single node ways
Paul Norman
penorman at mac.com
Fri Nov 9 05:57:22 GMT 2012
You should be able to create a linestring where the first and last point are the same. This would be better than a phantom node.
From: Brett Henderson [mailto:brett at bretth.com]
Sent: Thursday, November 08, 2012 8:58 PM
To: Toby Murray
Cc: osmosis-dev at openstreetmap.org
Subject: Re: [osmosis-dev] Single node ways
Hi Toby,
On 5 November 2012 16:25, Toby Murray <toby.murray at gmail.com> wrote:
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
Dropping the single node ways is messy. A phantom node in the generated linestring might be a better workaround. If nobody has any better ideas I'm open to it being changed. Are you able to create a patch?
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20121108/78f46491/attachment.html>
More information about the osmosis-dev
mailing list