geography::STMPointFromText
static constructor STMPointFromText (called as type::STMPointFromText(...))
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
STMPointFromText ( 'multipoint_tagged_text', SRID )
Work example
Use geography.STMPointFromText to construct a multi-point value from WKT.
Validate every coordinate and keep source identity separate from point order. Keep the geography type and SRID in the review.
Check your work The WKT creates a MultiPoint with two locations; each pair is longitude then latitude.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
SELECT geography::STMPointFromText('MULTIPOINT(-122.360 47.656, -122.343 47.656)', 4326).STNumGeometries() AS location_count;
Open Microsoft Learn for full syntax, permissions, and details for your version.