Area in Overpass_API

Beim Nachvollziehen des Beispiels zur Straßenliste im Wiki bin ich auf eine Warnung gestoßen.
Das Area Element könnte irgendwann nicht mehr unterstützt werden, wenn ich das richtig lese. Deshalb überlege, wie ich die Straßenliste ohne Area erstelle.

Ich habe aber keine Idee, wie ich dies bewerkstelligen kann.

Bisher sieht meien Abfrage wie folgt aus:

area[name="Dachsenhausen"];
way(area)[highway][name];
out;

Versucht habe ich es mit

(
  rel[name=Dachsenhausen];
  way(r)[highway][name];
  node(w);
  (._;>;);
);
out;

Da stimmt aber noch etwas nicht.

maybe with a poly? :sweat_smile:

[out:csv(name;false)];
way[highway][name](poly:"50.2400889 7.68797 50.2402758 7.6879697 50.2409868 7.6881878 50.2414869 7.6876293 50.2419427 7.6881612 50.242902 7.6883527 50.2434225 7.6876985 50.2435994 7.6870655 50.2439089 7.6862783 50.243897 7.6857502 50.2441164 7.6854272 50.2443682 7.6855602 50.244612 7.6851632 50.2450882 7.6833767 50.2452397 7.6826244 50.2453904 7.6826625 50.2453102 7.6831519 50.2452388 7.6835721 50.2451334 7.6840907 50.2450874 7.6844205 50.2450908 7.6846385 50.2451676 7.6855092 50.2464857 7.6861148 50.2466925 7.6864871 50.2470388 7.6859079 50.2474434 7.6851638 50.2477995 7.6847567 50.2482607 7.6847864 50.248585 7.6853593 50.2466718 7.6888711 50.2489657 7.6925346 50.2506577 7.6894751 50.2534837 7.6843534 50.2574927 7.6981852 50.2673201 7.7028215 50.2688386 7.7030984 50.2680967 7.7038461 50.2675087 7.7046883 50.2675361 7.7048995 50.2677573 7.7048922 50.2677233 7.7071025 50.2684088 7.707679 50.2688511 7.7089637 50.269094 7.7104211 50.2686753 7.7105784 50.2686128 7.7108855 50.2672549 7.7108091 50.2662091 7.711021 50.2651202 7.7154551 50.268167 7.7227341 50.2731046 7.7317616 50.276577 7.7313695 50.2803887 7.7279264 50.2845094 7.7226339 50.2851177 7.7268641 50.2848823 7.7314192 50.2829154 7.7394357 50.2819388 7.7414526 50.2763392 7.7365226 50.2732767 7.739252 50.2718321 7.7420109 50.2709615 7.7424012 50.2702802 7.7427752 50.2699097 7.7431305 50.2696109 7.7433175 50.2679136 7.7452622 50.2676269 7.7461037 50.267168 7.7466481 50.2662045 7.7466481 50.264462 7.7456914 50.2633303 7.7428947 50.2629785 7.7414139 50.2631459 7.7406472 50.2628849 7.7404962 50.2624454 7.740245 50.2619382 7.7396632 50.2618029 7.7393591 50.2613971 7.739293 50.2607071 7.7400675 50.2557955 7.7421033 50.2536827 7.7411819 50.2499932 7.7362192 50.2483679 7.7348208 50.2444316 7.7161173 50.24286 7.7143088 50.2412299 7.7125469 50.2405421 7.7103432 50.240504 7.7081564 50.2410252 7.7043595 50.2406612 7.7022496 50.2404438 7.7010493 50.2403449 7.7004568 50.2402612 7.7000242 50.2399297 7.6992479 50.2395931 7.6984815 50.2392518 7.6977261 50.2382958 7.6952855 50.2380476 7.6949694 50.2397587 7.6951374 50.2406463 7.6952139 50.2411167 7.6952109 50.2417176 7.6933848 50.2416367 7.6921056 50.2412231 7.6909108 50.2401499 7.6899989 50.2400889 7.68797");
out;

https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_polygon_(poly)

1 Like

Greate. Thank you. Now I know (poly: …) and (around:…)

1 Like

Nun habe ich eine Frage. Wie bekomme ich von

rel[name=Dachsenhausen];>;
out;

das poly als Ausgabe?

Meine Ausgabe sieht wie folgt aus:

<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Overpass API 0.7.61.5 4133829e">
<note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note>
<meta osm_base="2023-08-14T19:51:27Z"/>

  <node id="665469271" lat="50.2412299" lon="7.7125470"/>
  <node id="665469301" lat="50.2444316" lon="7.7161174"/>
  <node id="665469333" lat="50.2848823" lon="7.7314193"/>
  <node id="665469341" lat="50.2851177" lon="7.7268642"/>
  <node id="665469344" lat="50.2845094" lon="7.7226340"/>
  <node id="665469584" lat="50.2483679" lon="7.7348209"/>
  <node id="665469594" lat="50.2633303" ...

http://polygons.openstreetmap.fr/
For the test, by relation ID
http://polygons.openstreetmap.fr/get_poly.py?id=536239&params=0
I manually (no script skills) exchanged the columns and adapted it to the format of the query

2 Likes