[Talk-us] Where is this way in the DB ?

Toby Murray toby.murray at gmail.com
Fri Dec 28 20:11:02 GMT 2012


Are you running a snapshot schema, imported with osmosis? If so then
you just discovered the same thing I did a couple of months ago.
Osmosis silently drops ways with less than 2 nodes during import.
(yes, ways with zero nodes exist too) This is because they create an
invalid linestring which can cause problems with geographic queries.

There is one plot twist. While consuming replication diffs, osmosis
does *not* drop these ways. So you probably do have zero and single
node ways in your database, but only ones created after you started
applying minutely/hourly/daily diffs.

I have written a patch for osmosis that makes this behavior explicit
and optional with a --kepInvalidWays=yes/no option. It also allows the
same option to be applied to diff consumption so that the two are
consistent. It has yet to be merged as there was some discussion about
it on the osmosis-dev mailing list. It is on my github fork though:
https://github.com/ToeBee/osmosis

Unfortunately P2 has a bug that creates these ways rather often. OSM
inspector has a layer that displays them:
http://tools.geofabrik.de/osmi/?view=geometry&overlays=single_node_in_way

IMO the editing API really should reject ways with zero or one node in
them as invalid. But there is no way that change will happen until P2
is fixed...

Toby


On Fri, Dec 28, 2012 at 1:47 PM, the Old Topo Depot
<oldtopos at novacell.com> wrote:
> This way
>
> http://www.openstreetmap.org/browse/way/13694101
>
> is not in ways nor way_nodes tables in a PostGIS replica I have of the OSM
> planet, yet it appears in the master DB copy.
>
> I admit that I cannot understand how this might be, and I'm wondering if
> anyone has more insight into this situation.  Where's the data ?
>
> Thanks,
>
> --
> John Novak
> 585-OLD-TOPOS (585-653-8676)
> http://www.linkedin.com/in/johnanovak/
> OSM ID:oldtopos
> OSM Heat Map: http://yosmhm.neis-one.org/?oldtopos
> OSM Edit Stats:http://hdyc.neis-one.org/?oldtopos
>
> _______________________________________________
> Talk-us mailing list
> Talk-us at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk-us
>



More information about the Talk-us mailing list