Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
meenu.monu
Starting Member
8 Posts |
Posted - 2011-05-25 : 20:53:55
|
in sql 2005i have a table named radius and thre fields are long ,lat,radius long=51,lat=22,radius=2 meterand another table value islong1 =45,lat1=25i want to check long1 and lat1 is inside the radius of 2 meter from long and lat.how can i found that? longitude and latitude are actual location pointsanybdy help me? |
|
meenu.monu
Starting Member
8 Posts |
Posted - 2011-05-28 : 01:49:26
|
please help me to findout a particluar point which is inside the circle or nt. |
 |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-05-28 : 07:19:08
|
If you can calculate the distance between the two points, you would know the answer. I know nothing at all about the geographical calculations, but it would seem to me that you would need to know the radii of the ellipsoid to be able to calculate the distance, wouldn't you?If that is the case, you can calculate it using the Haversine formula. See here: http://www.movable-type.co.uk/scripts/latlong.htmlA SQL implementation of this is in this thread: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81360&whichpage=1 |
 |
|
|
|
|