private static IEnumerable <SegmentProxy> EnumSegments( [NotNull] Pnt point, [NotNull] IFeature neighbourFeature, double maxNeededDistance) { IIndexedSegments segments = IndexedSegmentUtils.GetIndexedGeometry( neighbourFeature, releaseOnDispose: false); IBox box = GeomUtils.GetExpanded(point, maxNeededDistance); foreach (SegmentProxy segment in segments.GetSegments(box)) { yield return(segment); } }
private int Check([NotNull] IFeature feature, [NotNull] SortedDictionary <SegmentPart, SegmentParts> nearList, [CanBeNull] IEnvelope processEnvelope) { // using (IIndexedGeometry geom = GetIndexedGeometry((IFeature)row, false)) // TODO revise, causes IClone.IsEqual to return incorrect results afterwards (at least for Z-only differences) const bool releaseOnDispose = true; using (IIndexedSegments indexedGeometry = IndexedSegmentUtils.GetIndexedGeometry(feature, releaseOnDispose)) { IList <Subcurve> missingSegments = GetMissingSegments(feature, indexedGeometry, nearList); return(missingSegments != null ? ReportErrors(feature, missingSegments, processEnvelope) : 0); } }