overpass turbo query

Hi there!
I’m new to OSM.
There is a camping site http://www.openstreetmap.org/way/25275551 which is mapped as “way” instead of type “node”. I ran an overpass query to return all nodes with KV pair “tourism:camp_site” within this area and obviously beforementioned one was skipped. Then I crafted more complex query:

(node["tourism"="camp_site"](45.9292444051284,6.873536109924316,45.94388370311093,6.904606819152832);way["tourism"="camp_site"](45.9292444051284,6.873536109924316,45.94388370311093,6.904606819152832););(._;>;);out body;;

which returned “Mer ge Glace” camping site as well. My goal was to query for all camp sites in this area and convert results to gpx, so I can use them as waypints in my Garmin device. After conversion, all the camp sites described as nodes in OSM are created as waypoints but “Mer de Glace” is created as route. Is this camp site mapped correctly in OSM? Is there another - more proper way to accomplish the goal I described above?

regards,
Arnis

You should also include relations in your query.

Yes, objects mapped as area are better than just a simple node (more information).

With QGIS for example you can transform areas into nodes and then convert into GPX.
menu → Vector → Geometry tools → polygon centroid

Hello Arnis,

also have a look at the “user interface” for overpass-api, called http://wiki.openstreetmap.org/wiki/Overpass_turbo

There is a wizard modus where you can enter e.g. tourism=camp_site … and you will get a query to all nodes, ways and relations with that key-value-pair inside the vivible bounding box or a defined area.

Hi! Tell me how to get at the same time 2 query?

<osm-script output="json">
  <query type="area">
    <has-kv k="name" regv="Беларусь|Российская Федерация|Україна"/>
  </query>
  <query type="way">
    <area-query/>
    <has-kv k="hazard"/>
  </query>
</osm-script>
<osm-script output="json">
  <query type="area">
    <has-kv k="name" regv="Беларусь|Российская Федерация|Україна"/>
  </query>
  <query type="relation">
    <area-query/>
    <has-kv k="protect_class" regv="16"/>
  </query>
</osm-script>

Thanks!

I think that’s done with “union”: http://wiki.openstreetmap.org/wiki/Overpass_API#Union