protected override int ExecuteCore(IRow row, int tableIndex) { var feature = row as IFeature; if (feature == null) { return(NoError); } return(_vertexCoincidenceChecker.CheckCoincidence( PointsEnumeratorFactory.Create(feature, null), feature)); }
protected override int FindErrors(IRow row1, int tableIndex1, IRow row2, int tableIndex2) { var feature1 = row1 as IFeature; var feature2 = row2 as IFeature; if (feature1 == null || feature2 == null) { return(NoError); } if (!_vertexCoincidenceChecker.VerifyWithinFeature && (feature1 == feature2)) { return(NoError); } if (_allowedNonCoincidenceConditionSql != null && (feature1 != feature2)) { if (_allowedNonCoincidenceCondition == null) { const bool constraintIsDirected = false; _allowedNonCoincidenceCondition = new ValidRelationConstraint( _allowedNonCoincidenceConditionSql, constraintIsDirected, GetSqlCaseSensitivity()); } string conditionMessage; if (_allowedNonCoincidenceCondition.IsFulfilled(row1, tableIndex1, row2, tableIndex2, out conditionMessage)) { // non-coincidence is allowed between these two features return(NoError); } } if (_pointsEnumerator == null || _pointsEnumerator.Feature != feature1) { _pointsEnumerator = PointsEnumeratorFactory.Create(feature1, _pointSearchEnvelope); } return(_vertexCoincidenceChecker.CheckCoincidence(_pointsEnumerator, feature2)); }