OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2018-07-12 22:38:30

Shohreh
Member
Registered: 2012-12-15
Posts: 164

[SOLVED] [OverpassTurbo] Returns no data :-/

Hello,

I need to find all the bicycle-related infras in a given city.

I know the objects live in the OSM database, but the following query returns nothing:

[out:json][timeout:25];

//Mycity = relation 123
rel(123);map_to_area -> .searchArea;

(
  way["highway"="cycleway"][~"(cycleway|cycleway:left|cycleway:right)"~"(lane|track)"] (area.searchArea);
);

out geom;

Can you spot what's wrong with this query?

Thank you.

--
Edit : As a work-around, this works, but I'd still be curious to understand why the original query failed:

[out:json][timeout:25];

rel(123);map_to_area -> .searchArea;

(
  way["highway"="cycleway"](area.searchArea);
  way[~"(cycleway|cycleway:left|cycleway:right)"~"(lane|track)"] (area.searchArea);
);

out geom;

Last edited by Shohreh (2018-07-13 11:50:52)

Offline

#2 2018-07-13 01:16:45

muralito
Member
Registered: 2012-09-04
Posts: 1,628

Re: [SOLVED] [OverpassTurbo] Returns no data :-/

In the first query you ask for ways that have all those attributes at the same time, like an "AND".

In the second query, you splitted the conditions, so is like "OR".

Offline

#3 2018-07-13 11:49:09

Shohreh
Member
Registered: 2012-12-15
Posts: 164

Re: [SOLVED] [OverpassTurbo] Returns no data :-/

Makes sense.

Thanks!

Offline

Board footer

Powered by FluxBB