Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proximity search
Message
 
 
To
14/04/2010 16:44:59
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01459851
Message ID:
01460199
Views:
36
>>
>>DECLARE @g geography,
>>    @area geography ;
>>SET @g = geography::Point(47.7795,-65.7191,4326) ; --Petit-Rocher
>>SET @area = @g.STBuffer(250) ;
>>
>>SELECT  locationId,
>>        Latitude,
>>        Longitude,
>>        @g.STDistance(geoPoint) AS distance
>>FROM    ( SELECT    locationId,
>>                    Latitude,
>>                    Longitude,
>>                    geography::Point(Latitude,Longitude,4326) AS geoPoint
>>          FROM      result
>>        ) geoData
>>WHERE   @area.STIntersects(geoData.geoPoint) = 1 ;
>
>I see that this one uses the meters approach. I like that. Also, what does the 4326 stand for?
>
>I tested that and it works fine. Thanks

It's all explained in the second blog post
http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/sql-server-2008-proximity-search-with-th
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform