SQL Flow Field Guide

geography::STMPointFromWKB

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

static constructor STMPointFromWKB (called as type::STMPointFromWKB(...))

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: MultiPoint

Syntax at a glance

STMPointFromWKB ( 'WKB_multipoint' , SRID )

Work example

Use geography.STMPointFromWKB to construct a multi-point value from WKB bytes.

Confirm payload type and SRID before storage. Keep the geography type and SRID in the review.

Check your work The WKB round trip returns the two locations and receives SRID 4326 explicitly.

Practice SQL

Open in SQL Flow

Open the SQL for a walkthrough. Run the example in SQL Server to check its result.

SELECT geography::STMPointFromWKB(s.shape.STAsBinary(), 4326).STNumGeometries() AS location_count FROM (VALUES (geography::STGeomFromText('MULTIPOINT(-122.360 47.656, -122.343 47.656)', 4326))) AS s(shape);

Open Microsoft Learn for full syntax, permissions, and details for your version.