This overpass request returns a bbox for each relation.
How to get a unique merged bbox ?
``` /* This has been generated by the overpass-turbo wizard. The original search was: “landuse=depot in Moselle” */ [out:json][timeout:25]; // fetch area “Moselle” to search in {{geocodeArea:Marseille}}->.searchArea; // gather results relation["route"="subway"](area.searchArea); // print results out bb; ```
Aug 14, 10:06am
To get a unique merged bounding box (bbox) from multiple relations returned by your Overpass QL query, you need to:
Extract the bbox of each relation from the response.
Merge all bboxes into a single bbox that encompasses all individual bboxes.
How to do it:
1. Extract bboxes from the Overpass response
The Overpass API returns each relation with a bounds field if you use out bb;. The bounds field contains the min/max latitude and longitude for that relation.