Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

GBR postcodes #219

@ernesmb

Description

@ernesmb

Postcodes for GBR are usually of the form:

CF5 1JY

where the first part references a certain area and the second part a smaller area within.

People are usually working with this type of postcodes, but they don't match the records in our geocoder, as it only works with the first part of the postcode.

A transformation like this is needed to get only the first part:

SELECT 
  *,
  trim(trailing ' ' from (
    substring(postcode from 1 for 4)
    )
  ) AS postcode_fixed
FROM table

However, that causes a lesser quality result, as we are lacking the second level of precision.
The database at Geonames does recognise the postalcodes with two parts (check it here).

Would it be possible to integrate that info in our geocoding database?

this other issue may be related: #162

cc/ @rafatower @iriberri

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions