ITopologyErrorFeature Interface

Provides access to members that return information about topology errors.

Members

Name Description
Read-only property DestinationClassID ObjectClassID of the destination feature that created the topology error.
Read-only property DestinationOID ObjectID of the destination feature that created the topology error.
Read-only property ErrorID ID of the error.
Read-only property IsDeleted Indicates if this topology error feature has been deleted.
Read-only property IsException Indicates if topology error is an exception.
Read-only property OriginClassID ObjectClassID of the origin feature that created the topology error.
Read-only property OriginOID ObjectID of the origin feature that created the topology error.
Read-only property ShapeType The geometry type of the topology error.
Read-only property TopologyRule The topology rule that caused the topology error.
Read-only property TopologyRuleType The Object Class for the row.

ITopologyErrorFeature.DestinationClassID Property

ObjectClassID of the destination feature that created the topology error.

Public ReadOnly Property DestinationClassID As Integer
public int DestinationClassID {get;}

Remarks

The OriginClassID and DestinationClassID properties represent the object class IDs of the origin and destination feature classes of the topology rule.

In general, all topology errors for which only the origin class has been specified will return values for the OriginClassID and OriginOID properties and a value of zero for the DestinationClassID and DestinationOID properties. The exception is for topology errors generated from the esriTRTNoGaps rule, which will return a value of zero for the OriginOID as well as DestinationClassID and DestinationOID properties. In addition, topology rules whose origin and destination feature class have been specified will generally return zero for the Destination feature class properties. The exceptions to this rule are:

  • esriTRTAreaNoOverlap
  • esriTRTAreaNoOverlapArea
  • esriTRTLineNoOverlap
  • esriTRTLineNoIntersection
  • esriTRTLineNoOverlapLine
  • esriTRTLineNoIntersectOrInteriorTouch

The exception to both of these statements is the esriTRTAreaAreaCoverEachOther rule, which may generate topology errors referencing either the Origin or Destination feature class.

ITopologyErrorFeature.DestinationOID Property

ObjectID of the destination feature that created the topology error.

Public ReadOnly Property DestinationOID As Long
public long DestinationOID {get;}

Remarks

The OriginOID and DestinationOID properties represent the object IDs of the origin and destination features that created the topology error.

In general, all topology errors for which only the origin class has been specified will return values for the OriginClassID and OriginOID properties and a value of zero for the DestinationClassID and DestinationOID properties. The exception is for topology errors generated from the esriTRTNoGaps rule, which will return a value of zero for the OriginOID as well as DestinationClassID and DestinationOID properties. In addition, topology rules whose origin and destination feature class have been specified will generally return zero for the Destination feature class properties. The exceptions to this rule are:

  • esriTRTAreaNoOverlap
  • esriTRTAreaNoOverlapArea
  • esriTRTLineNoOverlap
  • esriTRTLineNoIntersection
  • esriTRTLineNoOverlapLine
  • esriTRTLineNoIntersectOrInteriorTouch

The exception to both of these statements is the esriTRTAreaAreaCoverEachOther rule, which may generate topology errors referencing either the Origin or Destination feature class.

ITopologyErrorFeature.ErrorID Property

ID of the error.

Public ReadOnly Property ErrorID As Long
public long ErrorID {get;}

Remarks

The ErrorID of a topology error feature is not unique across all topology error features within the topology, but it is unique for each topology error feature geometry type. For example, while a topology error feature with polygon geometry may have the same ErrorID as a topology error feature with point geometry, the ErrorID will be unique for all topology error features with polygon geometry.

Combining the ErrorID and ShapeType of a topology error feature will result in a unique value within the topology.

ITopologyErrorFeature.IsDeleted Property

Indicates if this topology error feature has been deleted.

Public ReadOnly Property IsDeleted As Boolean
public bool IsDeleted {get;}

Remarks

The IsDeleted property returns a boolean value indicating if the topology error has been deleted by applying a fix to its relevant features. This property is intended for use by developers creating custom topology error fixes.

ITopologyErrorFeature.IsException Property

Indicates if topology error is an exception.

Public ReadOnly Property IsException As Boolean
public bool IsException {get;}

Remarks

Denotes if the topology error has been marked as an exception. Exceptions arise when a topology rule is purposefully violated. The topology error can be marked as an exception with the ITopologyRuleContainer::PromotetoRuleException method. Marking purposeful topology errors as exceptions allows other clients of the topology to handle them in an appropriate or specific manner, e.g., in reporting or symbolization.

