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

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.