For tagging postal codes of streets and areas.
You can tag ways and areas with postal_code=* to describe the postal code of an area or a street. As of the march 2013 the Karlsruhe scheme is well established (see addr=*). The tag addr:postcode=* should be used in the context of addresses for buildings and nodes. In the context of postal area boundarys and ways with the same postcode on both sides of the way postal_code=* is still valid and in widely use.
Postal code systems
( ) = optional
|Country||System||Example||Kosmos rendering rules|
||6797||Kosmos postal code rendering rules/au|
||6797||Kosmos postal code rendering rules/at|
||06797||Kosmos postal code rendering rules/de|
||147202||Kosmos postal code rendering rules/ro|
||99096||Kosmos postal code rendering rules/sp|
||6797||Kosmos postal code rendering rules/ch|
||6797||Kosmos postal code rendering rules/nl|
||W1, SW20||Kosmos postal code rendering rules/uk|
This feature is not rendered in Mapnik or Osmarender at the moment.
Sources of post code data
In an ideal world a databases of postal codes (and the locations they represent) would be managed by a government organisation, and they would share this freely without charges or restrictive licensing, because of the obvious economic benefits. Sadly this is not the case in most countries, and so we follow the same approach as with all of the other types of geo-data. We generally collect and build the data from scratch without copying from other sources. We also avoid using google maps to position things, and avoid copying from any other website/source which does so.
Postcodes from scratch?
Postcodes from scratch? Does this mean knocking on people's doors and asking what their postcode is?
Yes... That's the way we build our map. We survey and discover information on-the-ground. Postcodes are particularly tricky because you can't see them. They have poor verifiability, which in sense means they are not suitable for OpenStreetMap, but they have always been a type of geodata people were interested in releasing for free.
You can also discover postcodes on an individual basis without knocking on doors, by looking out for them on till receipts, restaurant menus. You can even look them up on the official website of the place. There is a slippery slope to watch out for with that. We don't want to systematically copy lots of postcodes from somebody's database.
We can use government or other mapping agency sources where they have taken the sensible step of releasing the data openly, however "use" of such data might be thought about in terms of an import, i.e. converting the data and using it to set key:post_code tags in an automated way in the OpenStreetMap database. Imports require that we are very sure about the compatibility of the license and various other caveats. Import guidelines must be followed. A good alternative might be to devise ways of combining datasets while keeping them separate. For many end uses this can work well, although it will mean that some OpenStreetMap benefits such as Nominatim search matching will not come to pass.
Free the postcode
There is a separate but related project called Free The Postcode which coordinates such efforts as a more focussed database. When you add a postal_code tag to a node in OpenStreetMap, it does not automatically get added to Free The Postcode (currently at least). Free the postcode has seen less activity and interest in recent times. There was always a UK focus, but in the UK the postcode situation has changed with the release of CodePoint (See Free The Postcode#UK for details) Free the postcode may still be useful an relevant elsewhere though.
Example Kosmos Renderings