Note that it is also possible to demote an exception or mark the exception as an error with the ITopologyRuleContainer::DemoteFromRuleException method.

ITopologyErrorFeature.OriginClassID Property

ObjectClassID of the origin feature that created the topology error.

Public ReadOnly Property OriginClassID As Integer
public int OriginClassID {get;}

Remarks

The OriginClassID and DestinationClassID properties represent the object class IDs of the origin and destination feature classes of the topology rule.

In general, all topology errors for which only the origin class has been specified will return values for the OriginClassID and OriginOID properties and a value of zero for the DestinationClassID and DestinationOID properties. The exception is for topology errors generated from the esriTRTNoGaps rule, which will return a value of zero for the OriginOID as well as DestinationClassID and DestinationOID properties. In addition, topology rules whose origin and destination feature class have been specified will generally return zero for the Destination feature class properties. The exceptions to this rule are:

  • esriTRTAreaNoOverlap
  • esriTRTAreaNoOverlapArea
  • esriTRTLineNoOverlap
  • esriTRTLineNoIntersection
  • esriTRTLineNoOverlapLine
  • esriTRTLineNoIntersectOrInteriorTouch

The exception to both of these statements is the esriTRTAreaAreaCoverEachOther rule, which may generate topology errors referencing either the Origin or Destination feature class.

ITopologyErrorFeature.OriginOID Property

ObjectID of the origin feature that created the topology error.

Public ReadOnly Property OriginOID As Long
public long OriginOID {get;}

Remarks

The OriginOID and DestinationOID properties represent the object IDs of the origin and destination features that created the topology error.

In general, all topology errors for which only the origin class has been specified will return values for the OriginClassID and OriginOID properties and a value of zero for the DestinationClassID and DestinationOID properties. The exception is for topology errors generated from the esriTRTNoGaps rule, which will return a value of zero for the OriginOID as well as DestinationClassID and DestinationOID properties. In addition, topology rules whose origin and destination feature class have been specified will generally return zero for the Destination feature class properties. The exceptions to this rule are:

  • esriTRTAreaNoOverlap
  • esriTRTAreaNoOverlapArea
  • esriTRTLineNoOverlap
  • esriTRTLineNoIntersection
  • esriTRTLineNoOverlapLine
  • esriTRTLineNoIntersectOrInteriorTouch

The exception to both of these statements is the esriTRTAreaAreaCoverEachOther rule, which may generate topology errors referencing either the Origin or Destination feature class.

ITopologyErrorFeature.ShapeType Property

The geometry type of the topology error.

Public ReadOnly Property ShapeType As esriGeometryType
public esriGeometryType ShapeType {get;}

Remarks

The ShapeType property will return the topology error feature. Topology error features will be one of three possible geometry types: esriGeometryPolygon , esriGeometryPolyline or esriGeometryPolyline. Several topology rules can produce topology error features of different shape types, use the ITopologyRule::ErrorShapeTypes method to determine the valid shape types for each rule.

ITopologyErrorFeature.TopologyRule Property

The topology rule that caused the topology error.

Public ReadOnly Property TopologyRule As IRule
public IRule TopologyRule {get;}

Remarks

The TopologyRule property returns an IRule object corresponding to the topology rule. This can be used to get the unique ID of the topology rule using IRule::ID or obtain an ITopologyRule object. The TopologyRule provides access to the properties of the topology rule that the Error feature has violated. Note that each Topology has one inherent rule, esriTRTFeatureLargerThanClusterTolerance. It can be identified by checking the ITopologyErrorFeature::TopologyRuleType property.

ITopologyErrorFeature.TopologyRuleType Property

The Object Class for the row.

Public ReadOnly Property TopologyRuleType As esriTopologyRuleType
public esriTopologyRuleType TopologyRuleType {get;}

Remarks

The TopologyRuleType property returns the type of topology rule associated with the topology error feature from the esriTopologyRuleType constants. Each topology has one inherent rule, esriTRTFeatureLargerThanClusterTolerance, which identifies features that are less than the defined cluster tolerance for the topology.

Classes that implement ITopologyErrorFeature

Classes Description

Remarks

