Interface ITopologyErrorFeature
- Namespace
- ESRI.ArcGIS.Geodatabase
- Assembly
- ESRI.Server.Geodatabase.dll
Provides access to members that return information about topology errors.
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("F6EF5C20-B9CC-4BFA-B40D-4F0ABB83F3FA")]
public interface ITopologyErrorFeature
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) | Origin OID | Origin ClassID | Destination OID | Destination ClassID | Error Feature Geometry (1) |
|---|---|---|---|---|---|
| Must Not Overlap (Polygons) esriTRTAreaNoOverlap | Yes | Yes | Yes | No | Polygon |
| Must Not Have Gaps esriTRTAreaNoGaps | 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 Other esriTRTAreaAreaCoverEachOther | (2) | Yes | (2) | Yes | Polygon |
| Must Be Covered By esriTRTAreaCoveredByArea | Yes | Yes | No | Yes | Polygon |
| Boundary Must Be Covered By esriTRTAreaBoundaryCoveredByLine | Yes | Yes | No | Yes | Polyline |
| Area Boundary Must Be Covered By esriTRTAreaBoundaryCoveredByAreaBoundary | Yes | Yes | No | Yes | Polyline |
| Contains Point esriTRTAreaContainPoint | Yes | Yes | No | Yes | Polygon |
| Must Not Overlap (Lines) esriTRTLineNoOverlap | Yes | Yes | Yes | No | Polyline |
| Must Not Intersect esriTRTLineNoIntersection | 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 Dangles esriTRTLineNoDangles | Yes | Yes | No | No | Point |
| Must Not Have Pseudos esriTRTLineNoPseudos | Yes | Yes | Yes | No | Point |
| Must Not Self-Overlap esriTRTLineNoSelfOverlap | Yes | Yes | No | No | Polyline |
| Must Not Self-Intersect esriTRTLineNoSelfIntersect | Yes | Yes | No | No | Point, Polyline |
| Must Be Single Part esriTRTLineNoMultipart | Yes | Yes | No | No | Polyline (3) |
| Must Not Intersect Or Touch Interior esriTRTLineNoIntersectOrInteriorTouch | Yes | Yes | Yes | No | Point, Polyline |
| Endpoint Must Be Covered By esriTRTLineEndpointCoveredByPoint | Yes | Yes | No | Yes | Point |
| Must Be Covered By Boundary Of (Points) esriTRTPointCoveredByAreaBoundary | Yes | Yes | No | Yes | Point |
| Must Be Covered By Endpoint Of esriTRTPointCoveredByLineEndpoint | Yes | Yes | No | Yes | Point |
| Point Must Be Covered By Line esriTRTPointCoveredByLine | Yes | Yes | No | Yes | Point |
| Must Be Properly Inside esriTRTPointProperlyInsideArea | 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.
Properties
DestinationClassID
ObjectClassID of the destination feature that created the topology error.
int DestinationClassID { get; }
Property Value
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.
DestinationOID
ObjectID of the destination feature that created the topology error.
long DestinationOID { get; }
Property Value
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.
ErrorID
ID of the error.
long ErrorID { get; }
Property Value
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.
IsDeleted
Indicates if this topology error feature has been deleted.
bool IsDeleted { get; }
Property Value
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.
IsException
Indicates if topology error is an exception.
bool IsException { get; }
Property Value
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.
OriginClassID
ObjectClassID of the origin feature that created the topology error.
int OriginClassID { get; }
Property Value
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.
OriginOID
ObjectID of the origin feature that created the topology error.
long OriginOID { get; }
Property Value
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.
ShapeType
The geometry type of the topology error.
esriGeometryType ShapeType { get; }
Property Value
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.
TopologyRule
The topology rule that caused the topology error.
IRule TopologyRule { get; }
Property Value
Remarks
<P>The <STRONG>TopologyRule</STRONG> class is used to define the permissible spatial relationships between features within a topology. Topology rules can be defined with a single feature class or between two feature classes. Topology rules can also be defined to the subtype level of a feature class. Topology rules have an origin and a destination feature class, either of which can be set to the subtype level. Depending on the type of topology rule that is implemented, the destination feature class properties may be irrelevant.</P>
TopologyRuleType
The Object Class for the row.
esriTopologyRuleType TopologyRuleType { get; }
Property Value
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.