internal static void RankGraph(LgData lgData, GeometryGraph mainGeometryGraph) {
//fromDrawingToEdgeInfo = new Dictionary<ICurve, LgEdgeInfo>();
            foreach (var connectedGraph in lgData.ConnectedGeometryGraphs)
                RankTheGraph(lgData, mainGeometryGraph, connectedGraph);

            UpdateRanksOfClusters(lgData);
        }
 EdgePicker(LgData lgData, IZoomLevelCalculator nodeZoomLevelCalculator,
            int nodeCountOnLevel) {
     this.lgData = lgData;
     this.nodeZoomLevelCalculator = nodeZoomLevelCalculator;
     this._nodeCountOnLevel = nodeCountOnLevel;
     zoomLevel = (int) nodeZoomLevelCalculator.SortedLgNodeInfos[nodeCountOnLevel - 1].ZoomLevel;
 }
Exemple #3
0
        internal static void SetEdgeInfosZoomLevelsAndIcreaseRanks(LgData lgData,
                                                                   IZoomLevelCalculator nodeZoomLevelCalculator,
                                                                   int nodeCountOnLevel)
        {
            var edgePicker = new EdgePicker(lgData, nodeZoomLevelCalculator, nodeCountOnLevel);

            edgePicker.Run();
        }
Exemple #4
0
        static bool AddLevel(LgData lgData, IZoomLevelCalculator nodeZoomLevelCalculator, int nodeCountOnLevel, LgEdgeInfo[] edgeInfos)
        {
            var zoomLevel        = (int)nodeZoomLevelCalculator.SortedLgNodeInfos[nodeCountOnLevel - 1].ZoomLevel;
            var edgeInfosOfLevel = edgeInfos.TakeWhile(ei => ei.ZoomLevel <= zoomLevel).ToList();

            lgData.AddLevel();
            return(edgeInfosOfLevel.Count() == lgData.GeometryEdgesToLgEdgeInfos.Count);
        }
Exemple #5
0
 EdgePicker(LgData lgData, IZoomLevelCalculator nodeZoomLevelCalculator,
            int nodeCountOnLevel)
 {
     this.lgData = lgData;
     this.nodeZoomLevelCalculator = nodeZoomLevelCalculator;
     this._nodeCountOnLevel       = nodeCountOnLevel;
     zoomLevel = (int)nodeZoomLevelCalculator.SortedLgNodeInfos[nodeCountOnLevel - 1].ZoomLevel;
 }
Exemple #6
0
        internal static void RankGraph(LgData lgData, GeometryGraph mainGeometryGraph)
        {
//fromDrawingToEdgeInfo = new Dictionary<ICurve, LgEdgeInfo>();
            foreach (var connectedGraph in lgData.ConnectedGeometryGraphs)
            {
                RankTheGraph(lgData, mainGeometryGraph, connectedGraph);
            }

            UpdateRanksOfClusters(lgData);
        }
        static void AssignEdges(LgData lgData, IZoomLevelCalculator nodeZoomLevelCalculator) {
            AssignEdgesToLevels(lgData, nodeZoomLevelCalculator);
            var edgeInfos = SortEdgeInfosByZoomLevel(lgData);

            foreach (int nodeCountOnLevel in nodeZoomLevelCalculator.LevelNodeCounts) {
                bool finished = AddLevel(lgData, nodeZoomLevelCalculator, nodeCountOnLevel, edgeInfos);
                if (finished)
                    break;
            }
        }
 static void UpdateRanksOfClusters(LgData lgData) {
     foreach (var lgInfo in lgData.GeometryNodesToLgNodeInfos.Values) {
         foreach (var cluster in lgInfo.GeometryNode.ClusterParents) {
             LgNodeInfo clusterLgInfo;
             if (lgData.GeometryNodesToLgNodeInfos.TryGetValue(cluster, out clusterLgInfo))
                 if (clusterLgInfo.Rank < lgInfo.Rank)
                     clusterLgInfo.Rank = lgInfo.Rank;
         }
     }
 }
Exemple #9
0
        static void MaybeScaleDownTheNodeBoundaryAndAddToNodes(double levelZoom, LgData lgData, Node node, Set <Node> nodes)
        {
//            var nodeInfo = lgData.GeometryNodesToLgNodeInfos[node];
//            if (nodeInfo.ZoomLevel > levelZoom)
//                if (nodeInfo.OriginalCurveOfGeomNode != null)
//                    node.BoundaryCurve =
//                        nodeInfo.OriginalCurveOfGeomNode.Transform(
//                            PlaneTransformation.ScaleAroundCenterTransformation(LgLayoutSettings.PathNodesScale,
//                                                                                node.Center));
            nodes.Insert(node);
        }
Exemple #10
0
        static GeometryGraph CreateTmpGraphForRouting(LgData lgData, IEnumerable <LgEdgeInfo> edgeInfosOfLevel, int levelZoom)
        {
            var tmpGraphForRouting = new GeometryGraph
            {
                Nodes = FindNodesOfLevelGraph(edgeInfosOfLevel, levelZoom, lgData),
                Edges = new SimpleEdgeCollection(edgeInfosOfLevel.Select(ei => ei.Edge))
            };

            tmpGraphForRouting.UpdateBoundingBox();
            return(tmpGraphForRouting);
        }
        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);
        }
Exemple #12
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;
        }
Exemple #13
0
        static void AssignEdges(LgData lgData, IZoomLevelCalculator nodeZoomLevelCalculator)
        {
            AssignEdgesToLevels(lgData, nodeZoomLevelCalculator);
            var edgeInfos = SortEdgeInfosByZoomLevel(lgData);

            foreach (int nodeCountOnLevel in nodeZoomLevelCalculator.LevelNodeCounts)
            {
                bool finished = AddLevel(lgData, nodeZoomLevelCalculator, nodeCountOnLevel, edgeInfos);
                if (finished)
                {
                    break;
                }
            }
        }
Exemple #14
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);
        }
Exemple #15
0
        static bool RouteEdgesOnLevel(LgData lgData, IZoomLevelCalculator nodeZoomLevelCalculator,
                                      LgLayoutSettings lgLayoutSettings, int nodeCountOnLevel, LgEdgeInfo[] edgeInfos, GeometryGraph mainGeomGraph)
        {
            var zoomLevel        = (int)nodeZoomLevelCalculator.SortedLgNodeInfos[nodeCountOnLevel - 1].ZoomLevel;
            var edgeInfosOfLevel = edgeInfos.TakeWhile(ei => ei.ZoomLevel <= zoomLevel).ToList();

            var tmpGraphForRouting = CreateTmpGraphForRouting(lgData, edgeInfosOfLevel, zoomLevel);

            //LayoutAlgorithmSettings.ShowGraph(tmpGraphForRouting);

            var level = lgData.AddLevel(zoomLevel);

            RouteEdges(lgLayoutSettings, tmpGraphForRouting, lgData, level);
            //lgData.ExtractRailsFromRouting(tmpGraphForRouting.Edges, zoomLevel);
            return(edgeInfosOfLevel.Count() == lgData.GeometryEdgesToLgEdgeInfos.Count);
        }
Exemple #16
0
 static void UpdateRanksOfClusters(LgData lgData)
 {
     foreach (var lgInfo in lgData.GeometryNodesToLgNodeInfos.Values)
     {
         foreach (var cluster in lgInfo.GeometryNode.ClusterParents)
         {
             LgNodeInfo clusterLgInfo;
             if (lgData.GeometryNodesToLgNodeInfos.TryGetValue(cluster, out clusterLgInfo))
             {
                 if (clusterLgInfo.Rank < lgInfo.Rank)
                 {
                     clusterLgInfo.Rank = lgInfo.Rank;
                 }
             }
         }
     }
 }
Exemple #17
0
        static void RouteEdgesOnLevels(LgData lgData, IZoomLevelCalculator nodeZoomLevelCalculator, LgLayoutSettings lgLayoutSettings, GeometryGraph mainGeomGraph)
        {
            AssignEdgesToLevels(lgData, nodeZoomLevelCalculator);

            var edgeInfos = SortEdgeInfosByLevel(lgData);

            foreach (int nodeCountOnLevel in nodeZoomLevelCalculator.LevelNodeCounts)
            {
                bool finished = RouteEdgesOnLevel(lgData, nodeZoomLevelCalculator, lgLayoutSettings, nodeCountOnLevel, edgeInfos,
                                                  mainGeomGraph);
                if (finished)
                {
                    break;
                }
            }
            Console.WriteLine("routing is done");
        }
        static void RankTheGraph(LgData lgData,
                                          GeometryGraph mainGeometryGraph, GeometryGraph geomGraph) {

            var nodeArray = geomGraph.Nodes.ToArray();
            var flatGraph = new GeometryGraph {
                Nodes = new SimpleNodeCollection(nodeArray),
                Edges =
                    new SimpleEdgeCollection(
                        geomGraph.Edges.Where(e => !(e.Source is Cluster) && !(e.Target is Cluster)))
            };

            var pageRank = Centrality.PageRank(flatGraph, 0.85, false);
            double normalizer = (double)geomGraph.Nodes.Count/mainGeometryGraph.Nodes.Count;
            for (int i = 0; i < nodeArray.Length; i++) {
                var node = nodeArray[i];
                Debug.Assert(node != mainGeometryGraph.RootCluster);
                lgData.GeometryNodesToLgNodeInfos[node].Rank = normalizer*pageRank[i];
            }
        }
