I am using a simple query the one that is in the examples which returns all data in the bounding box. Currently using overpass-api.de/api/. I have been trying for a couple of days thinking that server may be overloaded but i still get this error
-
Maybe your bounding box / viewing area is just too large? What are you trying to do? What is your ultimate goal?– scaiMay 17, 2017 at 6:54
-
What i´m trying to do is to download Europe as a continent with some arab and some asian countries. I wanted to download not fully zoomed , but let´s say about 8 -9 zoom.– Marian PepaMay 17, 2017 at 10:41
-
1This is the wrong approach. If you need OSM data for a large area then simply download one of the country or area extracts.– scaiMay 17, 2017 at 10:56
2 Answers
By default Overpass API has a certain memory limit in place, to control the overall memory consumption of queries. However, you can easily override that default by providing the maxsize
parameter, like shown in the following example. The increased maxsize limit would allow queries up to 2GB. The maximum possible value is a configuration setting on the server.
/*
This is a simple map call.
It returns all data in the bounding box.
*/
[out:xml][maxsize:2000000000];
(
node({{bbox}});
<;
);
out meta;
Also, downloading huge amounts of data in overpass turbo and displaying the results in the browser window is highly discouraged, as it will likely crash your browser. Be sure to use Export -> raw data directly from Overpass API instead to save the results in a file.
-
I am new in this and i am trying to learn step by step. What i do not understand in this , is the part that when i try to export raw data from Overpass API it only downloads an "interpreter" unknown file type which i do not know what to do with. May 17, 2017 at 10:44
-
2It's OSM XML format, just rename
interpreter
to something likemyfile.osm
.– mmdMay 17, 2017 at 10:46 -
@mmd, is it possible to export more than 2GB query? When changing maxsize I get an error, but 2GB throws a "runtime error: Query run out of memory using about 4838 MB of RAM"– JaneJun 3, 2019 at 10:17
-
Increasing the limit above 2GB may be limited by the server configuration and not possible. If you get the error, you need to go for a smaller area. Besides, the error message is a clear indication that you should look into using some OSM extract instead, especially if you're planning to download everything in a very large area: download.geofabrik.de -– mmdJun 3, 2019 at 11:26
-
I've specified the region (Russia), but I need only for villages "node[place=village]" and I don't know how to filter the query. The head of my query is [out:json][maxsize:2000000000]; area["ISO3166-1"="RU"][admin_level=2]; Do you have any idea what way I am to filter villages only?– JaneJun 3, 2019 at 12:45
Don't use Overpass API for downloading large areas. Instead choose one of the country or area extracts.
-
Yeah i could do it country by country , you are right. I also was wondering how do i download these extracts only zoomed to 9 any suggestion ? May 17, 2017 at 11:10
-
1OSM data is independent from zoom levels and usually always includes all details. Zoom level specific settings can usually be found in the stylesheets of renderers but not in the data itself.– scaiMay 17, 2017 at 11:19
-
2@scai: fyi: we have people downloading 1,5GB+ of OSM data, so technically speaking your statement is not exactly matching reality. OTOH, if there's a suitable extract available, that would of course be the better option as it reduces server load.– mmdMay 17, 2017 at 11:26
-
@mmd I just intended to avoid unnecessary traffic on your servers but if you are fine with that then good to know :)– scaiMay 17, 2017 at 11:45