I’m not sure to be in the correct subtopic for my question but I didn’t found better.
I try to use Overpass API over Europe OSM data. I want to get all European country (+ their islands). Example, for France : Metropole + Corsica + Guadeloupe + Martinique…
To do it, I downloaded europe OSM datafile from geofabrik : https://download.geofabrik.de/europe-latest.osm.bz2 because I saw that in Europe folder I can get all what I wanted. Example : Europe/France/Corsica+Guadeloupe+Martinique… and same things for others countries.
I tried to request on different countries with success but can’t get data for many islands. Example : I can get Corsica data but CAN’T get for others French islands (Guadeloupe, Martinique…).
Request example :
→ this returned values using https://overpass-turbo.eu test tool, but nothing with my custom overpass API (tried on different request and different GPS loc).
Also, I checked import log files generated during import of .osm.bz2 into db/ folder, I saw many (more than hundred) lines like :
→ is it related to my problem ?
Can the europe-latest.osm.bz2 be corrupted (missing data) ?
Can I import islands on my current /db to not re-download all data ?
Some relations for countries mostly in Europe (for example France) have parts that are outside Europe, so it’s quite possible that a “European” extract will be missing some parts of some countries.
My initial goal was : to get European countries (geographic) + all islands associated to them (example : France is an European country, so I want also their islands : in Europe like Corsica + outside Europe like Martinique, Guadeloupe…).
Strictly speaking, France is a country that is mostly in Europe (see https://en.wikipedia.org/wiki/Overseas_France for details). it sounds like you’ve got the European bit of France, but not the rest.
Do you just need the boundaries of those countries? In that case, you can use https://wambachers-osm.website/boundaries/
If you need other data such as roads, POI, etc. you need another method.
So please explain which data you mean when you write “I want to get all European country (+ their islands)” It might be obvious to you what you need, but it is not for the people that want to help you.
That is correct. The file you downloaded from geofabrik doesn’t contain any objects outside the polygon shown on http://download.geofabrik.de/europe.html. That is why you can’t find any data for the overseas islands. You will have to download more OSM data somehow.
The Europe extract intentionally does not include any data on the overseas parts of European countries, which are not inside the polygon.
Typically, you’d merge them together before loading into a database. “osmium” is one way of doing that, “osmosis” is another. One thing that a map server that I run does is splits a downloaded file into several pieces, translates each piece into a different language, and merges them all back together. The script that does all this (using osmosis) is here: https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/update_render.sh .
There’s also documentation on osmosis and osmium in the OSM wiki and linked from it.
I tried, it worked fine with multiples small files but can’t merge huge file (europe :33GB) with others small files (memory error).
Is there a solution to add .osm.bz2 files into an existing database ?
The idea is to initial load with Europe and after: import in the existing DB others files.