Hello there,

I want to export special geodata such as international Airports, railway stations or motorway entrances in Germany from OSM. Is this at all possible without downloading the complete Germany map?

Best regards and thanks once before, Carsten

(German) Hallo,
ich möchte spezielle Geodaten wie z.B. Flughäfen, Bahnhöfe oder Autobahnauffahrten in ganz Deutschland aus OSM exportieren. Ist dies irgendwie möglich ohne sich die komplette Deutschland-Karte herunterzuladen?
Beste Grüße und schon einmal vielen Dank, Carsten

asked 02 Nov '15, 12:07

c_schroeder's gravatar image

c_schroeder
11112
accept rate: 0%

edited 02 Nov '15, 18:50

aseerel4c26's gravatar image

aseerel4c26 ♦
32.2k16241552


http://overpass-turbo.eu/ might be a good place to start. I used it to get a list of all Points tagged "railway:station" in Switzerland, and it worked beautifully. The language is kind of weird, but there's a Wizard where I simply typed "railway stations in switzerland", and I had a piece of code that gave me almost what I wanted. Here's something to get you started:

// Output as JSON and account for my shitty connection
[out:json][timeout:300];

// Limit to DE
{{geocodeArea:Germany}}->.searchArea;
(
    // Get all nodes with the aeroway:aerodrome tag
    node["aeroway"="aerodrome"](area.searchArea);
);
// Print the results
out body;
>; // <- No idea what the hell that is
out skel qt;
permanent link

answered 02 Nov '15, 12:45

balducien's gravatar image

balducien
131112
accept rate: 0%

… and docs are there (mind the links): https://wiki.openstreetmap.org/wiki/Overpass_turbo

(02 Nov '15, 18:51) aseerel4c26 ♦
2

>; would be needed to also fetch all nodes for a way. But as your example fetches nodes only, this is probably a bit of an overkill here. As always, things are modeled in very different ways in OSM, sometimes as nodes, but also quite often as way or even relation. The default statement created by the overpass turbo wizard includes all the 3 of them. Might be a good starting point to get all relevant data...

(02 Nov '15, 20:47) mmd
5

Upvoted purely for

>; // <- No idea what the hell that is
(02 Nov '15, 23:35) Richard ♦
1

A completely off topic note: to get stuff in Switzerland you can use both our overpass api and turbo instances: http://osm.ch/

(02 Nov '15, 23:43) SimonPoole ♦
1

@SimonPoole: even more off topic: do you know if there are some specs available of this Swiss Overpass API instance? Would be great to add them to this wiki page.

(03 Nov '15, 14:03) mmd

Even if downloading a ~4gb file isn't what you want, imho it would be better to just download it. It is avaiable at geofabrik.de. Afterwards you can use osmfilter to reduce the data to what is really needed. For experimenting with osmfilter i would also download a small destrict, maybe Hessen, to get results of your osmfilter command within minutes instead of possibly hours. Those are the times i experienced doing something comparable without an SSD. So using an SSD might be a good idea, if possible.

The advantage over the overpass api is, that you won't have to experiment with timeout values, which you probably would probably have to. Also you would have the result as an .osm file, which can be used for further osm related works, like populating a sql database with Osm2pgsql.

permanent link

answered 02 Nov '15, 20:01

EinFreierNick's gravatar image

EinFreierNick
1214512
accept rate: 50%

edited 02 Nov '15, 20:10

3

Did you know: Overpass API can produce several output formats, amongst them OSM XML format. You just need to replace [out:json] by [out:xml] (=default), as well as out body; >; out skel qt; by out meta; >; out meta; to fetch all the details - or just export it to JOSM from overpass turbo, which has the same effect.

(02 Nov '15, 20:45) mmd
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×288
×1

question asked: 02 Nov '15, 12:07

question was seen: 1,716 times

last updated: 03 Nov '15, 14:03

powered by OSQA