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

I net to run by terminal (eg. using wget or curl) an Overpass query... Something like

(  node[place]({{bbox}}); relation[boundary]({{bbox}});  );

but returning a CSV file with csv(id,user,type,wikidata,name,place, boundary) (perhaps with verbosity='meta').

So, how to express this query in a standard URL-API? What the best URL to use,

PS: I need a full URL to test, as[out:csv];...

asked 30 Jul '18, 15:34

ppKrauss's gravatar image

accept rate: 0%

edited 30 Jul '18, 15:35

Simple answer is (if I understand question correctly)

In a bit more detail I have rewritten your query and typed into overpass turbo (if this isnt quite what you want I hope you get the general idea)

[out:csv(::id,::user,::type,wikidata,name,place, boundary)]
(  node[place] ;
out meta ;

Running this gives

@id @user   @type   wikidata    name    place   boundary
450524790   SK53    node    Q154322 South Bank  suburb  
51781   kalc    relation    Q179351 City of Westminster     administrative
51800   lefty74 relation    Q23311  City of London      administrative

I then selected Export > convert to (compact) OverpassQL Which opens new tab with the rather long URL quoted above

permanent link

answered 30 Jul '18, 16:33

andrewblack's gravatar image

accept rate: 57%

edited 30 Jul '18, 16:40

Hi, thanks, near perfect! I need also restriction to "wikidata is not null". About BBOX I posted another question, because will be easy starting with a relation ID.

(30 Jul '18, 17:03) ppKrauss

Solved the "wikidata is not null" constraint by node[place][wikidata]; relation[boundary][wikidata];

(30 Jul '18, 17:28) ppKrauss

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: 30 Jul '18, 15:34

question was seen: 5,091 times

last updated: 30 Jul '18, 17:28

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