You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2014-01-28 13:39:42

kerosin
Member
From: Kiel
Registered: 2011-12-19
Posts: 269

Overpass API: Umkreissuche anhand einer Koordinate

Hallo,

Ich möchte gerne folgende Overpass-Abfrage realisieren:
- Als Ausgangspunkt dient eine Koordinate z.B. 50.73448,7.09959
- ausgehend von diesem Punkt möchte ich in einem Radius von z.B. 500 Metern suchen
- gesucht wird ein Objekt mit einem bestimmten Namen und Tag

Im Language Guide ist ein Beispiel zu sehen, das nahe an meine Bedürfnisse kommt:

node["name"="Bonn"];
node
  (around:1000)
  ["name"="Gielgen"];
out body;

Allerdings wird da von einem Knoten "Bonn" ausgegangen - nicht von einer Koordinate.

Vielen Dank im Voraus!

Grüße

Offline

#2 2014-01-28 13:47:41

couchmapper
Member
Registered: 2013-02-17
Posts: 462

Re: Overpass API: Umkreissuche anhand einer Koordinate

Schau mal hier rein:

https://github.com/drolbr/Overpass-API/issues/23 wrote:

For the syntax: In XML, you can use now the attributes lat and lon:

<around radius="100" lat="50.7" lon="7.1"/> <print/> 

In QL, these two values are added with commas as separators:

http://overpass-api.de/api/interpreter72?data=node(around:100,50.7,7.1);out;

Offline

#3 2014-01-28 13:47:56

rayquaza
Member
From: DE-BW
Registered: 2012-11-18
Posts: 2,007

Re: Overpass API: Umkreissuche anhand einer Koordinate

Das Leaflet-Plugin RevealOSM macht das, da könntest du abschauen wink

Offline

#4 2014-01-28 14:05:15

kerosin
Member
From: Kiel
Registered: 2011-12-19
Posts: 269

Re: Overpass API: Umkreissuche anhand einer Koordinate

Super das ging ja sehr schnell!

Mein Resultat sieht nun wie folgt aus:

relation
  (around:1000,54.27654,9.92075)
  [name~Westensee]
  [natural=water];

(._;>;); 
out;

Danke für die schnelle Hilfe!

Somit erledigt!

Viele Grüße

Offline

Board footer

Powered by FluxBB