STGeomFromWKB (type de données geography)

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

Syntaxe

STGeomFromWKB ( 'WKB_geography' , SRID )

Arguments

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

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

Types des valeurs de retour

SQL Server type de retour  : geography

Type de retour CLR : SqlGeography

Notes

Le type OGC de l'instance geography retourné par STGeomFromText() est défini sur l'entrée WKB correspondante.

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 STGeomFromWKB() pour créer une instance geography.

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

Voir aussi

Autres ressources