Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

STPolyFromWKB (geography Data Type)

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

STPolyFromWKB ( 'WKB_polygon' , SRID )

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


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

SQL Server return type: geography

CLR return type: SqlGeography

OGC type: Polygon

This method throws a FormatException if the input is not well-formatted.

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

DECLARE @g geography; 
SET @g = geography::STPolyFromWKB(0x01030000000100000005000000F4FDD478E9965EC0DD24068195D3474083C0CAA145965EC0508D976E12D3474083C0CAA145965EC04E62105839D44740F4FDD478E9965EC04E62105839D44740F4FDD478E9965EC0DD24068195D34740, 4326);
SELECT @g.ToString();
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.