[OSM-dev] osm2pgsql support for relation type=boundary
Jon Burgess
jburgess777 at googlemail.com
Tue Feb 10 19:00:58 GMT 2009
On Tue, 2009-02-10 at 18:12 +0000, Thomas Wood wrote:
> 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 */
>
That will probably do exactly what you want.
The code which builds the polygon geometries for multipolygons is quite
forgiving about what it will accept. It will join up any number of ways
together to form the closed ring(s).
Jon
More information about the dev
mailing list