Hello, How do I add a few selected countries only instead of adding the planet data? I used the following to add one,
Can I use the same command and add another one or am I doing something wrong? asked 28 Jul '22, 09:21 praveen_aps edited 30 Jul '22, 05:13 |
One Answer:
The safest approach is downloading a continent or planet file, then using Alternatively, download individual countries, merge them with Importing individual countries one after the other is not recommended, it is much slower than the approaches above. answered 28 Jul '22, 09:32 Frederik Ramm ♦ |
Thanks for your response, although may I ask if there's any drawback to doing so apart from it being slower? because we'd like to add more countries as and when required.
Being slower is the only drawback but depending on your setup you will find that it can take two weeks to add a country that way when it would take two hours to do a full import on a clean database. Just try it out, maybe you'll be lucky. What you need to do is convert the .osm.pbf that you want to add to an .osc file by using
osmium --derive-changes
to compute the changes between an empty file and the .osm.pbf you want to add. Then useosm2pgsql --append
to append the .osc file to your database.Thank you, I'll try that out