Well done on resurrecting an eleven year old post.
Cheers - judging by the replies its still relevant...
Sounds like a shameless plug to sell his stuff
i don't even have anything to sell, so I'm not sure how you got to that conclusion???!!! I have solved this problems myself, - but I'm not gong to hand over that code for free, that's all i meant.
Anyway, nice welcome to the forum, thanks for that.
Getting back to the question in hand...
Having your own post code database is no longer relevant, just use an online service like google maps.
and as nanscombe has said, and as jdraw has coded,
This is a fine method for getting the distance, but 2 things,
1.If you are batching a lot of post codes, using a web API, or Mappoint (or other) automation, it is very slow. The OP talked about batching, so if that batch is 100 or so fine, even a few 1000 would be OK, but more than that and it starts to be an issue.
2. Less of an issue, but, if you are in an office environment, you may not be able to cleanly access the internet for web services, or have a version of Map point where you need it. Also the use of Google in this situation is a bit "grey". Do you have to display a map? not really suitable for automating a task? If you want to use the Google web service without these restrictions, i think prices start around 8k a year.
... the trouble is that UK postcodes are copyright, unlike US post codes
so google will only return the centre (centroid?) of a post code, with a certain degree of inaccuracy. This might be OK for some uses, but in rural areas such as Lincolnshire, say, the google lat/long for the post code can easily be 20-30 miles off the correct location
depending on what you are doing, this may or may not be critical.
In truth if you need 100% accuracy with UK post codes, I think you have to pay for it.
I'm not 100% sure, but I don't think this is true. The Royal Mail PAF has about 30 million records, but there are only about 1.5-2 million actual post codes in use in the UK. For geo coding, and routing I think the data from the Open Point Project (OS) is as good as anyone will "ever" have for this purpose.
I would be amazed if there are many Google locations that are out by 20-30 miles, don't forget that Google maps is a Sat Nav system as well, if this was a "real" problem, then people would never be able to use it. But its a really popular sat nav - not I'm not sure I agree with that statement - that is I don't think paying for it will get you better data - if there are errors they are probably in both data sets - I believe its the OS that do the actual servyings you see. I may well be wrong.
Anyway all good stuff.
Cheers
Ross