geography::Parse
static constructor Parse (called as type::Parse(...))
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
Syntax at a glance
Parse ( 'geography_tagged_text' )
Work example
Use geography.Parse to construct a spatial instance from Well-Known Text.
Choose geometry or geography and set the intended SRID. Keep the geography type and SRID in the review.
Check your work Parse reads WKT in longitude, latitude order and assigns the geography default SRID 4326.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
SELECT geography::Parse('POINT(-122.349 47.651)').STAsText() AS parsed_point_wkt, geography::Parse('POINT(-122.349 47.651)').STSrid AS parsed_srid;
Open Microsoft Learn for full syntax, permissions, and details for your version.