1

I would like to extract roads which are missing bike lanes so that I can map them with Photo Mapping software. With my query below, I am able to fetch roads which are missing the cycleway tag. However, it is still returning roads which have the "cycleway:both" supplementary detail such as "cycleway:both=no". How can I fix my query to exclude such ways?

[out:json][timeout:250];
// gather results
(
  way["highway"="primary"]["cycleway"!~".*"]({{bbox}})(if: length() > 20);
  way["highway"="motorway"]["cycleway"!~".*"]({{bbox}})(if: length() > 20);
  way["highway"="trunk"]["cycleway"!~".*"]({{bbox}})(if: length() > 20);
  way["highway"="secondary"]["cycleway"!~".*"]({{bbox}})(if: length() > 20);
  way["highway"="tertiary"]["cycleway"!~".*"]({{bbox}})(if: length() > 20);
  way["highway"="residential"]["cycleway"!~".*"]({{bbox}})(if: length() > 20);
  way["highway"="road"]["cycleway"!~".*"]({{bbox}})(if: length() > 20);
);
// print results
out body;
>;
out skel qt;

As a corollary, it is making me question whether map edits containing "cycleway:both" should also have "cycleway=yes" since the former is not as widely used.

1
  • 1
    Note that here are also cycleway:left=* and cycleway:right=* tags. For example with cycleway:left=lane + cycleway:right=track a cycleway is present for both directions whereas cycleway:left=lane + cycleway:right=no specifies that only one direction has a cycleway.
    – scai
    Commented Jan 4 at 11:50

1 Answer 1

0

I accomplished this with the following:

nwr["highway"="primary"]["cycleway:both"!~".*"]["cycleway"!~".*"]({{bbox}})(if: length() > 1);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.