示例#1
0
        internal static void SetEdgesOnLevels(
            LgData lgData,
            GeometryGraph mainGeometryGraph,
            LgLayoutSettings lgLayoutSettings)
        {
            var nodeZoomLevelCalculator =
                new DeviceIndependendZoomCalculatorForNodes(node => lgData.GeometryNodesToLgNodeInfos[node],
                                                            mainGeometryGraph, lgLayoutSettings, lgLayoutSettings.MaxNumberOfNodesPerTile);

            nodeZoomLevelCalculator.RunAfterFlow(lgData);
            lgData.SortedLgNodeInfos = nodeZoomLevelCalculator.SortedLgNodeInfos;
            lgData.LevelNodeCounts   = nodeZoomLevelCalculator.LevelNodeCounts;
        }
        internal static void SetNodeZoomLevelsAndRouteEdgesOnLevels(
            LgData lgData,
            GeometryGraph mainGeometryGraph,
            LgLayoutSettings lgLayoutSettings) {

            var nodeZoomLevelCalculator =
                new DeviceIndependendZoomCalculatorForNodes(node => lgData.GeometryNodesToLgNodeInfos[node],
                                                            mainGeometryGraph, lgLayoutSettings, lgLayoutSettings.MaxNumberOfNodesPerTile);
            nodeZoomLevelCalculator.Run();
            lgData.SortedLgNodeInfos = nodeZoomLevelCalculator.SortedLgNodeInfos;
            lgData.LevelNodeCounts = nodeZoomLevelCalculator.LevelNodeCounts;
            AssignEdges(lgData, nodeZoomLevelCalculator);
        }
示例#3
0
        internal static void SetNodeZoomLevelsAndRouteEdgesOnLevels(
            LgData lgData,
            GeometryGraph mainGeometryGraph,
            LgLayoutSettings lgLayoutSettings)
        {
            var nodeZoomLevelCalculator =
                new DeviceIndependendZoomCalculatorForNodes(node => lgData.GeometryNodesToLgNodeInfos[node],
                                                            mainGeometryGraph, lgLayoutSettings, lgLayoutSettings.MaxNumberOfNodesPerTile);

            //jyoti this is the place where you might want to bound the theoretical zoom level
            nodeZoomLevelCalculator.Run();
            lgData.SortedLgNodeInfos = nodeZoomLevelCalculator.SortedLgNodeInfos;
            lgData.LevelNodeCounts   = nodeZoomLevelCalculator.LevelNodeCounts;
            AssignEdges(lgData, nodeZoomLevelCalculator);
        }
示例#4
0
        TileStatistic GetOrCreateTileStatistic(Point p)
        {
            Tuple <int, int> t = DeviceIndependendZoomCalculatorForNodes.PointToTuple(_geomGraph.LeftBottom, p,
                                                                                      GetGridSize());
            TileStatistic ts;

            if (tileTableForStatistic.TryGetValue(t, out ts))
            {
                return(ts);
            }

            tileTableForStatistic[t] = ts = new TileStatistic {
                rails = 0, vertices = 0
            };
            return(ts);
        }
示例#5
0
        internal static void SetNodeZoomLevelsAndRouteEdgesOnLevels(
            LgData lgData,
            GeometryGraph mainGeometryGraph,
            LgLayoutSettings lgLayoutSettings)
        {
            //fromDrawingToEdgeInfo = new Dictionary<ICurve, LgEdgeInfo>();
            foreach (var connectedGraph in lgData.ConnectedGeometryGraphs)
            {
                RankTheGraph(lgData, mainGeometryGraph, connectedGraph);
            }

            UpdateRankClusters(lgData);

            var nodeZoomLevelCalculator =
                new DeviceIndependendZoomCalculatorForNodes(node => lgData.GeometryNodesToLgNodeInfos[node],
                                                            mainGeometryGraph, lgLayoutSettings, lgLayoutSettings.MaxNumberNodesPerTile);

            nodeZoomLevelCalculator.Run();
            lgData.SortedLgNodeInfos = nodeZoomLevelCalculator.SortedLgNodeInfos;
            lgData.LevelNodeCounts   = nodeZoomLevelCalculator.LevelNodeCounts;
            RouteEdgesOnLevels(lgData, nodeZoomLevelCalculator, lgLayoutSettings, mainGeometryGraph);
        }