0

For example: I want to export the position, Street and names of all fire hydrants of my city in a spreadsheet or csv file? How can I do that? Is there an easy web frontend to configure and download the export? Or do I have to code?

asked 18 Dec '18, 08:27

Vale's gravatar image

Vale
11113
accept rate: 0%

I am experimenting with http://overpass-turbo.eu/ For example I try to get all glass containers in a city.

qith the query I get all recycling related points: // query part for: “recycling” node"amenity"="recycling"; way"amenity"="recycling"; relation"amenity"="recycling";

How do I get only the glass containers?

(18 Dec '18, 08:52) Vale

One Answer:
4

As you've already found out (for not all too large areas) the overpass api or the overpass-turbo frontend is likely the best choice.

If you need to refine your searches you should consult the wiki for information on the objects and how they are tagged (and yes there may be a couple of variants that you will need to consider).

For your example http://overpass-turbo.eu/s/EC5

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“amenity=recycling and recycling_type=container and "recycling:glass_bottles"=yes”
*/
[out:json][timeout:25];
// gather results
(
  // query part for: “amenity=recycling and recycling_type=container and "recycling:glass_bottles"=yes”
  node["amenity"="recycling"]["recycling_type"="container"]["recycling:glass_bottles"="yes"]({{bbox}});
  way["amenity"="recycling"]["recycling_type"="container"]["recycling:glass_bottles"="yes"]({{bbox}});
  relation["amenity"="recycling"]["recycling_type"="container"]["recycling:glass_bottles"="yes"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

To get CSV output you will need to directly use the overpass-api and specify that you want CSV output.

permanent link

answered 18 Dec '18, 11:17

SimonPoole's gravatar image

SimonPoole ♦
40.0k13297634
accept rate: 19%

edited 18 Dec '18, 12:20

I've added the Overpass API query to your answer in case overpass-turbo becomes (temporarily) unavailable.

(18 Dec '18, 11:45) scai ♦
1

You can get csv in overpass turbo, by replaceing [out:json] like this:

[out:csv (::id, ::lat,::lon, "recycling_type","recycling:glass_bottles")]

(18 Dec '18, 12:52) SK53 ♦

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:

×287
×201
×31
×1

question asked: 18 Dec '18, 08:27

question was seen: 2,639 times

last updated: 18 Dec '18, 12:52

powered by OSQA