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

For example, I might want a list of rail trails: objects tagged highway=cycleway and railway=abandoned. The only way I know of doing this is to download all objects with one of those tags and then filter them down, but either unfiltered list will be huge.

asked 22 Jul '10, 02:06

NE2's gravatar image

NE2
1.4k333954
accept rate: 9%


Meanwhile there is the new Overpass API allowing to search for objects with two or more specific tags, like:

http://www.overpass-api.de/api/xapi?way[highway=cycleway][railway=abandoned][@meta]

(this example uses the XAPI compatibility layer)

permanent link

answered 27 Jul '12, 13:19

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

2

In the meantime it is even simpler: Go to http://overpass-turbo.eu/ , position the map, open the wizard, and enter "highway=cycleway AND railway=abandoned". It will automatically generate the needed query code (you may want to remove the "node" line from the code) and show the results on a map. Getting a "list" is a tiny bit more complicated (a real "list" format is not available in its export formats): setting the output to csv would be possible.

(12 Jan '15, 12:52) aseerel4c26 ♦

No, it is currently not possible. XAPI as well as the API only support searching for one tag.

Advanced data filtering and manipulation tasks are beyond the scope of our existing APIs. Power users wishing to perform such actions are advised to download the full area of interest, import it into a relational database (for example using Osmosis), and then perform queries on that database.

permanent link

answered 22 Jul '10, 09:23

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 22 Jul '10, 14:06

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074

How do I search even for one tag? For example: name="Metuje". Thanks for help.

(21 Sep '10, 16:47) Kozuch

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:

×275
×230

question asked: 22 Jul '10, 02:06

question was seen: 8,712 times

last updated: 12 Jan '15, 19:07

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