[OSM-dev] osm2spatialite!

Frederik Ramm frederik at remote.org
Thu Feb 17 09:56:42 GMT 2011


On 02/17/11 10:23, Daniel Sabo wrote:
>> Can you elaborate on how having "inner" and "outer" roles helps one
>> in building a valid geometry?
> So, this does assume that it started as a valid OSM multipolygon, if
> it fails that requirement I think we're better of fixing it in OSM
> than coding around it :).
> A valid Simple Feature polygon needs to have a non-self-intersecting
> / non-self-touching outer ring, but inner rings are allowed to touch
> outer rings. When you look at an inner line that shares an endpoint
> with an outer line and ignore roles there's a 50/50 chance of
> appending it to the wrong ring.

Ah, I see. I do indeed handle that with backtracking.

> I do ignore the roles after the rings are built, so if there's an
> outer immediately inside another outer it will just consider the 2nd
> one an inner.

Makes sense. Do you do anything about touching inner rings?


More information about the dev mailing list