XAPI Download

I would like to download the border of Ausria and eventually the motorway network.

With the following link I should be able to download the national boundary…

http://www.informationfreeway.org/api/0.6/way[boundary=national][bbox=9.9,49.24,16.39,45.43]

…however it returns an empty OSM. I guess this is due to the large bbox.

Is there another way I can accomplish this?

I think it’s not boundary=national, rather boundary=administrative, admin_level=2

I just noticed you’re trying to download the border as a way. It’s not, it’s a relation. Relations are another form of OSM data primitive and most boundaries in OSM are stored as relations.

Hi Alex

Sorry for the delay and thanks for the reply. I was sick, without internet.

I just tried the following without any luck…

http://osmxapi.hypercube.telascience.org/api/0.6/*[boundary=administrative][bbox=9.9,49.24,16.39,45.43]
…returned an empty file. I guess too much info?

http://osmxapi.hypercube.telascience.org/api/0.6/*[boundary=administrative][admin_level=2][bbox=9.9,49.24,16.39,45.43]
I have been waiting to two hours. It is still loading so I will keep waiting.

It seems that both ways and relations are tagged with boundary=administrative and admin_level. Can I rely on all ways being tagged like this? My OSM parser is only reading nodes and ways.

Cheers,
Stephen

No luck on the second one either :frowning:

It also delivered and empty file.

The national borders are almost always, if not always, relations. I checked the Austrian border and it is a relation describing it.

I downloaded it with:
http://www.informationfreeway.org/api/0.6/relation[name:en=Austria]

What you get, though, is the relation without it’s constituent parts. You then have to parse it and download each of the ways.

Anyhow, the id of the relation is 16239.