YouTube | Facebook | X(Twitter) | RSS

ジオメトリのチェック

2016/9/1 (木)

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
  • この記事を書いた人

羽田 康祐

伊達と酔狂のGISエンジニア。GIS上級技術者、Esri認定インストラクター、CompTIA CTT+ Classroom Trainer、潜水士、PADIダイブマスター、四アマ。WordPress は 2.1 からのユーザーで歴だけは長い。 代表著書『"地図リテラシー入門―地図の正しい読み方・描き方がわかる』 GIS を使った自己紹介はこちら。ESRIジャパン(株)所属、元青山学院大学非常勤講師を兼務。日本地図学会第31期常任委員。発言は個人の見解です。

-プログラミング, ArcGIS
-,