err
err

Reputation: 109

How to get ways from OpenStreetMap which are NOT part of any relation?

I'm trying to get ways which are NOT part of any relation, but I couldn't find any example for this kind of exclusion.

For example, running tracks...

Ways included in

relation['route'='running']

being downloaded in

way['leisure'~'track|stadium']['sport'='running']

as well, which results this

enter image description here

Both "W" ways are included in "R" relation, so I don't need for those separatedly.

Hope it's clear :)

Thanks for any help in advance!

Upvotes: 2

Views: 865

Answers (1)

err
err

Reputation: 109

Node example at OSM Wiki via mmd.

For ways just change a few things...

Orginal example:

area[name="Bonn"];
node(area)[highway=bus_stop]->.all;
rel(bn.all);
node(r);
( .all; - ._; );
out meta;

Working example for ways:

area[name="%areaname%"];    
    way
      ["%whatever%"~"%you%|%need%"]
      ["%to%"="%filter%"]
      (area)
      ->.all;
    relation(bw.all);
    way(r);
    (
      .all;
      -
      ._;
    );
    (
      ._;
      >;
    );
    out meta;

Upvotes: 1

Related Questions