Export (0) Print
Expand All

STMPolyFromWKB (geometry Data Type)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns a geometry MultiPolygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.

STMPolyFromWKB ( 'WKB_multipolygon' , SRID )


Is the WKB representation of the geometry MultiPolygon instance you wish to return. WKB_multipolygon is a varbinary(max) expression.


Is an int expression representing the spatial reference ID (SRID) of the geometry MultiPolygon instance you wish to return.

SQL Server return type: geometry

CLR return type: SqlGeometry

OGC type: MultiPolygon

The following example uses STMPolyFromWKB() to create a geometry instance:

DECLARE @g geometry; 
SET @g = geometry::STMPolyFromWKB(0x0106000000020000000103000000010000000400000000000000000014400000000000001440000000000000244000000000000014400000000000002440000000000000244000000000000014400000000000001440010300000001000000050000000000000000002440000000000000244000000000000059400000000000002440000000000000694000000000000069400000000000003E400000000000003E4000000000000024400000000000002440, 0);
SELECT @g.STAsText();
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft