[osmosis-dev] Single node ways

Brett Henderson brett at bretth.com
Fri Nov 9 04:58:15 GMT 2012


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/20121109/79a5c9f4/attachment.html>


More information about the osmosis-dev mailing list