[OSM-dev] Loading a 0.6 osm file into postgres with osmosis
jz-2008 at heute-morgen.de
Fri May 1 17:06:01 BST 2009
I successfully used osmosis to load the cuurent map of germany into the
postgres schema from Brett Henderson:
Here is a short Howto:
1. I split the above skript into 2 parts at the COPY statements.
2. I ran the first part to create the schema without indexes and foreign
3. I ran (the following is an example, adapt the parameters)
bin/osmosis --read-xml-0.6 file=~/Desktop/download/germany.osm.bz2
--write-apidb-0.6 host=localhost database=osm1 user=osm password=****
4. When osmosis started to copy into the current_* tables, things slowed
down (nearly no disk writes, lots of reads). So I added the primary keys
on nodes, node_tags, ways, way_nodes and way_tags and copying ran fast
5. I ran the second part of the schema script creating the missing
indexes and FKs.
Done in about 6 hours.
More information about the dev