[OSM-dev] Problem with duplicate keys

Adrian Chapela achapela.rexistros at gmail.com
Wed Aug 10 11:05:35 BST 2011


En 10/08/11 11:58, Peter Körner escribiu:
> Hi
>
> Am 10.08.2011 11:54, schrieb Adrian Chapela:
>> I am trying to make my own nominatim server with some countries of the
>> world but I am having a lot of duplicate keys when I am trying to add a
>> country.
>>
>> Example:
>> I import hait+dominican republic
>> ./osm2pgsql -lsc -O gazetteer -C 2000 -U postgres -d gazetteer
>> haiti-and-domrep.osm
>>
>> Then when I am tried to add cuba I am receiving duplicate key error:
>> ./osm2pgsql -las -C 2000 -O gazetteer -U postgres -d gazetteer cuba.osm
>>
>>
>> How could I solve that ? or How could I find where is the error ?
>
> It's unusual to import to files into one database, because they often
> overlap and contain the same entity two times. It's better to take a
> bigger extract and cut out the parts you need (eg. using osmosis) and
> import that extract.

Ok then... you recommend me to take the two files and join in one bigger
file ? Would osmosis solve duplicate keys problem ?


>
> Peter
>




More information about the dev mailing list