geography::STPointFromWKB
static constructor STPointFromWKB (called as type::STPointFromWKB(...))
What changes
- Input
- WKT, WKB, GML or coordinates and SRID
- Output or change
- spatial instance
- Return type
- SQL Server return type: geography CLR return type: SqlGeography OGC type: Point
Syntax at a glance
STPointFromWKB ( 'WKB_point' , SRID )
Work example
Use geography.STPointFromWKB to construct a point from WKB bytes.
Confirm the bytes represent a point and keep SRID in import metadata. Keep the geography type and SRID in the review.
Check your work The WKB is decoded as a Point with SRID 4326, supplied as the second argument.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
SELECT geography::STPointFromWKB(geography::Point(47.651, -122.349, 4326).STAsBinary(), 4326).STAsText() AS decoded_point_wkt;
Open Microsoft Learn for full syntax, permissions, and details for your version.