Correcting dud post codes (mostly EirCodes)

I’ve been through the list here: addr:postcode | Keys | OpenStreetMap Taginfo Ireland and Northern Ireland of EirCodes and UK postcodes in Northern Ireland and the list here of postal districts: addr:postal_district | Keys | OpenStreetMap Taginfo Ireland and Northern Ireland

Both lists need tidying up.

An Eircode is split into a Routing Key (the first 3 characters) and a Unique Identifier (the last 4 characters).

On OSM, we treat the Routing Key as addr:postal_district=*.

On OSM, we treat the full Eircode as addr:postcode=*. We never use just the Unique Identifier.

Of the 36 letters and numbers, some are avoided, e.g. to avoid confusion between the letter ‘o’ and zero. This leaves 25 available characters.

Very few routing keys are used - only 139 of an available 15,625 or theoretical 46,656.

===========================

Dud addr:postcode=*

Just a city or county

  • Co Cavan
  • Co Westmeath
  • Co Wicklow
  • Co. Clare
  • Co. Roscommon
  • Co. Wicklow
  • Dublin
  • Kildare

Just a number (likely to all be Dublin postal districts)

  • 2
  • 4
  • 9
  • 24

Dublin postal districts, not EirCodes.

  • D2
  • D5
  • D05
  • D6w
  • D08
  • D11
  • D12
  • D14
  • D16
  • D18
  • Dublin 2
  • Dublin 4
  • Dublin5
  • Dublin 8
  • Dublin 9
  • Dublin 13
  • Dublin 15
  • Dublin 18
  • Dublin 22
  • Dublin 24

Eircode + other stuff

  • Clare V95
  • Dublin 15, D15 E77C

At best, a fragment of an Eircode

  • F12
  • H53
  • H62
  • H91 DV
  • N39
  • X91
  • E191
  • EYN8
  • K7W0
  • NX3V
  • XC3C

Two EirCodes!

  • F91 PX34 & F91 VP11
  • F91 X023 & F91 X313
  • F91 X856 & F91 YR52
  • F91 Y201 & F91 E124
  • T23 DR5V;T23 PX5T

Too many spaces in EirCode

  • D 02 XE 80
  • V 92 M2S7

NOT an Eircode

  • 1609 (50 km off the coast of Wexford, should be in South Africa)
  • DX 6018 (Likely a DX courier number)
  • HVJ47P (No idea)
  • LA3 2XF (Heysham in England, included because it is on the last node of a ferry route to Warrenpoint)
  • R561 (Road number)
  • Unit 4 (Unit number)
  • WXX7+2MM (Plus Code)
  • WXX7+37M (Plus Code)

===========================

Dud addr:postal_district=*

Just a number.

  • 1
  • 2
  • 4
  • 12
  • 14
  • 15
  • 17
  • 22

All other addr:postal_district=* are in the format addr:postal_district=D01 or addr:postal_district=Dublin 1. I don’t think that poses a particular problem.

===========================

Separately, EIrCode recommends that when EirCodes are stored on a computer system, that the space character should be dropped.

Having a consistent pattern (either all with a space or all without a space) makes them more sortable.

Leaving out the space character makes them more searchable in web searches - the search engines think, for example, that F91 YR52 (Collooney, Sligo) is somehow connected to Y14 YR52 (Arklow, Co. Wicklow), because they both have YR52 in them.

Do we want to delete the space characters from EirCodes (not UK postcodes)?

1 Like

In Northern Ireland, all postcodes are in a single postcode area and start with "BT "for Belfast. The postcodes take the format “BT1 1AA” or “BT11 1AA”, with the two parts separated by a single space character.

This is made up of the outward code (first part - BT1) and the inward code (second part - 1AA).

In Northern Ireland, there are approximately 100 outward codes, from BT1 to BT94. Outward codes in Northern Ireland will always have “BT”, followed by one or two digits, so 3 or 4 characters total. Each large town will have its own outward code, while cities will have several. Villages and rural areas will be associated with a nearby town.

The inward code should always be 3 characters (letters or digits). I understand that the first character will normally be a number, and it is followed by two letters. The number represents a postcode sector (neighbourhood) within a postal district and the two letters are the postcode unit, which represents a building or group of buildings, generally located near to each other.

NOT all post codes are used.

==============================

On superficial inspection of addr:postcode | Keys | OpenStreetMap Taginfo Ireland and Northern Ireland there doesn’t seem to be any major problems, but there may be some postcodes that have too many characters.

Separately, a building might have been mapped with the wrong postcode, e.g. BT12 is in West Belfast, but BT12 6QA is mapped in East Belfast

You can use Nominatim QA Tool to find badly formatted postcodes and fix them.

3 Likes

I can’t profess much knowledge of Eircodes, but your summary of the UK postcodes in the North is sound.

…there may be some postcodes that have too many characters.

I can’t quite figure out how to export from that taginfo page to do some analysis in Excel, but just eyeballing all the BT* postcodes (200ish pages) I don’t detect any that are too short or too long, they all appear to fit the format and include an appropriate space.

Separately, a building might have been mapped with the wrong postcode, e.g. BT12 is in West Belfast, but BT12 6QA is mapped in East Belfast

I went looking for that example and have fixed it; seems to have been mistakenly entered as the company’s HQ postcode (which is located elsewhere), so this one is fixed at least.

All-told, the NI postcodes seem to be in good shape (thanks to whoever has been tidying it, unless it’s just down to good mapping practice).

Given the same behaviour will already apply to UK postcodes (i.e. a search engine may “think”, as you suggest, that BT15 5BJ and BT9 5BJ are beside each other), this doesn’t sound like a good reason to remove the space.

However beyond the above, I have no strong views around retaining or removing the spaces in Eircodes – I see Eircode’s “compter systems” reasoning and also user legibility as having pretty equal value in the debate. Folks in RoI may have stronger views on this than I though :blush:

I think someone might have decided to train(?) the Google Search on UK postcodes, but it just never happened with EirCodes.

A good resource for exploring completeness of UK postcodes on OSM is here:-

(Link points to the BT space, for Northern Ireland)

2 Likes