NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

i use this query at the time and i need to extend this with the output of the "region" too:

[out:csv(::id, ::lat, ::lon, "name", ele, "region"; true; "|")][timeout:100];
{{geocodeArea:Gratkorn}}->.searchArea;
(
  node["natural"="peak"]["name"]["ele"](area.searchArea);
);
out center;

how can i do that?

asked 23 Oct '19, 13:42

n00bster's gravatar image

n00bster
11113
accept rate: 0%

edited 23 Oct '19, 14:56

I'm unsure what you're trying to achieve. There are no 'region' tags in the data you're returning. Isn't Gratkorn the region?

[out:csv(::id, ::lat, ::lon, "name", ele, "region"; true; ",")]; {geocodeArea:Gratkorn}}; node[natural=peak][name]ele; out center;

(23 Oct '19, 14:33) DaveF

if i run the query i get some results of peaks, as sample this one: https://www.openstreetmap.org/query?lat=47.14775&lon=15.37002 called "Weißegg", when i do a right click for a "objectcall" i see that this peak have a relation with the region "Randgebirge östlich der Mur". exactly this regions i would need to output to very peak what i generate in my query.

(23 Oct '19, 14:52) n00bster

Likely something like https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example#Adding_Georeference_details_to_village_nodes_.28since_0.7.54.29

You can use a foreach loop to amend each item, but beware that such queries will likely be rejected if there are a lot of items to amend.

permanent link

answered 23 Oct '19, 15:16

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

i have run this example, but there is not the "region" > "Randgebirge östlich der Mur" what i would need.

(23 Oct '19, 15:47) n00bster

Indeed, the example illustrates the general technique of modifying a result with information from an enclosing area rather than exactly solving your specific request. You'll need to modify the internal part of the foreach loop to find the region rather than administrative boundaries in general.

(23 Oct '19, 17:03) maxerickson

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×483
×42
×17

question asked: 23 Oct '19, 13:42

question was seen: 2,084 times

last updated: 23 Oct '19, 17:03

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum