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

I am using something as the code below, but need something as ::center of the relations (the ::lat and ::lon are only for nodes) and ::bbox.... What the syntax this kind of output?

[out:csv(::id,::type,wikidata,place, boundary,::center,::bbox)] ;
relation   (298285) -> .c ;
.c map_to_area -> .myarea ;
( 
  node (area.myarea)  [place] [wikidata] ;
  relation  (area.myarea) [boundary] [wikidata];  
);
out meta ;

asked 02 Sep '18, 15:40

ppKrauss's gravatar image

ppKrauss
95192225
accept rate: 0%


Just use out center to get the ::lat and ::lon for the relation centers.

[out:csv(::id,::type,::lat,::lon,wikidata,place, boundary)] ;
area(3600298285)-> .myarea ;
( 
  node (area.myarea)  [place] [wikidata] ;
  relation  (area.myarea) [boundary] [wikidata];  
);
out center meta;

I don't know if there is a way to get a bbox in csv output.

(There's info in the docs about directly looking up areas based on the OSM id they are generated from)

permanent link

answered 02 Sep '18, 16:10

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

Thanks, 50% of the answer (!)... If there are no manner to obtain BBOX, the answer will be 100%, so accepted. Lets wait some comment about existence of BBOX solution.

(02 Sep '18, 16:46) ppKrauss

You could do a separate query to get the bounds. http://overpass-turbo.eu/s/Bzz

(of course for nodes it doesn't return anything)

But I don't think there is any way to access the bounds using csv fields.

(02 Sep '18, 17:46) maxerickson

Thanks, yes, I must to change my goal, from CSV to JSON, that is the solution for any output...

(03 Sep '18, 01:59) ppKrauss
Your answer
toggle preview

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

question asked: 02 Sep '18, 15:40

question was seen: 1,116 times

last updated: 03 Sep '18, 01:59

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