Forum Moderators: phranque

Message Too Old, No Replies

UK Postcodes, Area Codes, District Codes

         

maccas

3:16 pm on Jun 14, 2005 (gmt 0)

10+ Year Member



Hi, I am building a directory and I am going to add the abilty for people to seach for other listings that are close to that particular listing.

I am going to have a postcode field for people adding their site. What would be the best method for this? i.e one box for the first 2 letters/digits and another box for the rest? I am not from the UK so any help would be great. Cheers.

narrowboater

3:24 pm on Jun 14, 2005 (gmt 0)

10+ Year Member



In pure user terms there are two possibilities for post codes in the UK.

One is two letters, one digit, a space, one digit, and two letters eg:

AB1 2CD

The other is two letters, one digit, one letter, a space, one digit and two letters eg:

AB1C 2DE

People in the UK are used to typing their postcode in one single input box. They're not always good about putting in the space though!

Hope this helps.

Marketing Guy

3:26 pm on Jun 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



UK postcodes are in the format:

AB12 3CD or in some cases AB1 2CD.

Where:

AB = town or city

12 or 1 = Local area within town

2CD or 3CD = allocated to streets within the area, same concept as telephone numbers, but I think they are allocated on a more logical basis (phone numbers tend to be randomly distributed).

So perhaps deal with it in 2 stages - ask for the first part (eg, EH to indicate Edinburgh) then next part (a number to indicate local part of Edinburgh). The rest is largely irrelevant for business listings unless you're going down to the street level.

EH = Edinburgh
EH7 = Leith within Edinburgh
EH7 1AB = Street within Leith

I'm pretty sure you could get a list or map of regions by postcode - maybe try the Royal Mail site: [royalmail.com...]

MG

maccas

3:46 pm on Jun 14, 2005 (gmt 0)

10+ Year Member



Excellent Thanks.

narrowboater

3:47 pm on Jun 14, 2005 (gmt 0)

10+ Year Member



Oops. MG's more correct than I am on that one. Only thing I'd add is that the system is infuriatingly irregular. The last bit is always a digit and two letters, but the first bit could be AB1, AB12, or in big cities (eg London) AB1A. Unfortunately the UK system is nowhere near as systematic as the USA's zipcodes. (MG - apologies for clouding the water, our posts were just about simultaneous!)

sem4u

3:50 pm on Jun 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The first part of a postcode can also be one letter, plus one of two numbers, e.g. B for Birmingham.

maccas

4:05 pm on Jun 14, 2005 (gmt 0)

10+ Year Member



OK, if I have 2 boxs with a maximium of 4 characters in the first and three in the second would people know to put AB12 or B1 in the first and 2CD in the other? Or should I spell it out for them?

narrowboater

4:11 pm on Jun 14, 2005 (gmt 0)

10+ Year Member



Maccas, this must be sounding confusing for you - I think we're jointly giving you the correct answers though! I'd definitely only give the user one text box to complete - I've never seen a Postcode box split in two.

Marketing Guy

4:12 pm on Jun 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeh we posted at the same time Narrow! :) Sem4u is right too - there are more variations than I put down.

Best bet would either to have 2 boxes (4 and 3 chars) or just stick with the one and set up a method of adding the space or removing to keep the data consistant.

MG

andye

12:48 pm on Jun 15, 2005 (gmt 0)

10+ Year Member



other listings that are close to that particular listing.

If you need to get a specific geographic location for a postcode, then the data you need is the 'postzon' file, from the Royal Mail (search for 'postzon paf').

hth, a.