STPolyFromWKB (geometry データ型)
Open Geospatial Consortium (OGC) の Well-Known Binary (WKB) 表現を基に geometryPolygon インスタンスを返します。
構文
STPolyFromWKB ( 'WKB_polygon' , SRID )
引数
WKB_polygon
返される geometryPolygon インスタンスの WKB 表現です。WKB_polygon は varbinary(max) 式です。SRID
返される geometryPolygon インスタンスの SRID (spatial reference ID) を表す int 式です。
戻り値の型
SQL Server の戻り値の型 : geometry
CLR の戻り値の型 : SqlGeometry
OGC の型 : Polygon
説明
このメソッドは、入力が適切な形式でない場合に、FormatException をスローします。
例
STPolyFromWKB() を使用して geometry インスタンスを作成する例を次に示します。
DECLARE @g geometry;
SET @g = geometry::STPolyFromWKB(0x0103000000010000000400000000000000000014400000000000001440000000000000244000000000000014400000000000002440000000000000244000000000000014400000000000001440, 0);
SELECT @g.STAsText();