Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM: Postcode Radius Search

date posted 31st March 2008 17:18

I think I've managed to do it albeit a postcode square:

This is how I believe the calculation works.

Target Postcode = postcode from which to create the radius search
Search Radius = number (i.e. 30 miles)
LatitudeIncredment = Calculation (SearchRadius * .01446861 //degrees per
mile)
LongitudeIncrement = Calculation (SearchRadius * .01446861 / Cos ( Radians
( TargetLatitude ) ))


WestLongitudeBounds = Calculation (TargetLongitude - LongitudeIncrement)
EastLongitudeBounds = Calculation (TargetLongitude + LongitudeIncrement)
NorthLongitudeBounds = Calculation (TargetLatitude + LatitudeIncrement)
SouthLongitudeBounds = Calculation (TargetLatitude - LatitudeIncrement)

Ive tested it against multimap etc. And another postcode tool I've been
trialing and it brings back a very similar set of results.



-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Brian
Lycett
Sent: 31 March 2008 18:31
To: FN-FORUM / [EMAIL REMOVED]
Subject: RE: FN-FORUM: Postcode Radius Search


Hi Karl.

The link I gave you has a DB with the first part of the postcode, so a
radius search isn't very accurate as it's going by the whole postcode
area.
So the more accurate your database is, the more useful the results for a
radius search.

