OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

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

spaten
Member
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.

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

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

b)
JRA wrote here
http://forum.openstreetmap.org/viewtopic.php?id=780
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?

2.
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.


Cheers

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?

Offline

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

Skywave
Member
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 default.style --> http://trac.openstreetmap.org/browser/a … ault.style. 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

Offline

Board footer

Powered by FluxBB