I was wondering if anyone could help me with some pointers on how to write a search with "surrounding town/suburb" search. I have a database list of all towns and their postal codes (for australia) and was wondering if there is someway to leverage this? Kind regards Dan
Create a table to store the ids of surrounding towns for every town. The rest is straightforward from there.
it isnt that simple, with 6 states in a land mass the same size as the US you are talking literally hundreds of thousands of towns. But I did find a little gem called the BSPnumber and BSPName which gives the locality, or basic region, more so the council for that area which may encompass about 15 towns. I plan on using this, otherwise the other way I could go if there is a logical arrangement (there isnt for all) I can do a query that takes the postal code for that suburb and then subtracts say 3 and adds 3 to its number and that will give me the suburb plus 6 surrounding suburbs. Does that make sense?
Danny: I don't know what your database looks like, but I wonder if it's possible to get the same data with latitude / longitude coordinates? Even if you could somehow map data from one source to another, you could then just use those values for comparison.