Partager via


STMPolyFromWKB (type de données geography)

S’applique à :SQL ServerAzure SQL DatabaseAzure SQL Managed Instance

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

Syntaxe

  
STMPolyFromWKB ( 'WKB_multipolygon' , 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_multipolygon
Représentation WKB de l’instance geographyMultiPolygon à retourner. WKB_multipolygon est une expression varbinary(max).

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

Types de retour

Type de retour SQL Server : geography

Type de retour CLR : SqlGeography

Type OGC : MultiPolygon

Exemples

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

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

Voir aussi

Méthodes geography statiques de l’OGC