Hi,

There is a database available which maps post codes to grid references.
This is controlled by the Royal Mail.

See http://www.royalmail.com/portal/rm/jump2?mediaId=400088&catId=400084

This may also be interesting: http://www.jibble.org/ukpostcodes/

In case you don't know, UK post codes consist of between 5 and seven
characters which are in four parts with increasing resolution:

City/Area Code (one or two letters)
District (one or two digits)
Sector (one digit)
Unit (two letters)

See http://www.equibrand.co.uk/postcodes.html

They are usually written with a space between the District and Sector.
Eg:
W1 2AA
MK6 3AB
SN25 1DD

This structure means you can easily give a central location for a partial
postcode, ie right truncated to the sector, district or just the city.

Hope this helps,

Andy

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 09 January 2006 13:12
> To: [EMAIL PROTECTED]
> Cc: MySQL List
> Subject: Re: working w/UK postcodes
> 
> > I need to do a search query on the columns called
> >
> > Name of business  "the name of the business"
> > Town             "Local town or city name"
> > Postcode        " this is the same as your zip code"
> > Category        "this is type of business ie dress shop bakers"
> > XY             "this is the table of geo address maped by postcode"
> >
> > I need the search to give me acurate results by the above fields.
> >
> > Example: a user is searching Heywood postcode ol10 1jb  and
> > category hotel,
> > We need to see the nearest hotel to that post code
> > and then the next nearest and so on up to 24 hotels
> >
> >
> > Is there way to query this in the same manner one would do it with
> > US zipcodes?
> 
> The only effective way to do this is with geographic coordinates (your
> XY, I guess).  While US zip codes _generally_ increase east to west and
> _usually_ have a numeric difference somewhat related to their geographic
> distance, this isn't always true.  I know of two "island" zip codes
> (unrelated to those that surround it) in New York State.
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to