четверг, 4 декабря 2014 г.

Overpass QL Union example

Example of Union query in new Overpass QL language
Пример запроса с Union на новом языке Overpass QL.



[maxsize:1073741824]
[out:xml]
[timeout:900]
;

(way
  ["railway"~"rail"]
    ["service"!="spur"]
["service"!="yard"]
  ["service"!="siding"]
  ({{bbox}});>;
)->.a;

(node
  ["railway"="station"]
  ({{bbox}});>;
)->.b;

(.a;  .b;) ->.c;

.c out meta qt;

{{style: /* this is the MapCSS stylesheet */

node
{  fill-color:gray;  }

node[railway=station]
{ color:black; fill-color:gray; text: name; }
way
{ color:brown; fill-color:brown; }


}}

http://overpass-turbo.eu/s/6o1

среда, 3 декабря 2014 г.

Overpass queries: villages without buildings, villages without highways, villages without residential areas.

Overpass queries: villages without buildings, villages without highways, villages without residential areas made by Xmypblu



Villages without buildings

overpass-turbo.eu/s/6lv


[maxsize:1073741824] [out:xml] [timeout:900] ; ( node ["place"~"hamlet|village"] ({{bbox}}); way ["place"~"hamlet|village"] ({{bbox}});>; relation ["place"~"hamlet|village"] ({{bbox}});>; )->.b; ( way ["building"~"."] ({{bbox}});>; )->.c; ( node (around.c:500.0) ["place"~"hamlet|village"]; way (around.c:500.0) ["place"~"hamlet|village"];>; relation (around.c:500.0) ["place"~"hamlet|village"];>; ) ->.d; (.b; - .d;) ->.e; .e out meta qt;


Villages without highways

Each village should have a highway, at least a highway=unclassified, on higher. Not highway=track.
overpass-turbo.eu/s/6lC


[maxsize:1073741824]
[out:json]
[timeout:900]
;

(
  node
  ({{bbox}})
  ["place"~"hamlet|village"];
  way
  ({{bbox}})
  ["place"~"hamlet|village"];>;
  relation
  ({{bbox}})
  ["place"~"hamlet|village"];>;
)->.b;

(
  way({{bbox}})["highway"~"motorway|trunk|primary|secondary|tertiary|unclassified"];>;
)->.c;

(
  node
  (around.c:1000.0)
  ["place"~"hamlet|village"];
  way
  (around.c:1000.0)
  ["place"~"hamlet|village"];>;
  relation
  (around.c:1000.0)
  ["place"~"hamlet|village"];>;
) ->.d;

(.b; - .d;) ->.e;

.e out meta qt;


Villages without landuse=residential

http://overpass-turbo.eu/s/6mg

[maxsize:1073741824]
[out:xml]
[timeout:900]
;

(
  node
  ["place"~"hamlet|village"]
  ({{bbox}});
  way
  ["place"~"hamlet|village"]
  ({{bbox}});>;
  relation
  ["place"~"hamlet|village"]
  ({{bbox}});>;
)->.b;

(
  way
  ["landuse"~"residential"]
  ({{bbox}});
  relation
  ["landuse"~"residential"]
  ({{bbox}});>;
)->.c;

(
  node
  (around.c:500.0)
  ["place"~"hamlet|village"];
  way
  (around.c:500.0)
  ["place"~"hamlet|village"];>;
  relation
  (around.c:500.0)
  ["place"~"hamlet|village"];>;
) ->.d;

(.b; - .d;) ->.e;

.e out meta qt;