geometry::Point
static constructor Point (called as type::Point(...))
What changes
- Input
- WKT, WKB, GML or coordinates and SRID
- Output or change
- spatial instance
- Return type
- SQL Server return type: geometry CLR return type: SqlGeometry
Syntax at a glance
Point ( X, Y, SRID )
Work example
Use geometry.Point to construct a point from coordinate values.
For geometry pass X then Y. For geography pass latitude then longitude and set the SRID. Keep the geometry type and SRID in the review.
Check your work Point takes X then Y. The point is (3,4) in a flat plane with SRID 0.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
-- Planar geometry. SRID 0 coordinates here are synthetic units, not metres.
DECLARE @point geometry;
SET @point = geometry::Point(3, 4, 0);
SELECT @point.STAsText() AS constructed_point,
@point.STX AS x_coordinate,
@point.STY AS y_coordinate,
@point.STSrid AS result_srid,
@point.STIsValid() AS result_is_valid;
Open Microsoft Learn for full syntax, permissions, and details for your version.