[OSM-dev] Merging pbf files problem?

Jon Burgess jburgess777 at gmail.com
Mon Dec 20 21:59:55 GMT 2010


On Mon, 2010-12-20 at 16:15 -0500, Will Wilson wrote:
> 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
> 

Try looking for nodes with id="114176303" in the USA.osm file. I suspect
it may be on the border between two areas and may be duplicated in the
XML file. This would violate the primary key condition during the COPY.

   Jon






More information about the dev mailing list