Create  Edit  Diff  FrontPage  Index  Search  Changes  History  Source  RSS  wikifarm  Login

pointObj.distanceToShape

pointObj.distanceToShape メソッド

説明

引数で与えられたshapeObjまでの最小の距離を返す

public double distanceToShape(
   shapeObj shape
);
Public Function distanceToShape(ByVal shape As shapeObj) As Double

サンプル

コード
Dim _map As mapObj = New mapObj("")
Dim _layer As New layerObj(_map)
Dim _tempshape As New shapeObj(MS_LAYER_TYPE.MS_LAYER_POLYGON)
Dim _pt1 As New pointObj(-142, 41, 0, 0)
Dim _pt2 As New pointObj(-142, 82, 0, 0)
Dim _pt3 As New pointObj(-51, 82, 0, 0)
Dim _pt4 As New pointObj(-51, 41, 0, 0)

_layer.open()
_layer.whichShapes(_map.extent)
_tempshape = _layer.nextShape

Debug.WriteLine(_pt1.distanceToShape(_tempshape).ToString)

→結果 65.6058201731943
マップファイル

影響なし

参照

pointObj メンバ | (global) 名前空間

Last modified:2007/04/11 17:42:03
Keyword(s):
References:[pointObj メンバ]