public RoadNetwork(int nn, int en, List <Node> nodes, List <Edge> edges) { this.NodeNum = nn; this.EdgeNum = en; this.Nodes = new List <Node>(); this.Edges = new List <Edge>(); foreach (var nd in nodes) { this.Nodes.Add(nd); } foreach (var ed in edges) { this.Edges.Add(ed); } List <LatLong> latlongs = new List <LatLong>(); foreach (var node in nodes) { latlongs.Add(node.LatLon); } Geo.CalculateBoundingBox(latlongs, out this.MaxPoint, out this.MinPoint); }