コード例 #1
0
        private static string FormatAffectedComponents(
            [NotNull] IEnumerable <string> fieldNames)
        {
            Assert.ArgumentNotNull(fieldNames, nameof(fieldNames));
            List <string> fieldList = fieldNames.ToList();

            Assert.ArgumentCondition(fieldList.Count > 0, "At least one field expected");

            return(Assert.NotNullOrEmpty(EdgeMatchUtils.FormatAffectedComponents(fieldList)));
        }
コード例 #2
0
        public void Clear(WKSEnvelope tileWksBox, WKSEnvelope allWksBox)
        {
            var unhandledErrors = new List <TError>(_attributeErrors.Count);

            foreach (TError error in _attributeErrors)
            {
                if (
                    !EdgeMatchUtils.VerifyHandled(error.BorderConnection.Feature,
                                                  tileWksBox, allWksBox) ||
                    !EdgeMatchUtils.VerifyHandled(error.NeighborBorderConnection.Feature,
                                                  tileWksBox, allWksBox))
                {
                    unhandledErrors.Add(error);
                }
            }

            _attributeErrors.Clear();
            _attributeErrors.AddRange(unhandledErrors);
        }
コード例 #3
0
        public void Clear(WKSEnvelope tileEnvelope, WKSEnvelope allEnvelope)
        {
            var toRemove = new List <TNeighborConnection>();

            foreach (TNeighborConnection neighborConnection in NeighborConnections)
            {
                if (
                    EdgeMatchUtils.VerifyHandled(
                        neighborConnection.NeighborBorderConnection.Feature.Shape,
                        tileEnvelope, allEnvelope))
                {
                    toRemove.Add(neighborConnection);
                }
            }

            foreach (TNeighborConnection remove in toRemove)
            {
                _neighborConnections.Remove(remove);
            }
        }
コード例 #4
0
        public IPolyline GetUnmatchedBoundary([CanBeNull] IPolyline completeBoundary)
        {
            if (completeBoundary == null)
            {
                return(null);
            }

            IPolyline toReduce = GeometryFactory.Clone(completeBoundary);

            foreach (TNeighbors neighbors in Neighbors)
            {
                foreach (TNeighborConnection neighbor in neighbors.NeighborConnections)
                {
                    if (neighbor.IsGap)
                    {
                        continue;
                    }

                    toReduce = EdgeMatchUtils.GetDifference(toReduce, neighbor.CommonLine);
                }
            }

            return(toReduce);
        }