0

I am trying to convert the relation to node, This is my query :

[out:json][timeout:25];
area["ISO3166-1:alpha2"="AM"]->.a;
rel[place~"town|city"]['name:en'~"Ararat"](area.a);
map_to_area;
out;
(._;>;);
out qt;

without map_to_area I have this result:

{
  "version": 0.6,
  "generator": "Overpass API 0.7.59.4 36d058c8",
  "osm3s": {
    "timestamp_osm_base": "2023-03-23T07:03:39Z",
    "timestamp_areas_base": "2023-03-23T06:13:07Z",
    "copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
  },
  "elements": [

{
  "type": "relation",
  "id": 9346800,
  "members": [
    {
      "type": "node",
      "ref": 955219312,
      "role": "admin_centre"
    }
  ],
  "tags": {
    "admin_level": "6",
    "boundary": "administrative",
    "name": "Արարատ",
    "name:el": "Αραράτ",
    "name:en": "Ararat",
    "name:hy": "Արարատ",
    "name:lt": "Araratas",
    "name:ru": "Арарат",
    "place": "town",
    "type": "boundary"
  }
},
{
  "type": "node",
  "id": 955219312,
  "lat": 39.8553329,
  "lon": 44.6943793,
  "tags": {
    "is_in:country": "Armenia",
    "is_in:country_code": "AM",
    "is_in:municipality": "Արարատ համայնք",
    "is_in:region": "Արարատի մարզ",
    "name": "Արարատ",
    "name:ckb": "ئارارات",
    "name:el": "Αραράτ",
    "name:en": "Ararat",
    "name:hy": "Արարատ",
    "name:ku": "Ararat",
    "name:lt": "Araratas",
    "name:ml": "അറാറാത്ത്",
    "name:ru": "Арарат",
    "place": "town",
    "population": "20385",
    "population:date": "2022-01-01",
    "source:population": "Armstat",
    "wikidata": "Q39504",
    "wikipedia": "en:Ararat, Armenia"
  }
},
{
  "type": "relation",
  "id": 9346800,
  "members": [
    {
      "type": "node",
      "ref": 955219312,
      "role": "admin_centre"
    }
  ],
  "tags": {
    "admin_level": "6",
    "boundary": "administrative",
    "name": "Արարատ",
    "name:el": "Αραράτ",
    "name:en": "Ararat",
    "name:hy": "Արարատ",
    "name:lt": "Araratas",
    "name:ru": "Арарат",
    "place": "town",
    "type": "boundary"
  }
}

  ]
}

but by adding map_to_area the result is empty.

1 Answer 1

0

That's a data issue. Relation 9346800 consists of a single admin_center node only. There's no way to derive an area from this relation, because it doesn't include (way) geometry.

Best if to fix this relation first by adding suitable geometry (at least an outer way), then try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.