You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2009-10-19 12:31:20

Onato
Member
Registered: 2009-08-20
Posts: 7

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?

Offline

#2 2009-10-20 00:28:08

Alex McKee
Member
From: Gloucester, UK
Registered: 2008-01-17
Posts: 234

Re: XAPI Download

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

Offline

#3 2009-10-20 00:58:38

Alex McKee
Member
From: Gloucester, UK
Registered: 2008-01-17
Posts: 234

Re: XAPI Download

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.

Offline

#4 2009-10-21 15:49:22

Onato
Member
Registered: 2009-08-20
Posts: 7

Re: XAPI Download

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

Offline

#5 2009-10-21 16:01:57

Onato
Member
Registered: 2009-08-20
Posts: 7

Re: XAPI Download

No luck on the second one either :-(

It also delivered and empty file.

Offline

#6 2009-10-22 15:07:09

Alex McKee
Member
From: Gloucester, UK
Registered: 2008-01-17
Posts: 234

Re: XAPI Download

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.

Offline

Board footer

Powered by FluxBB