SQL Server Spatial – Using Point Constructor or ST_Point(x,y)

spatialsql server

PostGIS provides two point-constructors

MySQL supports Point(x,y)

In SQL Server, Is there anyway to construct a point from two numeric inputs or reals without going from text first?

I do not see a constructor that takes numbers
in the docs on "Create, Construct, and Query geometry Instances".

Best Answer

SQL Server 2012+

Yes, it's not listed there though. You'll find it documented on the docs of geography::Point(x,y,srsid)

The following example uses Point() to create a geography instance.

geography::Point(47.65100, -122.34900, 4326)

Microsoft calls it an "Extended Static Geography Methods"

It's documented in the SqlGeography Class and the Geometry constructor in the SqlGeometry Class