WikiProject Belgium/Boundaries/postal codes

From OpenStreetMap Wiki
Jump to navigation Jump to search

Postal codes in Flanders and Brussels are complete, but many are still missing in Wallonia (as of Jan 2024). You can view the status here: http://umap.openstreetmap.fr/nl/map/postal-codes-wallonia_1005842. For edits since the start of the project, check this Overpass query.

While the postal code boundaries can be downloaded, the license is restrictive and the data quality is not great.

In some cases, the boundaries coincide with the part-municipalities. In principle, they should not cross municipal boundaries.

Workflow

Data

Access

We can make a good guestimate of postal code data based on the addresses as available in ICAR, the Wallonia address database. The license of this data is compatible with OSM.

Go to https://geoportail.wallonie.be/catalogue-donnees-et-services and search "icar" (searchbox is at the left side). At ICAR - Points d'adresses click "Ajout a mes telechargement". This requires to make an account and log in, though that's an easy process.
On the top left of the page, you will now see "Mes paniers" with a "Telecharger" button. This takes you to a settings page.
In the first tab, nothing needs to be changed.
In the second tab, under Decoupage select "Region Wallonne"
In the third tab, choose "Je souhaite une license". Under Nature choose Particulier, and at Description "Using ICAR to improve OSM data". At the end date, fill in a date in the far future.

After you submit, you will receive a confirmation mail. After a little while, you will get a download link by e-mail.

Rendering

Make sure you have QGIS installed.
Unzip all the files with name "ADR" to a folder of your choice.
Open QGIS and drag and drop ADR.shp to QGIS
Right click on ADR in the Layers overview and click on 'properties', then go to Symbology
Choose "Categorized" in the top dropdown and CODE_POSTA in the Value field.
Then click "Classify" (much lower in the interface). In the color ramp, choose "Random colors".

Now you will see all the addresses coloured by their postal codes. In some places, you will have to zoom in a lot to have an idea of where exactly the boundary is. In other cases, the border line could be anywhere in the middle of the fields.
For better orientation, install the QuickMapServices plugin. Under "Web", you will now have a new menu where you can choose an OSM background map.

Mapping

Use this query to spot an area to work on: https://overpass-turbo.eu/s/1FB1
Use this query to download data to JOSM: https://overpass-turbo.eu/s/1FB2 . This query will make sure you have all the admin boundaries in the area, so you can reuse those lines. Make sure JOSM is running and has no data layer. Then in Overpass Turbo, choose Export and JOSM.

In JOSM, set background map OSM & PICC in JOSM.
You will likely need to draw new lines. Draw them, based on the addresses in your QGIS. Try to respect the visual as close as possible. Try to avoid drawing over buildings. Postal codes can be weird, but note that the ICAR data can also be wrong or that sometimes an address in OSM can get an explicit postal code tag to overrule the are it is physically in. If you are doubting too much, add it to the "Difficult cases" section below.
Mark the new lines with "boundary=postal_code". You might want to add a fixme to explain it's a rather rough outline.
In rare cases, you can reuse train lines or rivers. You'll need to download those and split them to purpose. Add the "boundary=postal_code" tag.

Where your new lines snap to existing boundary lines, you'll likely need to split those at the junction. When all the lines that together form the postal code are available, select them all and choose "Tools" "Create multipolygon". At a minimum, add/change the tags:

boundary=postal_code
postal_code=XXXX
type=boundary

Add the role outer to all members of this relation.

You have now created a new postal code area!

Hint: the random coloring can result in two nearby postal codes being in very similar colors. Under Layer properties > Color ramp, click "Shuffle random colours" to update the colors to change that.

Difficult cases

  • Industrial zone Just south-east of E403 / E42 junction (see map). It's a mix of postal code 7503 and 7501. Perhaps bad ICAR data?