Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Geography maximum limit reached
Message
 
À
11/11/2013 09:14:56
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01587737
Message ID:
01587827
Vues:
80
This message has been marked as the solution to the initial question of the thread.
>If I execute this SQL, I obtain 2493 records:
>
>
>DECLARE @GeographyCoordinate Geography
>DECLARE @Area Geography
>
>SET @GeographyCoordinate=Geography::Point(47.79208,-65.71996,4326)
>SET @Area=@GeographyCoordinate.STBuffer(9931*1000)
>
>SELECT Company.PrimaryKey,@GeographyCoordinate.STDistance(Geography)/1000 AS Distance 
>FROM Company 
>WHERE @Area.STIntersects(Company.Geography)=1
>
>
>However, if I add one kilometer:
>
>
>DECLARE @GeographyCoordinate Geography
>DECLARE @Area Geography
>
>SET @GeographyCoordinate=Geography::Point(47.79208,-65.71996,4326)
>SET @Area=@GeographyCoordinate.STBuffer(9932*1000)
>
>SELECT Company.PrimaryKey,@GeographyCoordinate.STDistance(Geography)/1000 AS Distance 
>FROM Company 
>WHERE @Area.STIntersects(Company.Geography)=1
>
>
>...it cannot find any more record.
>
>Is this a limit of the buffer?


From BOL:

STBuffer (geography Data Type)

distance
Is a value of type float (double in the .NET Framework) specifying the distance from the geography instance around
which to calculate the buffer.

The maximum distance of the buffer cannot exceed 0.999 * π * minorAxis * minorAxis / majorAxis (~0.999 * 1/2 Earth’s
circumference) or the full globe.


So, maybe 9931*1000 exceed max distance, becuase
DECLARE @GeographyCoordinate Geography
DECLARE @Area Geography

SET @GeographyCoordinate=Geography::Point(47.79208,-65.71996,4326)
SET @Area=@GeographyCoordinate.STBuffer(9931*1000)

SELECT @Area
shows NULL as a result.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform