NOTICE: 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];
out center;

how can i do that?

asked 23 Oct '19, 13:42

n00bster's gravatar image

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: 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

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

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 23 Oct '19, 13:42

question was seen: 1,927 times

last updated: 23 Oct '19, 17:03

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