Export (0) Print
Expand All

STMPolyFromWKB (geography 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 geography 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 )

WKB_multipolygon

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

SRID

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

SQL Server return type: geography

CLR return type: SqlGeography

OGC type: MultiPolygon

The following example uses STMPolyFromWKB() to create a geography instance.

DECLARE @g geography;
SET @g = geography::STMPolyFromWKB(0x01060000000200000001030000000100000004000000F4FDD478E9965EC0DD24068195D3474083C0CAA145965EC0508D976E12D34740F4FDD478E9965EC04E62105839D44740F4FDD478E9965EC0DD24068195D3474001030000000100000004000000E7FBA9F1D2955EC08716D9CEF7D34740E7FBA9F1D2955EC0F853E3A59BD447405839B4C876965EC0F853E3A59BD44740E7FBA9F1D2955EC08716D9CEF7D34740, 4326);
SELECT @g.ToString();
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft