Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proximity search
Message
 
 
À
14/04/2010 16:44:59
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01459851
Message ID:
01460199
Vues:
35
>>
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform