STGeomCollFromWKB (tipo di dati geography)
Restituisce un'istanza GeometryCollection da una rappresentazione Well-Known Binary (WKB) OGC (Open Geospatial Consortium).
Sintassi
STGeomCollFromWKB ( 'WKB_geometrycollection' , SRID )
Argomenti
WKB_geometrycollection
Rappresentazione WKB dell'istanza GeometryCollection da restituire. WKB_geometrycollection è un'espressione varbinary(max).SRID
Espressione int che rappresenta l'identificatore SRID dell'istanza GeometryCollection da restituire.
Tipi restituiti
SQL Server tipo restituito: geography
Tipo CLR restituito: SqlGeography
Osservazioni
Il tipo OGC dell'istanza geography restituito da STGeomCollFromWKB() è impostato su GeometryCollection, MultiPolygon, MultiLineString o MultiPoint, in base all'input WKB corrispondente.
Questo metodo genera un'eccezione FormatException se l'input non è formattato in modo corretto.
Esempi
Nell'esempio seguente viene utilizzato il metodo STGeomCollFromWKB() per creare un'istanza geography.
DECLARE @g geography;
SET @g = geography::STGeomCollFromWKB(0x01070000000200000001010000007593180456965EC017D9CEF753D34740010200000002000000D7A3703D0A975EC08716D9CEF7D34740CBA145B6F3955EC08716D9CEF7D34740, 4326);
SELECT @g.ToString();