STGeomFromWKB (tipo di dati geography)
Restitusce un'istanza geography da una rappresentazione Well-Known Binary (WKB) OGC (Open Geospatial Consortium).
Sintassi
STGeomFromWKB ( 'WKB_geography' , SRID )
Argomenti
WKB_geography
Rappresentazine WKB dell'istanza geography da restituire. WKB_geography è un'espressione varbinary(max).SRID
Espressione int che rappresenta l'identificatore SRID dell'istanza geography da restituire.
Tipi restituiti
Tipo SQL Server restituito: geography
Tipo CLR restituito: SqlGeography
Osservazioni
Il tipo OGC dell'istanza geography restituita da STGeomFromText() è impostato sull'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 STGeomFromWKB() per creare un'istanza geography.
DECLARE @g geography;
SET @g = geography::STGeomFromWKB(0x010200000002000000D7A3703D0A975EC08716D9CEF7D34740CBA145B6F3955EC08716D9CEF7D34740, 4326);
SELECT @g.ToString();