Download large datasets with filters

Hello,
I am currently working on a map using mapbox, but I needed more geographical data for it, so I decided to use OpenStreetMap data. Until now, I could test my map with a not too large dataset downloaded in geojson format directly on overpass turbo. However, when I try to use overpass Turbo to download the complete dataset (something around 100 Mo in xml), my navigator (chrome, edge) just crashes.
So I looked for other options :

  • download xml data directly with overpass api, and then convert it to geojson using osmtogeojson. Problem : due to an encoding problem probably, the file is not recognized by mapbox.
  • split the query into smaller ones I can download in overpass turbo. Problem : I can’t find a proper way to merge these afterwards…
  • use JOSM to make the query and then export it in geojson. Problem : it fails to export such a large dataset…

Here is my complete query :

rel(8649);
(map_to_area;)->.a;
(
  rel[route=bus](area.a)({{bbox}})[operator!=Flixbus][network!=Flixbus];
rel[route=trolleybus]({{bbox}})(area.a);
  rel[route=minibus]({{bbox}})(area.a);
);
(._;>;);
out;

Can someone help me to find a solution ?

Hi,

Have you considered downloading what you need from:

Ile de France from Geofabrik

and then filter/convert data in that file with the following tools:

osmosis
osmfilter
osmconvert

When I need data from osm, that’s the source and tools I allways use if the needed dataset is bigger/more complex than what I can get from overpass.
Does your endresult have to be in geojson format?

Marc.