[OSM-dev] Using NULL values in mapnik / postgres DB

Artem Pavlenko artem at pavlenko.uklinux.net
Tue Feb 20 23:20:35 GMT 2007


> I'll have to take a look. Would linemerge fix up the ways looping back
> on themselves that you reported before?
That's the plan
> What node function are you 
> thinking of and what would it do?
>

Here are some examples of invalid ways (geometrically) :

1.  http://artem.dev.openstreetmap.org/files/notsimple_way.png  
   osm2pgsql actually outputs three LINESTRINGS from this way but one is 
self-tangent (see example 3)

2.  http://artem.dev.openstreetmap.org/files/notsimple_way-2.png  - 
self-intersecting way.

3. http://artem.dev.openstreetmap.org/files/notsimple_way-3.png - 
self-tangent. Only start and end points can match!!!


'Noding' is an operation that given collection of LineStrings will produce a 
new one where none of LineStrings are crossing each other  ( in example [2] 
it will insert extra node at intesection).

'LineMerge' will join segments into simple geometries (the current segment 
join algorithm produces cases like [2])

I can code all this in C++  and see if it works and then we can try to merge 
it into osm2pgsql?  Let me know!

Cheers,
Artem




More information about the dev mailing list