Dear OSM community,

I'd like to extract all polygons for german postcodes from a planet file. I already know about the german postcode consolidation and that all the ~8200 postcodes of Germany are available with postal_code tag. What I achieved so far is to pipe an extract Germany.pbf file through Osmosis to get all 8200 relations with postcodes in a few-MB file. Now these do not contain polygon lat/lon data but ways/nodes references mostly and therefore QGIS is not able to plot them on a map. With JOSM I can load the missing data for single relations. I guess that fetches all data that I stripped from the relations before. However, the software fails to load all polygons at once, probably due to the limited memory of my computer. I'd like to refrain from doing the manual work of clicking on every single of the 8200 relations and storing them by hand.

Is there a way to extract relations of postal codes with lat/lon values from an extract? Could you provide me with links to the right tools, and maybe, a step-by-step walkthrough? How to resolve all the ways/nodes to lat/lon values?

Any help appreciated. Thanks in advance.

Kind regards

asked 21 Jun '16, 09:42

m4dbunny's gravatar image

m4dbunny
11112
accept rate: 0%


Please go to http://overpass-turbo.eu/s/gUj

Choose there "Export" > "raw data from Overpass API"

Wait 10-15 minutes until the result arrives.

It is a 250 MB sized OSM file that contains all the coordinates you need. You should be able to load that file into QGIS.

The reason why you should neither load that into JOSM nor click "Run" in Overpass Turbo is that it will crash both JOSM or the browser due to its size.

permanent link

answered 21 Jun '16, 16:44

Roland%20Olbricht's gravatar image

Roland Olbricht
6.2k35684
accept rate: 36%

thanks, but that helps only partly. There might be future scenarios where I want to extract even larger data sets. I would appreciate an introduction about how to do this lookup of missing lat/lon values with batch processing on the downloaded extract. Do you have any experience with that?

(23 Jun '16, 16:31) m4dbunny

if you wanto to deal with even bigger datasets, I recommand to download whole raw OSM data for a country or continent via http://wiki.openstreetmap.org/wiki/Planet.osm ... and use http://wiki.openstreetmap.org/wiki/Osmfilter

(24 Jun '16, 21:05) stephan75
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:

×203
×69
×67
×15
×6

question asked: 21 Jun '16, 09:42

question was seen: 2,376 times

last updated: 24 Jun '16, 21:05

powered by OSQA