STPointFromWKB (type de données geography)

Retourne une instance geographyPoint à partir d'une représentation OGC (Open Geospatial Consortium) WKB (Well-Known Binary).

Syntaxe

STPointFromWKB ( 'WKB_point' , SRID )

Arguments

  • WKB_point
    Représentation WKB de l'instance geographyPoint à retourner. WKB_point est une expression varbinary(max).

  • SRID
    Expression int qui représente l'ID de référence spatial (SRID) de l'instance geographyPoint à retourner.

Types des valeurs de retour

Type de retour SQL Server : geography

Type de retour CLR : SqlGeography

Type OGC : Point

Notes

Cette méthode lève un FormatException si l'entrée n'est pas correctement mise en forme.

Exemples

L'exemple suivant utilise la méthode STPointFromWKB() pour créer une instance geography.

DECLARE @g geography;
SET @g = geography::STPointFromWKB(0x010100000017D9CEF753D347407593180456965EC0, 4326);
SELECT @g.ToString();

Voir aussi

Autres ressources