drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
716 stars 90 forks source link

Area generation with Overpass-API #503

Open angelo-romano opened 6 years ago

angelo-romano commented 6 years ago

Hi all, I have been trying to generate areas from a database clone of Overpass-API and this is proving to be nearly impossible on my machine (Linux Mint with 8GB of RAM). Basically every time I get some kind of error, may it be timeout related, memory related or just processes being killed by the system unilaterally.

I was therefore wondering why area DB files (db/area*) are not being cloned, as that would basically help me quite a lot to have them immediately rather than waiting a day of computation only to find out the creation script went crashing (I only need these info for read-only purposes).

Thanks, with best regards, Angelo

mmd-osm commented 6 years ago

We don't have areas on the machine which creates the clone file. If you don't need areas for every type of object, you could try to throw out those parts in https://github.com/drolbr/Overpass-API/blob/master/src/rules/areas.osm3s which are not relevant for you.

angelo-romano commented 6 years ago

Thanks for your reply. I basically need areas only for countries (and possibly other administrative areas too). Should it be something like that? `

`

mmd-osm commented 6 years ago

I cannot tell from this snippet. Can you post your complete areas rules file, maybe as Github gist. Also, you could simply run your query via osm3s_query, check the results, and if the way/relations are the ones you want to create some areas for, adjust your area rules file accordingly.

drolbr commented 5 years ago

Thanks for your reply. I basically need areas only for countries (and possibly other administrative areas too). Should it be something like that? <query type="relation"> <has-kv k="ISO3166-1:alpha2"/> <has-kv k="name"/> </query>

Basically, yes. That could work. As mmd has written, please post the full rule file to judge whether it should work.