This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Overpasss-API request with Regex doesn’t match exactly

0

Hi,

I want to filter of recycling rontainers with recycling:*=* tags but no recycling_type=container. In the test region are two Containers which have all the tags so they both should not match the regex but one of them is in the result. Maybe I'm missing something obvios here but at the moment I cant figure out what it is.

node(51.710002,10.520173,51.710210,10.520822)
  [~"^recycling:."~"."]
  ["recycling_type"!~"container"];
out body;

asked 24 Mar '16, 14:34

Ogmios's gravatar image

Ogmios
766202639
accept rate: 25%


One Answer:

2

I'm pretty sure this is the same bug I reported here: https://github.com/drolbr/Overpass-API/issues/192

The fix has only been committed 4 days ago, so it might take a bit of time until it is available on one of the public Overpass instances.

For the time being please use the difference block statement:

(
  node(51.710002,10.520173,51.710210,10.520822)
       [~"^recycling:."~"."];

  -

  node(51.710002,10.520173,51.710210,10.520822)
  ["recycling_type"~"container"];

);

out body;

Obligatory overpass turbo link: http://overpass-turbo.eu/s/fec

answered 24 Mar '16, 17:40

mmd's gravatar image

mmd
5.7k15388
accept rate: 37%

edited 24 Mar '16, 17:41

Oh, thaks a lot. A bug is a relief. I had already begun to question my mind.

(24 Mar '16, 17:45) Ogmios

Source code available on GitHub .