[OSM-dev] Patch for osm2pgsql "duplicate keys"
Nick.Whitelegg at solent.ac.uk
Mon Dec 12 09:22:24 GMT 2011
On 11 December 2011 10:51, Andrew M. Bishop <amb at gedanken.demon.co.uk> wrote:
>> My own personal need is to import great_britain.osm and then add
>> ireland.osm both using data from geofabrik. Either file can be
>> imported on its own and the only duplicate data comes from the tiny
>> overlap of the two data sets. With this patch I can run osm2pgsql
>> twice, the first of which is fast because there is no duplicate data
>> to worry about and the second of which is fast because although there
>> is duplicate data there are not as many objects in the second file.
>> With this command line option it is faster to import now than it was
>> with both patches applied.
>> osm2pgsql --create [...] great_britain.osm
>> osm2pgsql --append --allow-dups [...] ireland.osm
>Ok, that's weird because --append is supposed to allow duplicates
>already, that's why the MODIFY flag exists already. Otherwise it would
>be a bit pointless.
I know on my (rather old) version of osm2pgsql, append fails with duplicate ways.
Will have to try the new version and see if I get the same problem.
More information about the dev