Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 1.66 KB

multipoint.md

File metadata and controls

49 lines (39 loc) · 1.66 KB
title description author ms.author ms.reviewer ms.date ms.service ms.topic ms.custom helpviewer_keywords monikerRange
MultiPoint
MultiPoint is a collection of zero or more points. The boundary of a **MultiPoint** instance is empty in SQL Database Engine spatial data.
WilliamDAssafMSFT
wiassaf
mlandzic, jovanpop
11/04/2024
sql
conceptual
ignite-2024
MultiPoint geometry subtype [SQL Server]
=azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric

MultiPoint

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance Fabric SQL endpoint Fabric DW FabricSQLDB]

A MultiPoint is a collection of zero or more points. The boundary of a MultiPoint instance is empty.

Examples

Example A.

The following example creates a geometry MultiPoint instance with SRID 23 and two points: one point with the coordinates (2, 3), one point with the coordinates (7, 8), and a Z value of 9.5.

DECLARE @g geometry;  
SET @g = geometry::STGeomFromText('MULTIPOINT((2 3), (7 8 9.5))', 23);  

Example B.

The following example expresses the MultiPoint instance using STMPointFromText().

DECLARE @g geometry;
SET @g = geometry::STMPointFromText('MULTIPOINT((2 3), (7 8 9.5))', 23);  

Example C.

The following example uses the method STGeometryN() to retrieve a description of the first point in the collection.

SELECT @g.STGeometryN(1).STAsText();  

Related content