private void AddForCell(
            TransportCellKey cellKey,
            IList <TransportNodeId> nodeIds,
            IList <TransportDirectedEdgeId> directedEdgeIds,
            IList <TransportWayId> wayIds
            )
        {
            foreach (var nodeId in nodeIds)
            {
                TransportNode node;
                if (m_transportApi.TryGetNode(nodeId, out node))
                {
                    m_nodes.Add(node.Id, node);
                }
            }

            foreach (var directedEdgeId in directedEdgeIds)
            {
                TransportDirectedEdge directedEdge;
                if (m_transportApi.TryGetDirectedEdge(directedEdgeId, out directedEdge))
                {
                    m_directedEdges.Add(directedEdge.Id, directedEdge);
                }
            }

            foreach (var wayId in wayIds)
            {
                TransportWay way;
                if (m_transportApi.TryGetWay(wayId, out way))
                {
                    m_ways.Add(way.Id, way);
                }
            }

            if (OnTransportGraphChanged != null)
            {
                OnTransportGraphChanged(this, cellKey);
            }
        }
        /// <summary>
        /// Get all TransportDirectedEdge objects currently streamed in for the given transport network and cell.
        /// </summary>
        /// <param name="transportApi">TransportApi instance.</param>
        /// <param name="transportNetwork">The returned results are filtered to contain only objects belonging to this transport network.</param>
        /// <param name="cellKey">The returned results are filtered to contain only objects belonging to this cell.</param>
        /// <returns>The list of TransportDirectedEdge objects for the given network and cell.</returns>
        static public IList <TransportDirectedEdge> GetDirectedEdgesForNetworkAndCell(this TransportApi transportApi, TransportNetworkType transportNetwork, TransportCellKey cellKey)
        {
            var directedEdgeIds = transportApi.GetDirectedEdgeIdsForNetworkInCell(transportNetwork, cellKey);
            var directedEdges   = new List <TransportDirectedEdge>();

            foreach (var directedEdgeId in directedEdgeIds)
            {
                TransportDirectedEdge directedEdge;
                if (!transportApi.TryGetDirectedEdge(directedEdgeId, out directedEdge))
                {
                    throw new System.ArgumentOutOfRangeException("unable to fetch TransportDirectedEdge");
                }
                directedEdges.Add(directedEdge);
            }
            return(directedEdges);
        }