- Timestamp:
- 08/07/12 10:52:01 (12 years ago)
- Location:
- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Graph/Graph.cs
r8408 r8423 35 35 foreach (Vertex<Node> neighbor in vertices) { 36 36 if (edge.CanBeTraversed(vertex.Node, neighbor.Node)) { 37 float weight = GetWeight(edge, vertex, neighbor); 38 neighbors[neighbor.Node.Id] = weight; 39 } 40 } 41 } 42 return neighbors; 43 } 44 45 public Dictionary<long, float> GetNeighborsReversed(long id) { 46 Vertex<Node> vertex = GetVertex(id); 47 Dictionary<long, float> neighbors = new Dictionary<long, float>(); 48 List<Way> edges = GetEdges(vertex); 49 foreach (Way edge in edges) { 50 List<Vertex<Node>> vertices = GetNeighborVerticesOnEdge(edge, vertex); 51 foreach (Vertex<Node> neighbor in vertices) { 52 if (edge.CanBeTraversed(neighbor.Node, vertex.Node)) { 37 53 float weight = GetWeight(edge, vertex, neighbor); 38 54 neighbors[neighbor.Node.Id] = weight; -
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/TagConstants.cs
r8369 r8423 3 3 public class TagConstants { 4 4 public const string HighwayTagKey = "highway"; 5 public const string JunctionTagKey = "junction"; 5 6 public const string OneWayTag = "oneway"; 7 public const string RoundaboutValue = "roundabout"; 6 8 public const string YesValue = "yes"; 9 public const string TrueValue = "true"; 7 10 } 8 11 } -
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Way.cs
r8408 r8423 73 73 if (base.Tags.ContainsKey(TagConstants.OneWayTag)) { 74 74 string value = base.Tags[TagConstants.OneWayTag]; 75 return value.Equals(TagConstants.YesValue); 75 return value.Equals(TagConstants.YesValue) || value.Equals(TagConstants.TrueValue); 76 } else if (base.Tags.ContainsKey(TagConstants.JunctionTagKey)) { 77 string value = base.Tags[TagConstants.JunctionTagKey]; 78 return value.Equals(TagConstants.RoundaboutValue); 76 79 } else { 77 80 return false;
Note: See TracChangeset
for help on using the changeset viewer.