If you're after the locations within a radius then the code on the links I
sent you aren't so useful. You need to do it in the SQL query so that you
can limit the result set.
I used the DB in the link I gave you and some disctance calculating SQL I
found elsewhere to create this utility in about an hour (it would have
been quicker if the SQL dump didn't have a stupid bug that I missed).

http://www.wheelybird.com/noncms/postcode/index.php
(that page will only be active for the next few hours).

If you wanted, I could do something like that with your own database. You
didn't say if you wanted it as web application though.

By the way, someone mentioned the legality of the data. You can't
copyright coordinates, but you can copyright an entire database. So as
long as you're using a public domain database or a licensed database, then
there's no legal issue there.

Regards,

Brian.

>
> Brian,
>
> Thanks for this.
>
> I already have 2 files:
>
> 1)
> Just leading in postcode but general UK district coverage I think
> AB10,391978,804275
> AB11,394481,805116
> AB12,389980,799273
> Ca. 3000 records (similar to your link)
>
> 2)
> Full postcodes, but not entire database
> 57.000000,0.000000,AB10 7LE
> 57.145931,-2.165580,AB15 6YJ
> 57.153180,-2.221180,AB15 8UN
> 57.204940,-2.211980,AB21 0GU
> Ca. 3000 records
>
> So I've either got too much info, i.e. AB10 7LE or not enough. i.e.
> AB10...
> it seems
>
> Would this be a separate FM DB and would it need to relate/reference to my
> existing clients DB or would it just bring back the postcode within the
> radius given ?
>
> As I don't need too much detail, just something like this
>
> Search on YO1 (sorted by miles)
> Postcode, Distance (Miles)
> YO1 6, 0.385
> YO1 7, 0.336
> YO1 8, 0.290
> YO1 9, 0.000
> YO10 3, 1.230
> YO10 4, 1.276
> YO23 1, 1.029
> YO24 1, 1.377
> YO24 4, 1.440
> YO26 4, 1.245
> YO30 6, 1.517
> YO30 7, 0.796
> YO31 0, 1.299
> YO31 1, 1.525
> YO31 7, 0.529
> YO31 8, 1.028
> YO31 9, 1.688
>
> How much would you charge to create this ? if you can...
>
>
> Karl
>
> -----Original Message-----
> From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Brian
> Lycett
> Sent: 31 March 2008 16:22
> To: FN-FORUM / [EMAIL REMOVED]
> Subject: Re: FN-FORUM: Postcode Radius Search
>
>
>
> Getting the database is the hard part. The calculations are easy: try
>
http://www.pjenkins.co.uk/blog/index.php/2007/04/04/uk_post_code_distance_ca
> lculation/
>
> The records without the longitude/latitude will be pretty useless for
> this.
> http://www.linuxbox.co.uk/postcode_database.php has a cheap-ish and
> reasonably complete database.
>
> Regards,
>
> Brian.
>
>>
>>>
>>>
>>> Hi everyone,
>>>
>>> I've spent a lot of time looking at potential solutions and wanted to =
>>> find
>>> out if anyone on here can build/develop a quick and easy postcode
>>> search
>>> tool.
>>>
>>> I'm trialing a piece of software screen below:
>>>
>>> http://www.architecturalselect.com/assets/docs/screen.jpg
>>>
>>> this returns postcodes within a certain radius either sorted by
>>> distance
>>> =
>>> or
>>> by postcode.
>>>
>>> I currently have a 3800 db set of postcode records which holds the full
>>> postcode / longitude and latitude coordinates and have access to others
>>> which only hold the postcode in part, i.e. bs1.
>>>
>>> At the minute I don't mind if it's a separate app or a spreadsheet etc
>>> =
>>> but I
>>> would like to be able to have something that is searchable.
>>>
>>> Can anyone in here build something like this ?
>>>
>>>
>>>
>>>
>>> Regards,
>>> =A0
>>> Karl
>>>
>>> Karl McClelland
>>>
>>> Architectural Select Ltd.
>>>
>>> [EMAIL REMOVED]
>>>
>>> +44 (0)7894 552 671
>>> +44 (0)1761 410 704
>>> Skype | karl.mcclelland
>>>
>>> www.architecturalselect.com
>>>
>>> Registered 05985631
>>> Springfield Buildings | Old Mills | Paulton | Bristol | BS39 7SP
>>>
>>> A Carbon Footprint is a measure of the impact human activities have on
>>> =
>>> the
>>> environment in terms of the amount of green house gases produced, =
>>> measured
>>> in units of carbon dioxide. How big is yours? Find out, and then do
>>> something about it! carbonfootprint.com
>>> This email and any files transmitted with it are confidential and =
>>> intended
>>> solely for the use of the individual or entity to whom they are =
>>> addressed.
>>> If you have received this email in error please notify the sender.
>>>
>>> Please note that any views or opinions presented in this email are =
>>> solely
>>> those of the author and do not necessarily represent those of =
>>> architectural
>>> select.
>>> The recipient should check this email and any attachments for the =
>>> presence
>>> of viruses. architectural select accepts no liability for any damage =
>>> caused
>>> by any virus transmitted by this email although we take precautions, so
>>> should you.=20
>>>
>>>
>>>
>>> --
>>> Freelancers, contractors earn more with Prosperity4
>>> Call 0870 870 4414 or visit www.prosperity4.com
>>> and benefit from Inland Revenue approved expenses today.
>>>
>>> To advertise here: http://www.freelancers.net/advertising.html
>>>
>>>
>> --
>> Freelancers, contractors earn more with Prosperity4
>> Call 0870 870 4414 or visit www.prosperity4.com
>> and benefit from Inland Revenue approved expenses today.
>>
>> To advertise here: http://www.freelancers.net/advertising.html
>>
>>
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
>
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
>
--
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.

To advertise here: http://www.freelancers.net/advertising.html



Messages by Day
March 31st 2008
March 30th 2008
March 29th 2008
March 28th 2008
March 27th 2008
March 26th 2008
March 25th 2008
March 24th 2008
March 23rd 2008
March 22nd 2008
March 21st 2008
March 20th 2008
March 19th 2008
March 18th 2008
March 17th 2008
March 16th 2008
March 15th 2008
March 14th 2008
March 13th 2008
March 12th 2008
March 11th 2008
March 10th 2008
March 9th 2008
March 8th 2008
March 7th 2008
March 6th 2008
March 5th 2008
March 4th 2008
March 3rd 2008
March 2nd 2008
March 1st 2008


Messages by Month
December 2008
October 2008
October 2008
August 2008
July 2008
July 2008
May 2008
May 2008
March 2008
March 2008
January 2008


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000