The ITopologyErrorFeature interface provides access to the properties of error features in a topology. Topology errors are generated for each instance of a topology rule that is determined to be invalid during the validation process. Topology error features can also be deleted during the validation process.

Error features cannot be edited directly, so while you can use interfaces such as IFeature on a TopologyErrorFeature, calling methods such as IFeature::Value or IFeature::Store will fail. Topology errors have an associated geometry that can be used for rendering or fixing the error. Topology errors are persisted with the topology.

The only modification that can be made to an error feature is to mark it as an exception. An error feature that is marked as an exception will return True for its IsException property. Error features can be marked as exceptions by passing them to the ITopologyRuleContainer::PromoteToRuleException method, and those marked as exceptions can be demoted to error features by passing them to ITopologyRuleContainer::DemoteFromRuleException.

The following table shows the properties of error features created by violations of each rule. If an object ID or class ID is not applicable for a feature, a value of zero will be returned.

Name(esriTopologyRuleType value) OriginOID OriginClassID DestinationOID DestinationClassID Error FeatureGeometry (1)
Must Not Overlap (Polygons)esriTRTAreaNoOverlap Yes Yes Yes No Polygon
Must Not Have GapsesriTRTAreaNoGaps No Yes No No Polyline
Must Not Overlap With (Polygons)esriTRTAreaNoOverlapArea Yes Yes Yes Yes Polygon
Must Be Covered By Feature Class Of (Polygons)esriTRTAreaCoveredByAreaClass Yes Yes No Yes Polygon
Must Cover Each OtheresriTRTAreaAreaCoverEachOther (2) Yes (2) Yes Polygon
Must Be Covered ByesriTRTAreaCoveredByArea Yes Yes No Yes Polygon
Boundary Must Be Covered ByesriTRTAreaBoundaryCoveredByLine Yes Yes No Yes Polyline
Area Boundary Must Be Covered ByesriTRTAreaBoundaryCoveredByAreaBoundary Yes Yes No Yes Polyline
Contains PointesriTRTAreaContainPoint Yes Yes No Yes Polygon
Must Not Overlap (Lines)esriTRTLineNoOverlap Yes Yes Yes No Polyline
Must Not IntersectesriTRTLineNoIntersection Yes Yes Yes No Point, Polyline
Must Be Covered By Feature Class Of (Lines)esriTRTLineCoveredByLineClass Yes Yes No Yes Polyline
Must Not Overlap With (Lines)esriTRTLineNoOverlapLine Yes Yes Yes Yes Polyline
Must Be Covered By Boundary Of (Lines)esriTRTLineCoveredByAreaBoundary Yes Yes No Yes Polyline
Must Not Have DanglesesriTRTLineNoDangles Yes Yes No No Point
Must Not Have PseudosesriTRTLineNoPseudos Yes Yes Yes No Point
Must Not Self-OverlapesriTRTLineNoSelfOverlap Yes Yes No No Polyline
Must Not Self-IntersectesriTRTLineNoSelfIntersect Yes Yes No No Point, Polyline
Must Be Single PartesriTRTLineNoMultipart Yes Yes No No Polyline (3)
Must Not Intersect Or Touch InterioresriTRTLineNoIntersectOrInteriorTouch Yes Yes Yes No Point, Polyline
Endpoint Must Be Covered ByesriTRTLineEndpointCoveredByPoint Yes Yes No Yes Point
Must Be Covered By Boundary Of (Points)esriTRTPointCoveredByAreaBoundary Yes Yes No Yes Point
Must Be Covered By Endpoint OfesriTRTPointCoveredByLineEndpoint Yes Yes No Yes Point
Point Must Be Covered By LineesriTRTPointCoveredByLine Yes Yes No Yes Point
Must Be Properly InsideesriTRTPointProperlyInsideArea Yes Yes (4) Yes Point

(1) Every Topology rule can return an error that is a point geometry, because of the special case where the error geometry is completely collapsed. If a feature has all of its vertices within the cluster tolerance, it will collapse in on itself during validation and an error feature with a point geometry will be created.

(2) Error features caused by a "Must Cover Each Other" rule will have either an origin object ID or a destination object ID, but not both.

(3) An error feature will be created for each part of a polyline that contains multiple parts.

(4) If a point is on the boundary of a polygon from the destination class, an error feature will be created, and the polygon's object ID will be returned as the destination object ID. If a point does not touch any polygons of the destination class, no destination object ID will be returned.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.