"Paul Aspinall" <pa**@aspy.co.ukwrote in message
news:0g*******************@fe2.news.blueyonder.co. uk...
Can anyone recommend a suitable way of calculating distances between UK
post codes??
For that, you need to get hold of the longitude and latitude of each
postcode. This is available from various sources, notably (as you might
imagine!) the Post Office, but it's quite expensive. There are upwards of 2
million postcodes in the UK, so you'll need some sort of RDBMS to hold the
data.
Armed with this, it's simple trigonometry - Pythagorus' theorem, and all
that... 10 years or so ago I did a contract for a mystery shopping company
which had precisely this requirement - i.e. find me the nearest researchers
to a certain Pizza Hut etc... Stored the data in SQL Server and built a
simple stored procedure which accepted the two postcodes as parameters and
returned the distance between them. I might even have it somewhere, but it's
really a five-minute job to write the T-SQL...
Quite a few companies offer access to the postcode database via webservices
so that companies can integrate address lookup and validation into their
apps - this seems pretty much what you're looking for:
http://www.postcodeanywhere.co.uk/de...umentation/uk/