Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
project:mapy [2017/10/04 03:04]
over23
project:mapy [2017/10/04 03:10]
over23
Line 10: Line 10:
   * https://​wiki.openstreetmap.org/​wiki/​Overpass_API   * https://​wiki.openstreetmap.org/​wiki/​Overpass_API
   * https://​overpass-turbo.eu/​   * https://​overpass-turbo.eu/​
 +
 +
 +<​file>​
 +/*
 +This query looks for nodes, ways and relations ​
 +with the given key.
 +Choose your region and hit the Run button above!
 +*/
 +[out:​json][timeout:​25];​
 +// gather results
 +(
 +  // query part for: “"​abandoned:"​=*”
 +  node["​abandoned:"​]({{bbox}});​
 +  way["​abandoned:"​]({{bbox}});​
 +  relation["​abandoned:"​]({{bbox}});​
 +);
 +// print results
 +out body;
 +>;
 +out skel qt;
 +</​file>​
  
  
  
-__seach for gas-station example: https://​overpass-turbo.eu/​__+__seach for gas-station example: https://​overpass-turbo.eu/​, found: in menu last item: https://​wiki.openstreetmap.org/​wiki/​Tag:​amenity%3Dfuel 
 +__
  
 <file java> <file java>
-<!--+/*
 This query looks for nodes, ways and relations ​ This query looks for nodes, ways and relations ​
 with the given key/value combination. with the given key/value combination.
 Choose your region and hit the Run button above! Choose your region and hit the Run button above!
---> +*/ 
-{{key=amenity}} +[out:​json][timeout:​25];​ 
-{{value=fuel}} +// gather results 
-<​osm-script output="​json">​ +( 
-  ​<​union>​ +  ​// query part for: “amenity=fuel” 
-    <query type="node"+  ​node["amenity"​="​fuel"]({{bbox}}); 
-      <has-kv k="{{key}}"​ v="{{value}}"/> +  way["amenity"​="​fuel"]({{bbox}}); 
-      <​bbox-query ​{{bbox}}/> +  relation["amenity"​="​fuel"]({{bbox}}); 
-    </​query>​ +); 
-    <query type="way"+// print results 
-      <has-kv k="{{key}}"​ v="{{value}}"/> +out body; 
-      <​bbox-query ​{{bbox}}/> +>; 
-    </​query>​ +out skel qt;
-    <query type="relation"​+
-      <has-kv k="​{{key}}" ​v="{{value}}"/> +
-      <​bbox-query ​{{bbox}}/> +
-    </​query>​ +
-  </union> +
-  <​print mode="body"/> +
-  <​recurse type="​down"/​+
-  <​print mode="​skeleton"/>​ +
-</​osm-script>​+
 </​file>​ </​file>​
  • project/mapy.txt
  • Last modified: 2017/10/13 11:18
  • by over23