Exemple #19
0
        static void RouteEdges(LgLayoutSettings lgLayoutSettings,
                               GeometryGraph tmpGraphForRouting,
                               LgData lgData,
                               LgLevel level)
        {
            int routedEdges = 0;

            Console.WriteLine("\nrouting for level {0}", level.ZoomLevel);
            var router = new SplineRouter(tmpGraphForRouting, lgLayoutSettings.EdgeRoutingSettings.Padding,
                                          lgLayoutSettings.EdgeRoutingSettings.PolylinePadding, Math.PI / 6,
                                          null)
            {
                RouteMultiEdgesAsBundles     = false,
                UseEdgeLengthMultiplier      = true,
                UsePolylineEndShortcutting   = false,
                UseInnerPolylingShortcutting = false,
                // LineSweeperPorts = GetLineSweeperPorts(tmpGraphForRouting, tileSize),
                AllowedShootingStraightLines = false,
                ContinueOnOverlaps           = true,
                CacheCornersForSmoothing     = true,
                ReplaceEdgeByRails           =
                    e => {
                    routedEdges++;
                    if (routedEdges % 1000 == 0)
                    {
                        Console.Write(".");
                    }
                    level.RegisterRailsOfEdge(lgData.GeometryEdgesToLgEdgeInfos[e]);
                },
                Bidirectional = true
            };    //new BundlingSettings {KeepOverlaps = true, EdgeSeparation = 0, StopAfterShortestPaths = true});

            router.Run();
            level.CreateRailTree();
            foreach (var edge in tmpGraphForRouting.Edges)
            {
                level.FillRailDictionaryForEdge(edge);
                edge.Curve = null;
            }
            // level.RunLevelStatistics(lgData.GeometryNodesToLgNodeInfos.Where(e=>e.Value.ZoomLevel<=level.ZoomLevel).Select(p=>p.Key));
        }
Exemple #20
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="geometryGraph"></param>
        /// <param name="lgLayoutSettings"></param>
        /// <param name="cancelToken"></param>
        public LgInteractor(GeometryGraph geometryGraph, LgLayoutSettings lgLayoutSettings, CancelToken cancelToken)
        {
            mainGeometryGraph     = geometryGraph;
            this.lgLayoutSettings = lgLayoutSettings;
            this.cancelToken      = cancelToken;
            if (geometryGraph.LgData == null)
            {
                lgData = new LgData(geometryGraph)
                {
                    GeometryNodesToLgNodeInfos = lgLayoutSettings.GeometryNodesToLgNodeInfos
                };

                geometryGraph.LgData = lgData;
            }
            else
            {
                _initFromPrecomputedLgData = true;
                lgData = geometryGraph.LgData;
                lgLayoutSettings.GeometryNodesToLgNodeInfos = lgData.GeometryNodesToLgNodeInfos;
            }
        }
Exemple #21
0
        static void RankTheGraph(LgData lgData,
                                 GeometryGraph mainGeometryGraph, GeometryGraph geomGraph)
        {
            var nodeArray = geomGraph.Nodes.ToArray();
            var flatGraph = new GeometryGraph {
                Nodes = new SimpleNodeCollection(nodeArray),
                Edges =
                    new SimpleEdgeCollection(
                        geomGraph.Edges.Where(e => !(e.Source is Cluster) && !(e.Target is Cluster)))
            };

            var    pageRank   = Centrality.PageRank(flatGraph, 0.85, false);
            double normalizer = (double)geomGraph.Nodes.Count / mainGeometryGraph.Nodes.Count;

            for (int i = 0; i < nodeArray.Length; i++)
            {
                var node = nodeArray[i];
                Debug.Assert(node != mainGeometryGraph.RootCluster);
                lgData.GeometryNodesToLgNodeInfos[node].Rank = normalizer * pageRank[i];
            }
        }
Exemple #22
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);
        }
