Aug-18-2020, 03:21 PM
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;
or we can run it like so:
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
but that does not work either!?
-the question is: how to concatenate the request? to be able to run it against the following:
look forward to hear from you
regards martin --
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;
1 2 3 4 5 6 7 |
[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; |
1 2 3 4 5 6 |
[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; |
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
1 2 3 4 5 6 7 |
[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; |
-the question is: how to concatenate the request? to be able to run it against the following:
1 2 3 4 5 6 |
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; |
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