[OSM-dev] Polygon relationificator

Emilie Laffray emilie.laffray at gmail.com
Mon Sep 14 14:42:15 BST 2009


2009/9/14 Frederik Ramm <frederik at remote.org>

> Ian,
>
> > This feature could be added, but could you draw a couple pictures to
> > explain what you mean? What happens with the graph edges inside the
> > multipolygon? Since they aren't really polygons, do they belong in a
> > multipolygon relation? Maybe I'm not correctly interpreting what you
> meant.
>
> The typical case is a shapefile with a mesh of, say, post code
> boundaries or county boundaries or so for a larger area. You will
> typically have lots of individual polygons, but running them through
> shp2osm as-is will duplicate nodes along the borders. The goal is to
> split up the polygons into their border lines, and then create OSM
> multipolygon relations where the border consists of several of those
> lines, and every line is used by two adjacent polygons (rather than
> importing the line twice just because it was present twice in the shape).
>
>
I had a basic prototype for this behavior based on SQL code; the limitation
was that I didn't write the code to create the relation and that it was
working only on lines which had the same OSM nodes.
The first pass would merge nodes and then it would do a check on lines. But
there is more work to get it work properly. This was done using Osmosis
postgresql schema.

Emilie Laffray
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090914/0ea69b2b/attachment.html>


More information about the dev mailing list