User:ZeLonewolf/Irish city fix

From OpenStreetMap Wiki
Jump to navigation Jump to search

Stranded nodes:

try it yourself in overpass-turbo
[timeout:250][out:json];
node["note"="Experimental import of Irish places and POIs from GNS Dataset"];
rel(bn)->.a;(._; - node(r.a););
out skel qt;

Stranded nodes + relations:

try it yourself in overpass-turbo
[timeout:250][out:json];

//Ireland boundary
area(3600062273)->.ireland;

//Admin boundaries 7-8 without an admin_centre node
rel["type"="boundary"]["boundary"="administrative"]
   ["admin_level"]
        (if:is_number(t["admin_level"]) &&
                      t["admin_level"] >= 6 && 
                      t["admin_level"] <= 8)(area.ireland);
node(r:"admin_centre")->.a;
(._; - rel(bn.a);)->.boundaries;

//Place nodes from the Irish import that aren't in a relation
node["note"="Experimental import of Irish places and POIs from GNS Dataset"]->.places;
rel(bn.places)->.b;(.places; - node(r.b);)->.places;

(.places;.boundaries;.boundaries>;);

out body;

Stranded nodes + closed way boundaries:

try it yourself in overpass-turbo
//Ireland boundary
area(3600062273)->.ireland;

//Closed admin way boundaries
way["boundary"="administrative"]
  (area.ireland)
  (if:is_closed())->.cities;

//Place nodes from the Irish import that aren't in a relation
node["note"="Experimental import of Irish places and POIs from GNS Dataset"]->.places;
rel(bn.places)->.b;(.places; - node(r.b);)->.places;

(.places;.cities;.cities>;);

out skel qt;