I am working on a project related to POIs mining and I want to know if there is a way to query all the bridges over rivers for a given country. What I've done is the following: [out:json]; (node["place" = "country"]["int_name" = "Portugal"];way"waterway"="river";way"bridge" = "yes"); out; The thing is that if I increase the radius to cover the hole country I get: runtime error: Query run out of memory using about 2048 MB of RAM I think that I'm missing s.th but I can't find how to do this in a better way since I'm new in working with QL. asked 24 May '17, 16:15 TAYARI |
Most of the statements in the QL take an input set and return an output set. They can be explicit, or there is an implicit default set (with each statement overwriting it). So to make the rivers the input using the default set, that query would just need to be the previous statement. Here's a demo using Overpass Turbo. That uses a small bounding box to demonstrate the approach, the script can be modified to search Portugal:
But the public server rejects the request as too large. One approach to work around that is to use smaller internal regions as the search area and multiple requests. answered 24 May '17, 18:53 maxerickson Great, thank you. That's what I was looking for and yes, to avoid large requests, I am planning to make a grid of the country and query by cell.
(24 May '17, 19:05)
TAYARI
|
You will need something like
way(around:0)[bridge=yes];
, with the rivers as the input to that filter.Not sure the public server will return all of Portugal at once. You'll have to set a large timeout.
Thanks, Would you please clarify how to put the rivers as input ? Is it correct in the request that i have mentioned ?