[OSM-dev] osm2pgsql support for relation type=boundary

Thomas Wood grand.edgemaster at gmail.com
Tue Feb 10 18:12:00 GMT 2009


I have no knowledge of c, osm2pgsql, geos or any of the other stuff,
but I did have a hack at it a while back, and a very simple patch
seemed to give me a usable result from my experimentations with the
London borough relations.

Also attached is a mapnik rendering style that I used to confirm it worked.


Index: output-pgsql.c
===================================================================
--- output-pgsql.c	(revision 11943)
+++ output-pgsql.c	(working copy)
@@ -798,6 +798,10 @@
             }
         }
     }
+    else if( strcmp( type, "boundary" ) == 0 )
+    {
+        make_polygon = 1;
+    }
     else
     {
         /* Unknown type, just exit */


2009/2/10 sly (sylvain letuffe) <liste at letuffe.org>:
> Hi there,
>
> It may exists somewhere so please excuse me if it does.
>
> has anyone made a patch for osm2pgsql to support boundary relations import ?
>
> Has seen in here :
> http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/output-pgsql.c
>
> It looks (I said "looks", I'm in no way a C++ expert) that only multipolygon
> and route type are supported/hard coded
>
> Before going deeper in C++ books, did anyone allready do it ?
>
> --
> sly
> Sylvain Letuffe liste at letuffe.org
> qui suis-je : http://slyserv.dyndns.org
>
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>



-- 
Regards,
Thomas Wood
(Edgemaster)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osm-boundaries.xml
Type: text/xml
Size: 2049 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090210/d8baca40/attachment.xml>


More information about the dev mailing list