leap29
asked on
Radius Search From a Postcode
I'm trying to implement a radius for areas in miles around a certain post code. I have a table in my DB called locations that contain the columns easting and northing. How do I use these to search for all the locations with a 5 mile radius of a certain postcode???
I have looked at all the posts here and there is loads of different codes to work out distance between two points but I can't work out how to adapt it to do what I want it to do.
Is there a post that covers this if so can you point me in the direction of it? If not could you please give me an idea how I should go about this mind boggling task!
Thanks
I have looked at all the posts here and there is loads of different codes to work out distance between two points but I can't work out how to adapt it to do what I want it to do.
Is there a post that covers this if so can you point me in the direction of it? If not could you please give me an idea how I should go about this mind boggling task!
Thanks
all you need then, is to wrap up the calculation in a function that accepts the northings and eastings of 2 locations and returns the result of the calculation which you can then slip into your query
Postal codes within a radius
http://mrpmorris.blogspot.com/2008/03/postal-codes-within-radius.html
http://mrpmorris.blogspot.com/2008/03/postal-codes-within-radius.html
ASKER
"all you need then, is to wrap up the calculation in a function that accepts the northings and eastings of 2 locations and returns the result of the calculation which you can then slip into your query"
Do you have an example of how to do this??
Do you have an example of how to do this??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.ordnancesurvey.co.uk/oswebsite/aboutus/reports/misc/calculate.html