Exemple #23
0
        public void RunAfterFlow(LgData _lgData)
        {
            sortedLgNodeInfos = GetSortedLgNodeInfos2();
            Graph.UpdateBoundingBox();

            double gridSize = Math.Max(Graph.Width, Graph.Height);

            zoomLevel = 1;

            while (SomeNodesAreNotAssigned())
            {
                Console.WriteLine("zoom level = {0} with the grid size = {1}", zoomLevel, gridSize);
                DrawNodesOnLevel2(gridSize, zoomLevel);
                zoomLevel *= 2;
                if (zoomLevel == 2)
                {
                    gridSize /= 2.5;
                }
                if (zoomLevel == 4)
                {
                    gridSize /= 2;
                }
                if (zoomLevel == 8)
                {
                    gridSize /= 1.5;
                }
                if (zoomLevel >= 8)
                {
                    gridSize /= 10;                //1.25;
                }
                if (zoomLevel >= 256)
                {
                    gridSize /= 10;                  //1.125;
                }
                //gridSize /= 2;  //jyoti changed it from 2 to make smooth transition between levels
            }
        }
        void ReadLgEdgeInfos(LgData lgData) {
            if (XmlReader.IsEmptyElement) {
                XmlRead();
                return;
            }

            XmlRead();
            while (TokenIs(GeometryToken.LgEdgeInfo))
                ReadLgEdgeInfo(lgData);
            ReadEndElement();
        }
 static bool AddLevel(LgData lgData, IZoomLevelCalculator nodeZoomLevelCalculator, int nodeCountOnLevel, LgEdgeInfo[] edgeInfos) {
     var zoomLevel = (int) nodeZoomLevelCalculator.SortedLgNodeInfos[nodeCountOnLevel - 1].ZoomLevel;
     var edgeInfosOfLevel = edgeInfos.TakeWhile(ei => ei.ZoomLevel <= zoomLevel).ToList();
     lgData.AddLevel();
     return edgeInfosOfLevel.Count() == lgData.GeometryEdgesToLgEdgeInfos.Count;
 }
