STPolyFromWKB(geometry 数据类型)STPolyFromWKB (geometry Data Type)
适用于:Applies to: SQL ServerSQL Server(所有支持的版本)
SQL ServerSQL Server (all supported versions)
Azure SQL 数据库Azure SQL Database
Azure SQL 数据库Azure SQL Database
SQL ServerSQL Server(所有支持的版本)
SQL ServerSQL Server (all supported versions)
Azure SQL 数据库Azure SQL Database
Azure SQL 数据库Azure SQL Database
从开放地理空间信息联盟 (OGC) 已知二进制 (WKB) 表示形式中返回 geometryPolygon 实例。Returns a geometryPolygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
语法Syntax
STPolyFromWKB ( 'WKB_polygon' , SRID )
备注
若要查看 SQL Server 2014 及更早版本的 Transact-SQL 语法,请参阅早期版本文档。To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.
参数Arguments
WKB_polygonWKB_polygon
希望返回的 geometryPolygon 实例的 WKB 表示形式。Is the WKB representation of the geometryPolygon instance you wish to return. WKB_polygon 是一个 varbinary(max) 表达式。WKB_polygon is a varbinary(max) expression.
SRID SRID
一个 int 表达式,表示希望返回的 geometryPolygon 实例的空间引用 ID (SRID)。Is an int expression representing the spatial reference ID (SRID) of the geometryPolygon instance you wish to return.
返回类型Return Types
SQL ServerSQL Server 返回类型:geometryreturn type: geometry
CLR 返回类型:SqlGeometryCLR return type: SqlGeometry
OGC 类型:PolygonOGC type: Polygon
注解Remarks
如果输入的格式不正确,此方法将引发 FormatException。This method will throw a FormatException if the input is not well-formatted.
示例Examples
下面的示例使用 STPolyFromWKB()
创建 geometry
实例。The following example uses STPolyFromWKB()
to create a geometry
instance.
DECLARE @g geometry;
SET @g = geometry::STPolyFromWKB(0x0103000000010000000400000000000000000014400000000000001440000000000000244000000000000014400000000000002440000000000000244000000000000014400000000000001440, 0);
SELECT @g.STAsText();