This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

Get the bounds of areas in overpass (states)

0

I want to get the coordinates that limit a state using overpass (OSM) like this:

{
  "type": "way",
  "id": 24157062,
  "bounds": {
    "minlat": 24.4535230,
    "minlon": 54.3770477,
    "maxlat": 24.4541602,
    "maxlon": 54.3777469
  }
}

the problem is when I query an area, it does not return the arguments I need, and it returns this:

{
  "type": "area",
  "id": 3600307763,
  "tags": {
    "ISO3166-1": "AE",
    "ISO3166-1:alpha2": "AE",
    "ISO3166-1:alpha3": "ARE",
    "ISO3166-1:numeric": "784",
    "admin_level": "2",
    "alt_name:ar": "الإمارات العربيّة المتّحدة",
    "alt_name:la": "Emiratus Arabici Uniti",
    ...
    }
}

is it possible to consult the bounding boxes of an area? and if so, could you help me with the structure of the query

i'm trying to do it this way:

[out:json];
 area['ISO3166-2'='EC-L'][admin_level=4];
 out bb;

asked 28 Dec '21, 22:57

chjuca's gravatar image

chjuca
11112
accept rate: 0%


One Answer:

0

answered 31 Dec '21, 16:17

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%