[OSM-dev] Gisify relations
Andreas Kalsch
andreaskalsch at gmx.de
Fri Jun 12 13:15:08 BST 2009
Hi,
this looks nearly like what I need. But let me specify my need a little
bit further. The script needs to be:
1) complete: all interesting nodes, all ways, all relevant relations -
MultiPolygons for as many relations as possible
2) correct: decision LineString or Polygon for ways, interpretation of
boundaries/multipolygons including holes (inner/exclave roles)
It seems that not all multipolygons are tagged with a certain order. But
I want to include as many multipolygons as possible
3) performant: at best all transforming steps on the DB server -
possible for both nodes and ways but not for boundaries/multipolygons.
I have solved nodes and ways, and I think the osm2pgsql script is the
best starting point to understand how the boundaries are exactly
working. I am currently not sure how to interpret the linearrings,
because they can be made of several ways. But some polygons start with
"inner" and then comes "outer", so I don't know to which "outer" the
"inner"s belong to. This can be difficult if there are several outer.
Unlike it is explained in the Wiki. And so on ... ;)
So thanks for your first replies, I will take a closer look into the
scripts now.
Andi
Frederik Ramm schrieb:
> Hi,
>
> Andreas Kalsch wrote:
>> Is there a script to gisify OSM relations - a script which creates
>> OpenGIS multipolygons or geometrycollections inside PostGIS or MySQL
>> as WKT ?
>
> No but there's this:
>
> http://wiki.openstreetmap.org/wiki/Boundaries.pl
>
> It generates .poly files from relations. The .poly files are basically
> text files with a list of lat/lons and I guess they could be converted
> quite easily into something else. In fact, if you do a little bit of
> Perl you could use the shapelib to create shapefiles directly from
> above script.
>
> Bye
> Frederik
>
>
>
More information about the dev
mailing list