[OSM-dev] Polygon relationificator

Ian Dees ian.dees at gmail.com
Tue Sep 22 21:58:28 BST 2009

On Mon, Sep 14, 2009 at 8:42 AM, Emilie Laffray <emilie.laffray at gmail.com>wrote:

> 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.

After spending a couple hours last night trying to clean up the county
borders in Wisconsin last night (by turning them into relations instead of
overlapping ways), I think I'd like to try implementing this. Is there
anyone interested in helping me come up with an algorithm for finding which
ways need to be deleted, which need to be segmented, etc.? I think the
hardest part will be to find ways that exactly-overlap. Any thoughts on
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090922/c5c5061f/attachment.html>

More information about the dev mailing list