[OSM-dev] making osm2pgsql import relations?

Kai Krueger kakrueger at gmail.com
Thu Nov 8 16:00:35 GMT 2012


Ákos Maróy wrote
> On 07/11/12 22:12, sly (sylvain letuffe) wrote:
>> osm2pgsql only uses it's multipolygon building ability when relations
>> have a tag "type" with value "multipolygon" or "boundary" (unless
>> patched) relation n°25 for exemple hasn't. 
> it hasn't on purpose. the relations I use are not used to stitch
> together polygons. they are relations in the traditional sense: they
> collect various data about the same thing, in this case, an airport. the
> related data is a range of lines (runways), points (navigation aids) and
> other stuff, like the 'airport reference point', etc.
> 
>> However, I'm unsure if it should or shound't end in the _rels table
>> anyway. But in the end, you won't have it in _polygon wich mean you
>> probably won't get what you want : the geometry 

Without a type tag, they don't even turn up in the _rels table.

As sylvain mentioned, osm2pgsql only processes relations of type route,
multipolygon and boundary into geometries, but does store all relations
(with any type tag) into the rels table. So if you add e.g. a tag
type=runway or type=airport or type=category, or anything else to your
relations they should show up in the _rels tables.

Although using the slim tables for things other than updating wasn't what
they were originally intended for and there might be better database
schemata for that purpose, I know that other people are using the rels and
lines tables created by osm2pgsql for interesting other purposes.

Kai




--
View this message in context: http://gis.19327.n5.nabble.com/making-osm2pgsql-import-relations-tp5734729p5734907.html
Sent from the Developer Discussion mailing list archive at Nabble.com.



More information about the dev mailing list