7

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".

Evan Carroll
  • 65,432
  • 50
  • 254
  • 507

1 Answers1

6

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

Evan Carroll
  • 65,432
  • 50
  • 254
  • 507