[OSM-dev] Ways and tags to separate tables?

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Thu Feb 4 10:34:32 GMT 2010


Osm2pgsql is fine and fast utility for importing OSM data into PostGIS, but it
is mainly made for Mapnik rendering. For that it is OK to import just a subset
of tags and make a wide schema with an own column for each tag.  However,
sometimes it would nice to get all the tags available in some database.

Has anybody made yet a tool which separates ways and tags to different tables? 
The way tables could contain just the geometries and OSM_IDs, perhaps separated
to points, lines and polygons, and tag tables would hold the tags by using
OSM_ID as a foreign key. Perhaps relations should be pushed to a fourth table
which accepts all kind of things, including geometry collections. Spatialite
would be an ideal output for me but I an not sure if is could take in very big
datasets. I have had troubles in creating bigger that 5 gigabyte spatialite
databases so perhaps PostGIS would be more safe alternative.

-Jukka Rahkonen-

More information about the dev mailing list