Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The British mail addresses are pretty interesting. We quickly learned that, as you say some postcode have just one or two houses, which may not have numbers, but names.

I'm sure there is a "falsehoods programmers believe about addresses" somewhere.



Ireland can have:

  Foo House
  Townland
  Large town somewhat nearby where the mail comes through but only tangentially near the actual house
  County Bar
Where Townland is optional.

There's a bank address in my town: PTSB Kennedy Road Navan Co Meath

Kennedy Road is about 2 blocks long with ~ 30 shop fronts, and there are numbers on all but one of them.


> Where Townland is optional.

Not really optional in most cases if you're not actually in the "large town somewhat nearby". I would say the large town part is more optional.

You're not going to get post delivered to "Lakeview, Cavan, Co Cavan", but you should be ok with "Lakeview, Killeshandra, Co Cavan".


Kilshandra is a town, the townland for Lakeview would likely be "Portaliff or Townparks". Though to be somewhat fair, Lakeview in Kilshandra is really only unique vs things like "Pond View", "Lough View" or "Yet another body of water view".

In Meath, there's a House address near Garlow Cross where it's Foo House, Johnstown, Co Meath, but Johnstown is 7km away or so.

For those who have not been near there -- It's karst topography with basket of eggs hills where the water table is above ground in many of the valleys.



Amazing. For a e-commerce site I argued that we would save ourself a lot of trouble by simply making the address field one large text field, rather than attempt to making a form that would work for every country and city (looking at you Mannheim).

But apparently that would make data analysis to complicated.


There is a middle ground and some common patterns that can help.

The address field names are fairly standardized[0] and Google has an open dataset (used by Chrome and Android) describing which countries need which fields[1].

I have an older PHP library[2] and a newer Go library[3] that build upon this, while crowdsourcing fixes (since Google hasn't updated their dataset in a while). The Go library allows me to serve all address formats and state lists in a single HTTP request, which can then power a very fast JS widget.

[0] Initially by the OASIS eXtensible Address Language (xAL) which trickled down into everything from maps to HTML5 autocomplete.

[1] https://chromium-i18n.appspot.com/ssl-address

[2] https://github.com/commerceguys/addressing

[3] https://github.com/bojanz/address




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: