OSM Inspector/Views/Postcodes
The Postcodes view in OSM Inspector shows coverage of postcode polygons and checks postcode polygons for mapping mistakes.
Overview
There are two ways how postcodes are mapped in OpenStreetMap:
- The postcode of a feature can be mapped using
addr:postcode=*(see Karlsruhe_Schema) on objects with addresses like buildings, address nodes and points of interest. - If postcodes are defined as an area, one can add a boundary polygons. If the postcode coverage is identical to an administrative entity (e.g. a municipality), one can just add
postal_code=*to the relation tagged withboundary=administrative. If area of the postcode and the administrative entity are not equal, a seperate postcode boundary relation has to be usedboundary=postal_codeinstead.
Data sources
All data in this view is derived from OSM data.
Data for the whole world is available in this view.
The OSM data processing of this view is done by osmi_postcodes.
Layers
The layers are organized into three sections:
Valid postcode polygons
This layer shows all valid boundary relations. They have to be tagged with postal_code=* and either boundary=administrative or boundary=postal_code.
Intersecting postcode polygons
Areas covered by multiple postal code polygons are shown on this layer. They can be considered to be an error.
Following cases occur frequently:
- An administrative boundary relation (
boundary=administrative) and postal code boundary relation (boundary=postal_code) overlap each other. You should either removepostal_code=*from the administrative relation or delete the postal code relation. - Two administrative boundary relations (
boundary=administrative) overlap each other. If the smaller one is completely covered by the larger one and both have the same postcode, you should delete the smaller one. - Two relations overlap each other and have different postal codes. Check if any of the two is the result of a mapping error, and fix the mistake.
Postcode polygons with errors
This layer shows closed ways and relations tagged with 'postal_code=*' but without boundary=postal_code or boundary=administrative.
If the object is a building or point of interest, change postal_code=* to addr:postcode=*. Otherwise delete postal_code=* if it is located within a valid postal code polygon.
Discussion
Please report processing mistakes on Codeberg. Ask any other questions on the OSM Forum.