Distance Calculation
Author
Discussion

PetrolTed

Original Poster:

34,467 posts

330 months

Thursday 14th October 2004
quotequote all
Has anyone got any experience of distance calculation components/services? e.g. distance between two UK postcodes?

shadytree

8,291 posts

276 months

Thursday 14th October 2004
quotequote all
Use MULTIMAP directions , works that out for you.

Psychobert

6,318 posts

283 months

Thursday 14th October 2004
quotequote all
I've used the route finder on www.theaa.com and found it reasonably good. Can highly recommend TomTom navigator if you want the kit that will calculate this and help you get there..

PetrolTed

Original Poster:

34,467 posts

330 months

Thursday 14th October 2004
quotequote all
Sorry, I didn't make myself clear.

I'm after a solution for use in a programming environment. e.g. an installable component or web service (XML/SOAP etc.).

JamieBeeston

9,294 posts

292 months

Thursday 14th October 2004
quotequote all
My Developer runs a Taxi firm, www.where2guv.com

He had to do something just like this for that, but iirc he had to bespoke his own system for it.

I will ask him if its something easily replicateable, or if not, licensable.

J

Liszt

4,337 posts

297 months

Thursday 14th October 2004
quotequote all
Distance between 2 postcodes is pretty easy as the crow flies type process.

Looked at this for a vehicle delivery application, but it was not accurate enough for a commercial application.

You need route planning type software/ service which when we looked was not cheap to licence on a low overhead operation.

In the end we sat a transport manager in a room for a day with a list of postcodes he covered and he calculated the prices manually.

This was then used as the look up table.

It cost a day of his time as a one off. It is then a question of maintaining the changes.

Brainsaw

152 posts

271 months

Thursday 14th October 2004
quotequote all
If you want straight line distances between 2 full postcodes then www.cgi-interactive-uk.com/software.html should do what you need

As Jamie mentionned I had to write one as I wanted postcode areas rather than full postcodes... so I just got a list of all all postcode areas (from brainstorm.co.uk iirc) .. and then found the XY from parsing info from www.streetmap.co.uk/streetmap.dll?GridConvert?e14&type=postcode
(could have bought the info from www.graticule.com/ .. but we gave them money and they claim they not got it)
.. then it's just simple pythagoras to find distances

If you want to find out driving distances.. then sorry I can't help... multimap or michelin may sell you something.. maybe they won't!

pdV6

16,442 posts

288 months

Thursday 14th October 2004
quotequote all
Brainsaw said:
stuff

My guess is Ted's after a rough estimate for a "sort by distance" option in the classifieds, so that kind of thing should do it...

PetrolTed

Original Poster:

34,467 posts

330 months

Thursday 14th October 2004
quotequote all

PetrolTed

Original Poster:

34,467 posts

330 months

Thursday 14th October 2004
quotequote all
Brainsaw said:
If you want straight line distances between 2 full postcodes then www.cgi-interactive-uk.com/software.html should do what you need


That looks good.

JoolzB

3,549 posts

276 months

Friday 15th October 2004
quotequote all
I've got no idea if this is at all reliable but if you want a cheaper(free) version you could do the math yourself. This webber has a download of the area part of a postcode + its' long+lat and then links to how to convert into distances

www.jibble.org/ukpostcodes/

I've not used it and it's prob not as good and easy to do as the other link but for its use probably good enough?

>> Edited by JoolzB on Friday 15th October 01:12

rjo

851 posts

298 months

Friday 15th October 2004
quotequote all
I think that what you need to look at is GIS; Geagraphical Information System.
These are becoming quite common in, say, the business world where a company rep might be visiting a town and wants a list of all his clients within a certain radius.
Microsoft produce a system that they sell for quite a bit of money but there are plenty of others out there including open source. Perhaps look http://freegis.org/
It's something I want to play with when I get some free time as well.
I remember finding quite a lot of information a couple of months back by googling gis + other terms.


>> Edited by rjo on Friday 15th October 02:44

davidd

6,709 posts

311 months

Friday 15th October 2004
quotequote all
Ted

If you still need something let me know, we did postcode lookup for www.phlirtz.com and a fantastic 'rangefinder' util (or was that mangefinder??).

Mark.S

473 posts

304 months

Sunday 17th October 2004
quotequote all
If you remain strictly legal it can be a costly feature to provide as your required to purchase a license from the post office for the post code data.

Was around £2000/yr for postcode and long/lat co-ords last time I looked.

tim_s

299 posts

281 months

Sunday 17th October 2004
quotequote all
afd postcode plotter www.afd.co.uk/plotter.asp will do the job.

i've used this in .net so it's definately programmable.

>> Edited by tim_s on Sunday 17th October 16:38

tvrforever

3,196 posts

292 months

Sunday 17th October 2004
quotequote all
Ted,

Don't be such a lazy youth!

My final year uni dissertation (1991) was a 2/3D windows route finding and mapping application. Whilst coding the whole thing my take you a while the core element of all map routing systems is "Dijkstra's Algorithm" :-

http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/dijkstra.html

From there it's easy enough to load in the GIS data from many sources (e.g the OS's Oscar data system www.ordnancesurvey.co.uk/oswebsite/products/oscarasset/) and then plot post-code data from the post office onto it.

'tsk youth of today....

PetrolTed

Original Poster:

34,467 posts

330 months

Sunday 17th October 2004
quotequote all
Interesting stuff

thepeoplespal

1,692 posts

304 months

Sunday 17th October 2004
quotequote all
If your prepared to spend a bit of money I know that [url]www.dps-int.com/prod-int.shtml[/url] probably have a product to suit you.

I haven't used this particular product, but have used their full blown scheduling product for doing a few ITT bank tenders without too much bother.

HTH

PetrolTed

Original Poster:

34,467 posts

330 months

Sunday 17th October 2004
quotequote all
In essence all I need is to build a matrix of distances from post code areas to post code areas. I don't need to go down to individual codes.

lanciachris

3,357 posts

268 months

Monday 18th October 2004
quotequote all
Ive done this... but sadly it was 4 years ago and I cant remember how

Helpful as ever.