Blog Post

SQL Server Blog
1 MIN READ

Spatial: WKT vs Static Geography Function Parameter Positioning Is Reversed

BobDorr's avatar
BobDorr
Icon for Microsoft rankMicrosoft
Apr 25, 2022

Be careful, this one caused me problems the other day. The WKT (Well-Known Text) format does not match with the geography static function parameter positioning.  Reference: Point (geography Data Type) - SQL Server | Microsoft Docs

 

select geography::Point(10 /*Lat*/, 91 /*Long*/, 4626).ToString()
POINT (91 10)

Note that the static function accepts Lat, Long and the WKT format is reversed, accepting Long, Lat.

Published Apr 25, 2022
Version 1.0
No CommentsBe the first to comment