GeometryCollection またはそのサブタイプのいずれかに含まれる、指定した geography 要素を返します。
名前空間: Microsoft.SqlServer.Types
アセンブリ: Microsoft.SqlServer.Types (Microsoft.SqlServer.Types.dll)
構文
'宣言
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := True)> _
Public Function STGeometryN ( _
n As Integer _
) As SqlGeography
'使用
Dim instance As SqlGeography
Dim n As Integer
Dim returnValue As SqlGeography
returnValue = instance.STGeometryN(n)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public SqlGeography STGeometryN(
int n
)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)]
public:
SqlGeography^ STGeometryN(
int n
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = true)>]
member STGeometryN :
n:int -> SqlGeography
public function STGeometryN(
n : int
) : SqlGeography
パラメーター
- n
型: System.Int32
1 から GeometryCollection に含まれる SqlGeography インスタンスの数までの数値を表す int 式です。
戻り値
型: Microsoft.SqlServer.Types.SqlGeography
GeometryCollection の指定したインスタンスに該当する SqlGeography 要素です。
説明
このメソッドを GeometryCollection のサブタイプ (MultiPoint や MultiLineString など) で使用するときに、N=1 を指定して呼び出すと、SqlGeography インスタンスが返されます。
パラメーターが STNumGeometries の結果よりも大きい場合、このメソッドは null を返します。また、expression パラメーターが 1 より小さい場合は、ArgumentOutOfRangeException をスローします。