Using Postcode Data

We're seeing more and more websites that are using postcode information to provide information to users. Here are a couple of ways that postcode info can be used:

Calculating distance

One common task is to calcuate the distance between two points... which in practice means between two postcodes. Those of you who remember your Pythagoras will have an idea how we do it.

In this example, there's one fixed postcode - W4 3DD (our address) - and one "variable" postcode that you can enter into the following form:

Enter a postcode here to find its distance from W4 3DD in London:

*Postcode
* Denotes required field

Find my nearest...

While calculating the distance between postcodes is easy to do, it's not terribly useful.

A more common application is to "find my nearest...".

Enter a postcode here to find your 10 nearest Wi-Fi Hotspots:

*Postcode
* Denotes required field

How does it work?

Here's what happens behind the scenes:

  1. The geographical position of the entered ("target") postcode is determined.
  2. The system then goes looking for matching Hotspots that are within 1 mile if the target position.
  3. The system then counts the matching Hotspots. If there are fewer than 10 matches, the system expands the area and goes back to step 2 to try again.
  4. Once at least 10 Hotspots have been found, the system calculates the distance from the target position to the position of each of the Hotspots.
  5. The Hotspots are sorted by distance from the target position.
  6. Finally, the list of Hotspots is presented to the user.
 
Call BRAINBOX on 0845 003 0025 BRAINBOX - West London's Premiere Web Development and Content Management Company

Time Taken 0.048079013824463