View Single Post
Posts: 445 | Thanked: 367 times | Joined on Nov 2010 @ Italy
#1778
about the tag combos, is possible to make querys to overpass api?

on overpass turbo there is a nice wizard, you search amenity=fuel and fuel:lpg=yes

an it shows all the relative POIs in the bounding box

Code:
{
  "version": 0.6,
  "generator": "Overpass API",
  "osm3s": {
    "timestamp_osm_base": "2015-02-02T15:26:02Z",
    "copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
  },
  "elements": [

{
  "type": "node",
  "id": 226914361,
  "lat": 41.8795571,
  "lon": 12.4401874,
  "tags": {
    "amenity": "fuel",
    "brand": "Agip",
    "fuel:lpg": "yes",
    "name": "Agip",
    "operator": "Agip"
  }
},
{
  "type": "node",
  "id": 226929226,
  "lat": 41.8616080,
  "lon": 12.3755945,
  "tags": {
    "amenity": "fuel",
    "brand": "Agip",
    "fuel:cng": "yes",
    "fuel:lpg": "yes",
    "name": "Agip",
    "operator": "Agip"
  }
},
{
  "type": "node",
  "id": 227645953,
  "lat": 41.8613069,
  "lon": 12.5340322,
  "tags": {
    "amenity": "fuel",
    "brand": "Agip",
    "fuel:cng": "no",
    "fuel:lpg": "yes",
    "name": "Agip",
    "operator": "Agip"
  }
},
with the query
Code:
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“amenity=fuel and fuel:lpg=yes”
*/
[out:json][timeout:25];
// gather results
(
  // query part for: “amenity=fuel and "fuel:lpg"=yes”
  node["amenity"="fuel"]["fuel:lpg"="yes"]({{bbox}});
  way["amenity"="fuel"]["fuel:lpg"="yes"]({{bbox}});
  relation["amenity"="fuel"]["fuel:lpg"="yes"]({{bbox}});
);
// print results
out body;
>;
out skel qt;
__________________
Flickr photos taken with N900 https://www.flickr.com/cameras/nokia/n900/
"Closed source software tells you what you can do. With open source, you decide what software can do for you" Richard Stallman
 

The Following 3 Users Say Thank You to gianko For This Useful Post: