Python Forum
concatenate a request to the endpoint of OSM-API?! - how to?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
concatenate a request to the endpoint of OSM-API?! - how to?
#1
hello dear commuity


concatenate a request to the endpoint of OSM-API?! - how to?


 i have worked with the python wrapper - but today i have a simple question... 

we can run a request on overpass-tubro.eu like so;
[out:csv(::id,::type,"name","addr:postcode","addr:city","addr:street","addr:housenumber","website"," contact:email=*")][timeout:300];
(
node[amenity=kindergarten](46.3722761,9.5307487,49.0205264,17.160776);
way[amenity=kindergarten](46.3722761,9.5307487,49.0205264,17.160776);
relation[amenity=kindergarten](46.3722761,9.5307487,49.0205264,17.160776);
);
out;
or we can run it like so:

[out:csv(::id,::type,"name","addr:postcode","addr:city","addr:street","addr:housenumber","website"," contact:email=*")][timeout:600];
area["ISO3166-1"="BR"]->.a;
( node(area.a)[amenity=hospital];
  way(area.a)[amenity=hospital];
  rel(area.a)[amenity=hospital];);
out;
just wanted to concatenate the request in overpass-turbo.eu request to gather the data out of openstreetmap - to get the POI for Hospitals for the following countries


Brasil
France
Argentina
Paraquay
USA

ect.
etx.



and we can use the nwr statement to combine node way and relations in one single step.: see here



[out:csv(::id,::type,"name","addr:postcode","addr:city","addr:street","addr:housenumber","website"," contact:email=*")][timeout:600];
nwr(area["ISO3166-1"="BR"])[amenity=hospital];
nwr(area["ISO3166-1"="FR"])[amenity=hospital];
nwr(area["ISO3166-1"="AR"])[amenity=hospital];)
nwr(area["ISO3166-1"="PA"])[amenity=hospital];)
nwr(area["ISO3166-1"="US"])[amenity=hospital];)
out;
but that does not work either!?
-the question is: how to concatenate the request?  to be able to run it against the following: 
  nwr(area["ISO3166-1"="BR"])[amenity=hospital];
nwr(area["ISO3166-1"="FR"])[amenity=hospital];
nwr(area["ISO3166-1"="AR"])[amenity=hospital];)
nwr(area["ISO3166-1"="PA"])[amenity=hospital];)
nwr(area["ISO3166-1"="US"])[amenity=hospital];)
out;
look forward to hear from you 
regards martin --
Wordpress - super toolkits a. http://wpgear.org/ :: und b. https://github.com/miziomon/awesome-wordpress :: Awesome WordPress: A curated list of amazingly awesome WordPress resources and awesome python things https://github.com/vinta/awesome-python
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how can I correct the Bad Request error on my curl request tomtom 8 5,058 Oct-03-2021, 06:32 AM
Last Post: tomtom
  Concatenate str JohnnyCoffee 2 2,921 May-01-2021, 03:58 PM
Last Post: JohnnyCoffee
  Concatenate two dataframes moralear27 2 1,873 Sep-15-2020, 08:04 AM
Last Post: moralear27
  ImportError: cannot import name 'Request' from 'request' abhishek81py 1 3,922 Jun-18-2020, 08:07 AM
Last Post: buran
  can only concatenate str (not "int") to str gr3yali3n 6 4,103 May-28-2020, 07:20 AM
Last Post: pyzyx3qwerty
  Adding a new endpoint to pdoc3 BBloggsbott 0 1,261 Oct-13-2019, 03:42 PM
Last Post: BBloggsbott
  Concatenate two dictionaries harish 3 2,365 Oct-12-2019, 04:52 PM
Last Post: strngr12

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020