[SOLVED] [Overpass] One-way streets with no contra-flow bike lanes?

Hello,

Does someone know the syntax to query OSM for one-way streets that do not have a contra-flow bike lane?

Here’s how to find ways that do have a contra-flow bike lane:


[out:json][timeout:25];

rel(123456);map_to_area -> .searchArea;
(
  way[~"(cycleway|cycleway:left)"~"(opposite|opposite_lane)"](area.searchArea);
);
out body;
>;
out skel qt;

Thank you.

Please try:


[out:json][timeout:25];

rel(123456);map_to_area -> .searchArea;
(
  way[highway]; -
  way[highway][~"(cycleway|cycleway:left)"~"(opposite|opposite_lane)"](area.searchArea);
);
out geom;

I fear it is not that easy.

  1. The *left *and *right *in cycleway:left and cycleway:right refer to the direction of the way.
    [list=1]

  2. If it is a oneway=-1, the contra-flow side will be …:right

  3. For left-hand-traffic countries, it will be the other way round

[/*] [*]Generally it is not enough to check for *cycleway=opposite* but also for *oneway:bicycle=no*. Both tags are used for the same thing, some mappers may prefer setting the one or the other tag (I understand that the former is considered the "old" way)[/*] [*]For *cycleway:left=opposite_lane*, the alternative tagging with the same meaning is *cycleway:left=lane* + *cycleway:left:oneway=-1* (or *...=yes* if the way is *oneway=-1*, as far as I understand). And, of course, the other way around again for left-hand-traffic countries. (I understand that *cycleway:left:oneway=-1* and *cycleway:right:oneway=yes* for right-hand-traffic countries is the assumed default, only for contra-flow lanes in a oneway it is necessary to explicitly state the direction or use the *opposite_** tagging.)[/*] [*]In your (and mmd's) current query, checking for *oneway* is missing[/*] [/list]

Thanks.

What a mess :roll_eyes:

How should I modify mmd’s code to check for “oneway”? Is this correct?


[out:json][timeout:25];

rel(123456);map_to_area -> .searchArea;
(
  way[highway]["oneway"="yes"]; -
  way[highway][~"(cycleway|cycleway:left)"~"(opposite|opposite_lane)"](area.searchArea);
);
out geom;

way[highway]["oneway"~"yes|-1"];

-1 is for oneway roads which are oneways in the opposite direction of the way direction.

Vielen Dank!