Hi, One alternative is to use the GDAL/OGR OSM driver http://www.gdal.org/ogr/drv_osm.html A short document about how to use it http://latuviitta.org/documents/OSM_relations_visualized_with_GDAL_and_OpenJUMP.pdf
In the document the output goes to Spatialite database but PostGIS makes no difference. GDAL converts OSM relations into OGC simple features of type "geometry collection". It means that only attributes which have been given for the relation will follow with the geometry. -Jukka Rahkonen- Ákos Maróy wrote: > Hi, > > I working on an open aviation map project, using OSM technology such as > OSM XML files, which describe my datasets. These consists of polygons, > points, and I also have some relations. > > I'm using osm2pgsql to import my OSM file into a PostGIS database. I'm > using a custom osm2pgsql style file to specify which attributes I need > imported. > > But, I can't seem to be able to have osm2pgsql import my relations - > after the import, the content of the planet_osm_rels table is empty. I > was looking at the osm2pgsql documentation, but couldn't find an obvious > way to have the relations imported as well. > > Is there a simple way to have osm2pgsql import relations described in an > OSM XML file? > > Best regards, > > > Akos > > > _______________________________________________ > dev mailing list > [email protected] > http://lists.openstreetmap.org/listinfo/dev > _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

