vbgislib.cls

来自「用VB.NET开发的GeoMedia一个实例」· CLS 代码 · 共 37 行

CLS
37
字号
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 1  'NoTransaction
END
Attribute VB_Name = "VBGisLib"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True


Public Function GetEndVertices(geom As Object) As Points

Dim n As Long
Dim i As Long
Dim pts As New Points

n = pgeomath.GetKeypointCount(geom)
For i = 1 To n
        If pgeomath.GetKeypointType(geom, i) = PBasic.KeypointConstants.gmktEndVertex Then
                pts.Add GetKeypointPosition(geom, i)
                'MsgBox (i)
        End If
Next i

Set GetEndVertices = pts

End Function

Public Function PointOnSegment(StartPoint As Point, EndPoint As Point, pt As Point) As Boolean
  PointOnSegment = pgeomath.PointOnSegment(StartPoint, EndPoint, pt)
End Function

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?