Hello everyone, I'm successfully extracting all buildings in a city with the following query
where $AREA_ID is the relation id of the city + 3600000000. It works for many cities such as Paderborn, Düsseldorf, Frankfurt and Munich. However, it does not work for Cologne, Berlin and Hamburg. The problem is that the query exceeds the memory limit, the default being 2GB. I managed to increase it by using [maxsize: ... ] but it still says "Query run out of memory using about 4845 MB of RAM." and I can't increase the memory limit more on the public overpass servers (and I don't have a private server with more ram). Is there a way to make this query consume less memory? Why does it even exceed these limits? If 2GB is enough for a city like Munich then almost 5GB should be enough for Cologne (Cologne is smaller than Munich). I've found old posts suggesting to use regular expressions to filter for attributes, but that doesn't seem to make anything better. asked 03 Dec '16, 21:43 OSM noob |
Please try the following query:
This enforces the order of filtering. It is necessary in this case to first filter for all ways in Cologne, then filter for all buildings. If you count the number of buildings then you will recognize that Cologne has indeed almost double the number of buldings than Munich. answered 03 Dec '16, 22:06 Roland Olbricht |
If you want to run this query for more that just a few cities, consider downloading a Germany (or Europe, or World) data file, importing it into a database with osm2pgsql (using a modified import style file that only processes buildings and possibly administrative areas if you need them), and then running SQL queries against that database. answered 03 Dec '16, 23:56 Frederik Ramm ♦ |