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

I'm trying to create a liste with overpass so i can create my own map with http://printmaps-osm.de/de/beispiele.html

One example is using csv containing

id|name|wkt
1|Open Air Museum|POINT(7.59918 51.95005)
2|Zoo|POINT(7.59074 51.94666)

Is it possible to get this output instantly(or, something like that)? It feels like an simple request but i could not find it on https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example#Exporting_Data there or in the docs itself.

[out:csv("id","name","website","long")][timeout:25];
//[out:json][timeout:25];
// gather results
(
  // query part for: “amenity=hospital”
  node["amenity"="hospital"]({{bbox}});
  way["amenity"="hospital"]({{bbox}});
  relation["amenity"="hospital"]({{bbox}});
);

// print results
out body center; // just get center of values
>;

I added "website" for testing purposes. So i can access tags, but i cannot access lat and long to write in the csv?

asked 19 Dec '21, 22:03

Negreheb's gravatar image

Negreheb
129127
accept rate: 0%


https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#CSV_output_mode

[out:csv(::id,name,website,::lat,::lon; false; ",")]
[bbox:{{bbox}}];
nwr[amenity=hospital];
out center;

https://overpass-turbo.eu/s/1ej9

permanent link

answered 20 Dec '21, 03:31

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

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
×315
×16
×1

question asked: 19 Dec '21, 22:03

question was seen: 2,454 times

last updated: 20 Dec '21, 03:31

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