geography: Extended Static Methods
none (documentation, rules or examples)
What changes
- Input
- none
- Output or change
- none
Syntax at a glance
n/a (reference page)
Work example
Use geography methods for construction from coordinates, text, markup, or binary input.
Choose input format and SRID, then validate type and coordinate order.
Check your work Point takes latitude then longitude; WKT lists longitude then latitude, and each output carries its constructor's SRID.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
SELECT geography::Point(47.651, -122.349, 4326).STAsText() AS point_from_lat_long, geography::Parse('POINT(-122.349 47.651)').STSrid AS parsed_default_srid, geography::GeomFromGml(CONVERT(xml, N'<Point xmlns="http://www.opengis.net/gml"><pos>47.651 -122.349</pos></Point>'), 4326).STAsText() AS point_from_gml;
Open Microsoft Learn for full syntax, permissions, and details for your version.