Partager via


STPointFromWKB (type de données geography)

S’applique à : SQL ServerAzure SQL Database Azure SQL Managed Instance

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

Syntaxe

  
STPointFromWKB ( 'WKB_point' , SRID )  

Remarque

Pour afficher la syntaxe Transact-SQL pour SQL Server 2014 (12.x) et versions antérieures, consultez la Documentation sur les versions antérieures.

Arguments

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

SRID
Expression int qui représente le SRID (ID de référence spatiale) de l’instance geographyPoint à retourner.

Types de retour

Type de retour SQL Server : geography

Type de retour CLR : SqlGeography

Type OGC : Point

Remarques

Cette méthode lève FormatException si l’entrée n’est pas au format approprié.

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

Méthodes geography statiques de l’OGC