[OSM-dev] [OSM-server setup]

Jon Burgess jburgess777 at gmail.com
Thu Jun 17 23:08:22 BST 2010


On Thu, 2010-06-17 at 14:28 +0530, PARVEEN ARORA wrote:
> Reading in file: /home/oops/planet/india.osm.bz2
> Processing: Node(2720k) Way(0k) Relation(0k)COPY_END for COPY
> planet_osm_nodes FROM STDIN;
>  failed: ERROR:  duplicate key value violates unique constraint
> "planet_osm_nodes_pkey"
> CONTEXT:  COPY planet_osm_nodes, line 420565: "245638625    190055831
> 843698439    \N"
> 
> Error occurred, cleaning up
> 
> 
> Please help me  how to remove this error:
> or suggest me any other way to load planet into database with
> osm2pgsql ......

That error indicates that the india.osm.bz2 file has multiple copies of
a node, often two different versions.

One simple way which should fix it is to drop the --slim from the
osm2pgsql command line. This isn't the best solution but is simple and
should work (provided the machine has a few GB of RAM).

The better solution is to fix up the duplicate data in the file by
passing it through osmosis using the steps listed here:

http://lists.openstreetmap.org/pipermail/dev/2010-January/018345.html

	Jon






More information about the dev mailing list