OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2008-08-15 19:36:22

Registered: 2008-08-15
Posts: 1

pgsql2osm vs (not) osmosis

Hello, this is my first post here.

I hope the title is not to confusing. So let me explain what I am trying to find out.

The Import of osm data with osm2pgsql into a PostgreSQL database works fine.

But is their a way to do it the other way around??? I am looking for something like pgsql2osm.

JRA wrote here
that osm2pgsql looses informations during the conversion to PostgreSQL.
Is there some place, where that is documented? Is there a way to import all Tags?

An other tool to import osm data to PostgreSQL is osmosis. The nice thing about it is that the import works both way (MySQL <-> PostgreSQL) and it seems that no data gets lost (I checked that with the --derive-change option provided by osmosis). osmosis uses a PostgreSQL schema very similar to the schema used by MySQL.
My Question here is, can i use that schema with PostGIS? I searched for more information, but it wasn't successful.


NOTE: I am NOT trying to compare osmosis with osm2pgsql – they are totally different tools!!!
I am looking for a way to import a current osm file to PostgreSQL and use PostGIS features to manipulate some data. And in the end to export them to a osm file. BUT informations during the imports (and possible conversions) must not get lost.
Or does an other tool exist, that does the job?


#2 2008-08-15 20:54:47

Registered: 2007-11-13
Posts: 91

Re: pgsql2osm vs (not) osmosis

osm2pgsql is mainly written for rendering data with data. So it only imports tags which are going to be useful for rendering. These tags are defined in the file --> … I don't think osm2pgsql is the right tool to get the same data back again as it also manipulates data for mapnik ( placing nodes in the centre of gravity of polygons)

PS. the forum might not be the best place for advanced questions, try the dev mailing list


Board footer

Powered by FluxBB