Hi everyone!
I am quite new to OSM and just heard of Overpass API a few weeks ago on a rC3 talk.
It was taking me some time to understand the query language (I mean, at least to be able to build some working query :D), especially because in most documentation of the API and QL that I found, the missing part for me was a list of existing of key/value pairs that I could use (found it now at https://wiki.openstreetmap.org/wiki/Map_features)
There is a hotel I was visiting in 2008 somewhere in the southern part of France, but in a more rural area, not having industrial or residential buildings around it. I do not know however where it exactly was, as I did loose most of my notes of that trip.
I thought I could maybe find it by creating the following query on Overpass Turbo, which I modified from some example:
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“hotel”
*/
[out:json][timeout:480];
// gather results
(
// query part for: “hotel”
node["tourism"~"hotel|motel"]({{bbox}});
way["tourism"~"hotel|motel"]({{bbox}});
relation["tourism"~"hotel|motel"]({{bbox}});
)->.hotels;
// ["amenity"="restaurant"] was finding also single restaurants, not hotels with restaurant
// ["amenity"="parking"] was finding mostly public parking, not the intended parking space that the hotel had offered in front of their building
// so I tried to query for non-existance of the following in direct surrounings (but it took a lot more time and I think results are not good)
way(around.hotels:20)["landuse"!~"commercial|industrial|residential"]["highway"!~"pedestrian|motorway|trunk|primary|primary_link|motorway_link|trunk_link"]->.parkings;
( node.hotels(around.parkings:20);
way.hotels(around.parkings:20);
rel.hotels(around.parkings:20);
)->.matchingHotels;
// print results
//(.matchingHotels; .parkings;);
(.matchingHotels; );
(._;>;);
out meta;
If someone please could help me on this, to create a not so resource intensive query for hotels surrounded by green area (I mean, like agriculture/vineyards/any intentional or unintentional “green” land that is not a forest)… not situated in front of a motorway or other frequently used street. I do not know if it is possible at all?
Thanks in advance for your thoughts!
-Thomas