Overpass API: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
K
K
 
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 
'''Overpass API - Gefilterter Download von [[OpenStreetMap]]-Daten in der nativen Struktur Nodes, Ways, Relations.'''
 
'''Overpass API - Gefilterter Download von [[OpenStreetMap]]-Daten in der nativen Struktur Nodes, Ways, Relations.'''
  
Overpass Turbo Services (interaktive Webapp):  
+
Overpass Turbo Services (interaktive Webapp): '''>> Weltweit: http://overpass-turbo.eu/ <<''', Schweiz: http://overpass-turbo.osm.ch/ , Deutschland: http://overpass-api.de/  
* '''>> Weltweit: http://overpass-turbo.eu/ <<'''
 
* Deutschland: http://overpass-api.de/  
 
* Schweiz: http://overpass-turbo.osm.ch/
 
  
 
Overpass QL Query Beispiele:  
 
Overpass QL Query Beispiele:  
Zeile 12: Zeile 9:
  
 
Prompt für '''>> ChatGPT & Co. <<''' (Copy & Paste und ersetze "user query"):
 
Prompt für '''>> ChatGPT & Co. <<''' (Copy & Paste und ersetze "user query"):
 +
 
<pre>
 
<pre>
 
Convert the following natural language query into valid Overpass QL syntax for use on [Overpass Turbo](https://overpass-turbo.eu/):
 
Convert the following natural language query into valid Overpass QL syntax for use on [Overpass Turbo](https://overpass-turbo.eu/):
Zeile 19: Zeile 17:
  
 
**Requirements:**
 
**Requirements:**
- The output must adhere to this [EBNF specification](https://gist.githubusercontent.com/sfkeller/43800cd64014d17c55e40fa5e877fd6a/raw/3410bd8817e47c86e5695388a96ba1db5c0630a7/Overpass_QL_EBNF_v0.2_ChatGPT_generated.txt).
+
1. The generated Overpass QL query must adhere to this [EBNF specification](https://gist.githubusercontent.com/sfkeller/43800cd64014d17c55e40fa5e877fd6a/raw/3410bd8817e47c86e5695388a96ba1db5c0630a7/Overpass_QL_EBNF_v0.2_ChatGPT_generated.txt).
- Use appropriate tags from the [OpenStreetMap Wiki](https://wiki.openstreetmap.org/wiki/DE:How_to_map_a).
+
2. Ensure the use of appropriate tags (with both key and value) sourced from the [OpenStreetMap Wiki](https://wiki.openstreetmap.org/wiki/DE:How_to_map_a) and from [Beautified JOSM presets](https://raw.githubusercontent.com/simonpoole/beautified-JOSM-preset/master/master_preset.xml) to align with the user's intent.
- Prefer geocoding with `geocodeArea` over `area["name"=...]`.
+
3. Prefer geocoding with `geocodeArea` for region-specific queries rather than `area["name"=...]` unless unless a relation, an OSM Id or a geographic wikidata item is given.
- Prefer `nwr` (nodes, ways, relations).
+
4. Use `nwr` to cover nodes, ways and relations, unless the query requires distinct nodes, ways, or relations.
- Choose JSON output with center coordinates (`out center`).
+
5. Prefer JSON output with `out center` (center coordinates) over `out geom` unless there are no nodes involved.
 
</pre>
 
</pre>
  
* Beispiele für "user queries":
+
* Beispiele für erfolgreiche "user queries":
 
** All restaurants including fast_food in Rapperswil-Jona
 
** All restaurants including fast_food in Rapperswil-Jona
 
** All bars around 3000 meters from the adress "Bahnhof Rapperswil-Jona"
 
** All bars around 3000 meters from the adress "Bahnhof Rapperswil-Jona"
** All restaurants within 3000 meters of a public stop
+
** All restaurants within 3000 meters of a public stop in of Switzerland
 
** All restaurants in Kanton Glarus within 200 meters of public transport stops (station, bus_stop, tram_stop, funicular)
 
** All restaurants in Kanton Glarus within 200 meters of public transport stops (station, bus_stop, tram_stop, funicular)
  
 +
* Beispiele für nicht erfolgreiche "user queries": Mountain passes of Switzerland which are navigable with a lake nearby" - siehe [[Overpass QL Beispiele]].
  
 
Einstieg in Overpass QL und API:
 
Einstieg in Overpass QL und API:

Aktuelle Version vom 22. September 2024, 22:40 Uhr

Overpass API - Gefilterter Download von OpenStreetMap-Daten in der nativen Struktur Nodes, Ways, Relations.

Overpass Turbo Services (interaktive Webapp): >> Weltweit: http://overpass-turbo.eu/ <<, Schweiz: http://overpass-turbo.osm.ch/ , Deutschland: http://overpass-api.de/

Overpass QL Query Beispiele:

Prompt für >> ChatGPT & Co. << (Copy & Paste und ersetze "user query"):

Convert the following natural language query into valid Overpass QL syntax for use on [Overpass Turbo](https://overpass-turbo.eu/):

**Natural Language Query:**
<<Insert user query here>>.

**Requirements:**
1. The generated Overpass QL query must adhere to this [EBNF specification](https://gist.githubusercontent.com/sfkeller/43800cd64014d17c55e40fa5e877fd6a/raw/3410bd8817e47c86e5695388a96ba1db5c0630a7/Overpass_QL_EBNF_v0.2_ChatGPT_generated.txt).
2. Ensure the use of appropriate tags (with both key and value) sourced from the [OpenStreetMap Wiki](https://wiki.openstreetmap.org/wiki/DE:How_to_map_a) and from [Beautified JOSM presets](https://raw.githubusercontent.com/simonpoole/beautified-JOSM-preset/master/master_preset.xml) to align with the user's intent.
3. Prefer geocoding with `geocodeArea` for region-specific queries rather than `area["name"=...]` unless unless a relation, an OSM Id or a geographic wikidata item is given.
4. Use `nwr` to cover nodes, ways and relations, unless the query requires distinct nodes, ways, or relations.
5. Prefer JSON output with `out center` (center coordinates) over `out geom` unless there are no nodes involved.
  • Beispiele für erfolgreiche "user queries":
    • All restaurants including fast_food in Rapperswil-Jona
    • All bars around 3000 meters from the adress "Bahnhof Rapperswil-Jona"
    • All restaurants within 3000 meters of a public stop in of Switzerland
    • All restaurants in Kanton Glarus within 200 meters of public transport stops (station, bus_stop, tram_stop, funicular)
  • Beispiele für nicht erfolgreiche "user queries": Mountain passes of Switzerland which are navigable with a lake nearby" - siehe Overpass QL Beispiele.

Einstieg in Overpass QL und API:

Overpass QL Language Documentation:

Support:

Siehe auch: