[OSM-dev] Merging pbf files problem?

Will Wilson wilson.william at gmail.com
Mon Dec 20 21:15:46 GMT 2010


Hi All,

I sent this to the newbies list, but it might belong better here.

I'm trying to load OSM data for the USA into PostGres 9.0 with PostGIS.
Downloaded the .pbf extracts for the different US regions from Geofabrik,
combined them with Osmosis, and wrote the result to uncompressed XML like
so:

osmosis --rb us-pacific.osm.pbf --rb us-northeast.osm.pbf --rb
us-south.osm.pbf --rb us-midwest.osm.pbf --rb us-west.osm.pbf --merge
--merge --merge --merge --wb USA.osm.pbf
osmosis --rb USA.osm.pbf --wx USA.osm


Now, osm2pgsql fails with the following error:

Processing: Node(62940k) Way(0k) Relation(0k)pgsql_nodes_set - bad result
during COPY, data 114176303   415528523       -914342252      \N


Command was:

 osm2pgsql -S ../osm2pgsql/default.style --slim -d gis -C 2048
~/OSM/workdir/USA.osm

Machine has tons of memory, and running htop during the most recent attempt,
I didn't get anywhere near close to maxing out.

More curiously, when I try to use one of the Geofabrik .pbf extracts
directly, without doing the merging first, the import goes just fine. i.e.
the following succeeds:

osm2pgsql -S ../osm2pgsql/default.style --slim -d gis -C 2048 -r pbf
/home/will/OSM/workdir/us-pacific.osm.pbf


Do you think this might have something to do with the merging of the
different extracts corrupting the data somehow? I've searched around for the
answer, and found this thread, but it hasn't helped:

http://www.mail-archive.com/dev@openstreetmap.org/msg11280.html

Thanks,
Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20101220/4aafbc21/attachment.html>


More information about the dev mailing list