Hi,

Am 13/08/2019 um 23.41 schrieb Léo El Amri via talk:
> I'm trying to fetch countries, their borders, and their capitals through
> Overpass API, but the server never replies to me (With a timeout:3600
> setting, the server reply with a 502 error after a while).
> I'm only a beginner with this API, so maybe my request is not efficient:
> 
> (
>   node[place=city];
>   node[place=town];
> )->.a;
> rel[boundary=administrative][admin_level=2]->.b;
> (
>   node[place=country];
>   node.a[capital=yes];
>   way[boundary=administrative][admin_level=2];
>   .b;
>   .b >;
> )->.o;
> .o out body;
> 
> What am I doing wrong ? (Should I use another tool for this purpose ?)

That's a lot of data.

Download the planet dump in .osm.pbf format from
planet.openstreetmap.org or a regional extract from
download.geofabrik.de and use Osmium's tags-filter command.

Depending on your goal, it might be sensible do to a rough filtering
with Osmium and then import the OSM file into a PostgreSQL database
using Osm2pgsql.

Best regards

Michael


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
talk mailing list
talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk

Reply via email to