ジオメトリのチェック

Public Sub CheckGeometryError()
    Dim pFeatureSimplify2 As IFeatureSimplify2
    Set pFeatureSimplify2 = pFeature
     
    Dim pGeometry As IGeometry
    Set pGeometry = pFeature.Shape
         
    Dim enumReason As esriNonSimpleReasonEnum
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleRingOrientation) Then
        Debug.Print "esriNonSimpleRingOrientation"
    End If
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleSegmentOrientation) Then
        Debug.Print "esriNonSimpleSegmentOrientation"
    End If
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleShortSegments) Then
        Debug.Print "esriNonSimpleShortSegments"
    End If
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleSelfIntersections) Then
        Debug.Print "esriNonSimpleSelfIntersections"
    End If
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleUnclosedRing) Then
        Debug.Print "esriNonSimpleUnclosedRing"
    End If
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleEmptyPart) Then
        Debug.Print "esriNonSimpleEmptyPart"
    End If
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleMismatchedAttributes) Then
        Debug.Print "esriNonSimpleMismatchedAttributes"
    End If
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleDiscontinuousParts) Then
        Debug.Print "esriNonSimpleDiscontinuousParts"
    End If
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleEmptyZValues) Then
        Debug.Print "esriNonSimpleEmptyZValues"
    End If
     
    If pFeatureSimplify2.IsSimpleGeometry(pGeometry, esriNonSimpleDuplicateVertex) Then
        Debug.Print "esriNonSimpleDuplicateVertex"
    End If
 
End Sub
  • URLをコピーしました!

この記事を書いた人

伊達と酔狂のGeospatial Communicator。GIS上級技術者、Esri認定インストラクター、CompTIA CTT+ Classroom Trainer、潜水士、PADIダイブマスター、四アマ。WordPress は 2.1 からのユーザーで歴だけは長い。代表著書に『"地図リテラシー入門―地図の正しい読み方・描き方がわかる』。日本地理学会賞(著作発信部門)受賞(2024年)。好きな地図投影法はパース・クインカンシャル図法とマクブライド・トーマス平極四次曲線図法。発言は個人の見解です。

ESRIジャパン株式会社所属、日本地図学会常任委員、青山学院大学非常勤講師兼務(2021年度~2023年度)、ストーリーマップ自己紹介、researchmapポートフォリオ

目次