[talk-ch] Overpass Abfrage auf Postleitzahlen/Gebiete
Christian Nüssli
chrigi at chnuessli.ch
Tue Mar 17 10:38:38 CET 2020
Hi Marc
Thank you very much for your input.
I've managed to do it like this:
/*
This has been generated by the overpass-turbo wizard.
*/
[out:json][timeout:25];
{{geocodeArea:8625 Gossau (ZH)}}->.searchArea;
// gather results
(
nwr["shop"="farm"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
Kind regards.
Christian
-----Ursprüngliche Nachricht-----
Von: talk-ch <talk-ch-bounces at openstreetmap.ch> Im Auftrag von Marc M.
Gesendet: Dienstag, 17. März 2020 10:14
An: talk-ch at openstreetmap.ch
Betreff: Re: [talk-ch] Overpass Abfrage auf Postleitzahlen/Gebiete
Hello,
postcode (only one exist in the country) seems to be a mistake https://taginfo.openstreetmap.ch/keys/postcode
it's postal_code for an area (but this on doesn't exist in osm) or addr:postcode=8625 for each address individually
to query a specific municipality, use the wizard with "in <name of the municipality> for ex [out:xml]; {{geocodeArea:Gossau (ZH) }}->.searchArea; nwr["shop"="farm"](area.searchArea);
out meta;
>;
out meta qt;
Regards,
Marc
Le 17.03.20 à 09:58, Christian Nüssli a écrit :
> Hallo zusammen.
>
>
>
> Ich bräuchte kurz Hilfe von jemandem der sich mit Overpass gut auskennt.
>
> Kurz gesagt würde ich gerne eine Overpass API Abfrage auf eine
> Poltleitzahl begrenzen.
>
> Leider funktionieren bei mir die Abfragen mit den im Wiki aufgeführten
> Beispielen nicht.
>
>
>
> Folgendes habe ich bereits versucht, ich nehme mal als Beispiel
> Hofläden in der Gemeinde Gossau ZH:
>
> //*/
>
> /This has been generated by the overpass-turbo wizard./
>
> /The original search was:/
>
> /“shop=farm and postcode:8625”/
>
> /*//
>
> /[out:json][timeout:25];/
>
> /// gather results/
>
> /(/
>
> / // query part for: “shop=farm and postcode:8625”/
>
> / node["shop"="farm"]["postcode"~"8625"]({{bbox}});/
>
> / way["shop"="farm"]["postcode"~"8625"]({{bbox}});/
>
> / relation["shop"="farm"]["postcode"~"8625"]({{bbox}});/
>
> /);/
>
> /// print results/
>
> /out body;/
>
> />;/
>
> /out skel qt;/
>
> / /
>
> Postcode nimmt er mir nicht wirklich als Referenz an. Area hat auch
> nicht geklappt.
>
> Hat jemand eine Ahnung wie ich Overpass Abfragen auf eine bestimmte
> Gemeinde/Gebiet abfragen kann?
>
>
>
> Danke für eure Hilfe!
>
>
>
> Gruess Christian
>
>
>
>
> _______________________________________________
> talk-ch mailing list
> talk-ch at openstreetmap.ch
> http://lists.openstreetmap.ch/mailman/listinfo/talk-ch
>
_______________________________________________
talk-ch mailing list
talk-ch at openstreetmap.ch
http://lists.openstreetmap.ch/mailman/listinfo/talk-ch
More information about the talk-ch
mailing list