SqlGeography インスタンスからの距離が指定した値以下となる、すべての地点の和集合を表す geography オブジェクトを返します。
名前空間: Microsoft.SqlServer.Types
アセンブリ: Microsoft.SqlServer.Types (Microsoft.SqlServer.Types.dll)
構文
'宣言
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := False)> _
Public Function STBuffer ( _
distance As Double _
) As SqlGeography
'使用
Dim instance As SqlGeography
Dim distance As Double
Dim returnValue As SqlGeography
returnValue = instance.STBuffer(distance)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public SqlGeography STBuffer(
double distance
)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public:
SqlGeography^ STBuffer(
double distance
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)>]
member STBuffer :
distance:float -> SqlGeography
public function STBuffer(
distance : double
) : SqlGeography
パラメーター
- distance
型: System.Double
バッファー計算の対象となる geography インスタンスからの距離を指定する double です。
戻り値
型: Microsoft.SqlServer.Types.SqlGeography
現在の SqlGeography からの距離が指定した値以内にあるすべての地点の和集合を表す double です。
説明
STBuffer メソッドは、BufferWithTolerance で tolerance = distance * .001、relative = false と指定した場合と同様の方法でバッファーを計算します。
バッファーに負の値を指定すると、SqlGeography インスタンスの境界から、指定された距離の範囲内にある地点がすべて削除されます。
使用例
LineString geography インスタンスを作成する例を次に示します。 この例では、STBuffer メソッドを使用して、インスタンスから 1 メートル以内にある領域を返します。
DECLARE @g SqlGeography;
SET @g = SqlGeography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
SELECT @g.STBuffer(1).ToString();