geography: OGC 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 Both constructors return the same point; WKT uses longitude then latitude, and the WKB constructor receives 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::STPointFromText('POINT(-122.349 47.651)', 4326).STAsText() AS point_from_wkt, geography::STPointFromWKB(geography::Point(47.651, -122.349, 4326).STAsBinary(), 4326).STAsText() AS point_from_wkb;
Open Microsoft Learn for full syntax, permissions, and details for your version.