View Full Version : Branch Locator
Hi guys,
I am currently re-developing a website for a coporate company that has many branches around Australia. They currently have some code for a branch locator using a postcode that tells you what branches are close.
However this code sucks, it doesn't work, for example, when i type my postcode in, the results comes up with Doveton, scoresby and a few other way out suburbs when i live 10 min drive from the city, and there is a branch in the city and a branch in richmond.
Does anyone have an idea how to do a good branch locator or has anyone made one in the past using Australian postcodes?
Cheers
djrobotek
10-03-2006, 10:48 AM
Most of the branch/store locators I have seen are crap - they either ask for a specific postcode and try to find that on the system (which only works if you know the postcodes of the surrounding areas), or they compare your postcode with postcodes that are close to it and work from that, which is fine if you have a bunch of localities with similar postcodes grouped together and a branch in one of them, but some areas have jumps in the postcode numbering system. EG:
Sydney City's postcode is 2000-2004
About 5 mins out of Sydney is Sydney University which is 2006
Next suburb to the Uni is Glebe which has a postcode of 2037 (or something like that)
so if you wanted to do a search for a branch at Syd Uni, the program might locate a branch in the city but if a branch in Glebe is much closer, the program will miss it.
I think you should re-write the books and create a store locator which works properly. I think you should number each branch and store that number as a key. Attached to the key are the postcodes of areas which are close to the region (say a radius of 5 or 10 kms) so when you do a search for a suburb it will post up any branches that are close to it.
I'm not a coder, even though I did study comp science at Sydney Uni, so I can't really help you with the code, but I think the above should work better than the crap locators I've seen.
One way I've seen it done is group the postcodes by federal electorate.
btwong
10-03-2006, 11:20 AM
the only other way i can think of is for each post code to have 4 or 5 "closest postcodes". So for each postcode link/enter in 5 postcodes (or however many you want) that are close by...
i know its long winded, but i cannot think of any other way, than the ones mentioned above...
roddez
10-03-2006, 11:38 AM
There are ways of doing this using GIS based systems. They use geographial systems as opposed to post codes. You may be prompted for a post code, and then have to choose your suburb.
Unfortunately they are often complex and expensive. But at the same time, you might be able to use a third party site to display the information.
Have you thought about a state/region based search method.
ie. choose state, then region, etc. This would serve to display a larger numer of location which might not be a bad thing.
Spingo
10-03-2006, 04:58 PM
FindMap (http://www.findmap.com.au/tables/pcdist.html) will do what you want it to.. It just sucks coz it's expensive though...
You could check out the PHP Class located at http://planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1680&lngWId=8
It has a list of all US Zip Codes with its associated latitude and longitude. You should be able to use similar code with AU post codes provided you can find a suitable list...
:edit: And if only I could see the source to http://basil.bam.com.au/...
dwarfthrower
11-03-2006, 09:50 AM
I'd be going the lattitude/longitude route too. Cross reference the post-codes with their lat/long coordinates. And store your branches with their coordinates. Much easier to work out what's actually close to what.
communicated
07-08-2006, 02:58 PM
Okay, got sick of people trying to charge for this information, which should be freely available, so here it is:
communicatemedia.com.au/postcodes.php
CSV file that contains postcodes, suburbs and their coordinates to 6 decimal places.
Feel free to use it for any purpose.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.