Hi!

A couple of days ago I opened a ticket for the subject:
http://trac.openstreetmap.org/ticket/3650

The problem is the following:
When a one node way is present in the database and osmosis creates a linestring geometry for it the resulting geometry is something like LINESTRING(139.386972 37.095865)

When we process this linestring with any postgis function it gives us an error - the linestring must contain 0 or > 1 nodes.

When linestring objects are created with internal osmosis functions the number of nodes is checked to be >= 2, but the sql-command does not contain such a check.


I suggested a solution which looked very easy and helpful, but when I compiled osmosis with the proposed changed I found out that the problem is solved only partially - the creation of new linestring we one node is gone, but the creation (and update) of linestring with two (3, 4) duplicated nodes in one position (which gives also a not valid geom) is still there.

I am not a programmer, so I failed to find a proper modification for the sql-command which updates the linestring - I can figure out how to check the nodes in the same sql-request with the creation of the linestring.

The problem with invalid geoms does not let create indexes with, for example st_within functions, which limits very much the usefulness of the database...

Please help me with this case!

Kirill Bestoujev


_______________________________________________
osmosis-dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to