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

I am trying to retrieve a list of objects with at least two specific keys without specifying the values for those keys using the OverpassAPI.

This is the query I thought should list me all ways with at least a highway and a name tag:

http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json];way[highway][name]%2850.66%2C10.91%2C50.7%2C10.95%29%3Bout%3B

However, it just returns nothing. Specifying a highway value works as expected:

http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json];way[highway=residential][name]%2850.66%2C10.91%2C50.7%2C10.95%29%3Bout%3B

Specifying no highway value but a specific name also works as expected:

http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json];way[highway][name=%22Langewiesener%20Straße%22]%2850.66%2C10.91%2C50.7%2C10.95%29%3Bout%3B

So, why doesn't the first query work without a value for both the highway and name tag? Am I doing something wrong here or is this just not supported?

asked 15 Aug '12, 08:11

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 15 Aug '12, 08:12


No, it is simply a bug. I have introduced an acceleration for that kind of queries a few days ago, and apparently haven't tested it enough. I'll check what is going wrong and then tell details.

As a temporary workaround, you can use a regular expression for one of the two conditions:

http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json];way[highway][name~%27.%27]%2850.66%2C10.91%2C50.7%2C10.95%29%3Bout%3B

Update: I just have realized that this only affects the rambler instance. Thus,

http://overpass-api.de/api/interpreter?data=[out:json];way[highway][name]%2850.66%2C10.91%2C50.7%2C10.95%29%3Bout%3B

works fine. The rambler instance runs the pre-acceleration version, and thus this might be a good occasion to update the rambler instance as well.

permanent link

answered 15 Aug '12, 08:19

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

edited 15 Aug '12, 08:23

Ah I see, thanks for the quick answer :).

(15 Aug '12, 08:24) scai ♦
2

Ok, everything should be fine now. The workaround is no longer necessary.

(15 Aug '12, 11:42) Roland Olbricht

Thanks again!

(15 Aug '12, 11:57) scai ♦

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
×147

question asked: 15 Aug '12, 08:11

question was seen: 7,456 times

last updated: 15 Aug '12, 11:57

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