Exemple #26
0
        static SimpleNodeCollection FindNodesOfLevelGraph(IEnumerable <LgEdgeInfo> edgeInfos, double levelZoom, LgData lgData)
        {
            var nodes = new Set <Node>();

            //add all nodes adjacent to the edges
            foreach (var edgeInfo in edgeInfos)
            {
                var edge = edgeInfo.Edge;
                MaybeScaleDownTheNodeBoundaryAndAddToNodes(levelZoom, lgData, edge.Source, nodes);
                MaybeScaleDownTheNodeBoundaryAndAddToNodes(levelZoom, lgData, edge.Target, nodes);
            }
            return(new SimpleNodeCollection(nodes));
        }
 static void AssignEdgesToLevels(LgData lgData, IZoomLevelCalculator nodeZoomLevelCalculator) {
     foreach (int nodeCountOnLevel in nodeZoomLevelCalculator.LevelNodeCounts)
         EdgePicker.SetEdgeInfosZoomLevelsAndIcreaseRanks(lgData, nodeZoomLevelCalculator, nodeCountOnLevel);
 }
 static LgEdgeInfo[] SortEdgeInfosByZoomLevel(LgData lgData) {
     var edgeInfos = lgData.GeometryEdgesToLgEdgeInfos.Values.ToArray();
     Array.Sort(edgeInfos, (a, b) => a.ZoomLevel.CompareTo(b.ZoomLevel));
     return edgeInfos;
 }
        void FillLgData(LgData lgData) {

            XmlRead();
            if (TokenIs(GeometryToken.LgEdgeInfos))
                ReadLgEdgeInfos(lgData);
            if (TokenIs(GeometryToken.LgNodeInfos)) {
                ReadLgNodeInfos(lgData);
            }
            ReadLevels(lgData);
        }
 void ReadLgLevels() {
     LgData lgData = new LgData(_graph);
     _graph.LgData = lgData;
     FillLgData(lgData);
     ReadEndElement();
 }
 void ReadLgEdgeInfo(LgData lgData) {
     string edgeId = GetAttribute(GeometryToken.EdgeId);
     Edge edge = idToEdges[edgeId];
     lgData.GeometryEdgesToLgEdgeInfos[edge] = new LgEdgeInfo(edge) {
         Rank = GetDoubleAttribute(GeometryToken.Rank),
         ZoomLevel = GetDoubleAttribute(GeometryToken.Zoomlevel)
     };
     XmlRead();
 }
 internal static void SetEdgeInfosZoomLevelsAndIcreaseRanks(LgData lgData,
                                             IZoomLevelCalculator nodeZoomLevelCalculator,
                                             int nodeCountOnLevel) {
     var edgePicker = new EdgePicker(lgData, nodeZoomLevelCalculator, nodeCountOnLevel);
     edgePicker.Run();
 }
 void ReadLevel(LgData lgData, int zoomLevel) {
     int levelNodeCount = GetIntAttribute(GeometryToken.NodeCountOnLevel);
     if (lgData.LevelNodeCounts == null) {
         lgData.LevelNodeCounts = new List<int>();
     }
     lgData.LevelNodeCounts.Add(levelNodeCount);
     LgLevel level = new LgLevel(zoomLevel, _graph);
     lgData.Levels.Add(level);
     XmlRead();
     Dictionary<string, Set<string>> edgeIdToEdgeRailsSet = new Dictionary<string, Set<string>>();
     ReadRailIdsPerEdgeIds(lgData, edgeIdToEdgeRailsSet);
     ReadRails(level);
     ReadEndElement();
     FillRailsOfEdges(level, edgeIdToEdgeRailsSet);
 }
 void ReadSkeletonLevels(LgData lgData) {
     int zoomLevel = 1;
     while (GetElementTag() == GeometryToken.SkeletonLevel) {
         var dZoomLevel = GetDoubleAttributeOrDefault(GeometryToken.Zoomlevel, zoomLevel);
         ReadSkeletonLevel(lgData, (int) dZoomLevel);
         zoomLevel = 2*(int) dZoomLevel;
     }
 }
 void ReadLgNodeInfo(LgData lgData) {
     var nodeId = GetAttribute(GeometryToken.Id);
     var nodeInfo = new LgNodeInfo(nodeIdToNodes[nodeId]) {
         Rank = GetDoubleAttribute(GeometryToken.Rank),
         ZoomLevel = GetDoubleAttribute(GeometryToken.Zoomlevel),
         LabelVisibleFromScale = GetDoubleAttributeOrDefault(GeometryToken.LabelVisibleFromScale, 1.0),
         LabelWidthToHeightRatio = GetDoubleAttributeOrDefault(GeometryToken.LabelWidthToHeightRatio, 1.0),
         LabelOffset = TryGetPointAttribute(GeometryToken.LabelOffset)
     };
     lgData.SortedLgNodeInfos.Add(nodeInfo);
     lgData.GeometryNodesToLgNodeInfos[nodeIdToNodes[nodeId]] = nodeInfo;
     XmlRead();
 }
 void ReadLgNodeInfos(LgData lgData) {
     if (XmlReader.IsEmptyElement) return;
     lgData.GeometryNodesToLgNodeInfos = new Dictionary<Node, LgNodeInfo>();
     lgData.SortedLgNodeInfos = new List<LgNodeInfo>();
     XmlRead();
     while (TokenIs(GeometryToken.LgNodeInfo))
         ReadLgNodeInfo(lgData);
     ReadEndElement();
 }
 void ReadEdgeRailIds(LgData lgData, Dictionary<string, Set<string>> edgeIdToEdgeRailsSet) {
     string edgeId = GetAttribute(GeometryToken.EdgeId);
     Set<string> railIdSet;
     edgeIdToEdgeRailsSet[edgeId] = railIdSet = new Set<string>();
     string edgeRailsString = GetAttribute(GeometryToken.EdgeRails);
     LgEdgeInfo edgeInfo = lgData.GeometryEdgesToLgEdgeInfos[idToEdges[edgeId]];
     foreach (var railId in edgeRailsString.Split(' ')) {
         UpdateToRankedEdgeInfoForRail(railId, edgeInfo);
         railIdSet.Insert(railId);
     }
     XmlRead();
 }
 void ReadRailIdsPerEdgeIds(LgData lgData, Dictionary<string, Set<string>> edgeIdToEdgeRailsSet) {
     if (XmlReader.IsEmptyElement) {
         XmlRead();
         return;
     }
     
     XmlRead();
     while (TokenIs(GeometryToken.EdgeRails))
         ReadEdgeRailIds(lgData, edgeIdToEdgeRailsSet);
     ReadEndElement();
 }
        void ReadSkeletonLevel(LgData lgData, int zoomLevel) {
            LgSkeletonLevel level = new LgSkeletonLevel() {ZoomLevel = zoomLevel};
            lgData.SkeletonLevels.Add(level);

            if (XmlReader.IsEmptyElement) {
                XmlRead();
                return;
            }

            XmlRead();
            //ReadSkeletonRails(level);            
            ReadEndElement();
            //level.CreateRailTree();
        }