Aracılığıyla paylaş


STGeometryN (veri türü geometri)

Içinde belirtilen bir geometriye döndüren bir geometry collection.

.STGeometryN ( expression )

Bağımsız değişkenler

  • expression
    Is an int expression between 1 and the number of geometry instances in the geometrycollection.

Dönüş Türleri

SQL Server döndürme türü: geometry

CLR dönüş türü: SqlGeometry

Remarks

This yöntem returns null if the parameter is larger than the result of STNumGeometries() and will throw an ArgumentOutOfRangeException if the ifade parameter is less than 1.

Örnekler

The following example creates a MultiPointgeometry collection and uses STGeometryN() to find the second geometry instance of the collection.

DECLARE @g geometry;
SET @g = geometry::STGeomFromText('MULTIPOINT(0 0, 13.5 2, 7 19)', 0);
SELECT @g.STGeometryN(2).ToString();