switch edge-expanded street name indexes to be first segment names (18 failed tests left)

This commit is contained in:
Dennis Luxen
2014-03-28 17:13:00 +01:00
parent 549bcb502b
commit 752fb880be
10 changed files with 202 additions and 77 deletions
+5 -7
View File
@@ -42,7 +42,6 @@ struct PhantomNode {
forward_offset(0),
reverse_offset(0),
packed_geometry_id(SPECIAL_EDGEID),
ratio(0.),
fwd_segment_position(0)
{ }
@@ -54,11 +53,10 @@ struct PhantomNode {
int forward_offset;
int reverse_offset;
unsigned packed_geometry_id;
double ratio;
// double ratio;
FixedPointCoordinate location;
unsigned short fwd_segment_position;
int GetForwardWeightPlusOffset() const
{
SimpleLogger().Write(logDEBUG) << "->fwd_offset: " << forward_offset << ", weight: " << forward_weight;
@@ -79,7 +77,7 @@ struct PhantomNode {
reverse_weight = INVALID_EDGE_WEIGHT;
forward_offset = 0;
reverse_offset = 0;
ratio = 0.;
// ratio = 0.;
location.Reset();
}
@@ -106,8 +104,8 @@ struct PhantomNode {
(forward_weight != INVALID_EDGE_WEIGHT) ||
(reverse_weight != INVALID_EDGE_WEIGHT)
) &&
(ratio >= 0.) &&
(ratio <= 1.) &&
// (ratio >= 0.) &&
// (ratio <= 1.) &&
(name_id != std::numeric_limits<unsigned>::max()
);
}
@@ -162,7 +160,7 @@ inline std::ostream& operator<<(std::ostream &out, const PhantomNode & pn) {
"rev-w: " << pn.reverse_weight << ", " <<
"fwd-o: " << pn.forward_offset << ", " <<
"rev-o: " << pn.reverse_offset << ", " <<
"ratio: " << pn.ratio << ", " <<
// "ratio: " << pn.ratio << ", " <<
"geom: " << pn.packed_geometry_id << ", " <<
"pos: " << pn.fwd_segment_position << ", " <<
"loc: " << pn.location;
+10 -1
View File
@@ -70,10 +70,19 @@ struct RawRouteData {
unsigned checkSum;
int lengthOfShortestPath;
int lengthOfAlternativePath;
bool source_traversed_in_reverse;
bool target_traversed_in_reverse;
bool alt_source_traversed_in_reverse;
bool alt_target_traversed_in_reverse;
RawRouteData() :
checkSum(UINT_MAX),
lengthOfShortestPath(INT_MAX),
lengthOfAlternativePath(INT_MAX)
lengthOfAlternativePath(INT_MAX),
source_traversed_in_reverse(false),
target_traversed_in_reverse(false),
alt_source_traversed_in_reverse(false),
alt_target_traversed_in_reverse(false)
{ }
};
+3 -3
View File
@@ -771,12 +771,12 @@ public:
{
result_phantom_node.reverse_weight *= 1.-ratio;
}
result_phantom_node.ratio = ratio;
// result_phantom_node.ratio = ratio;
SimpleLogger().Write(logDEBUG) << "result location: " << result_phantom_node.location << ", start: " << current_start_coordinate << ", end: " << current_end_coordinate;
SimpleLogger().Write(logDEBUG) << "fwd node: " << result_phantom_node.forward_node_id << ", rev node: " << result_phantom_node.reverse_node_id;
SimpleLogger().Write(logDEBUG) << "fwd weight: " << result_phantom_node.forward_weight << ", rev weight: " << result_phantom_node.reverse_weight << ", ratio: " << result_phantom_node.ratio;
SimpleLogger().Write(logDEBUG) << "fwd offset: " << result_phantom_node.forward_offset << ", rev offset: " << result_phantom_node.reverse_offset << ", ratio: " << result_phantom_node.ratio;
SimpleLogger().Write(logDEBUG) << "fwd weight: " << result_phantom_node.forward_weight << ", rev weight: " << result_phantom_node.reverse_weight;// << ", ratio: " << result_phantom_node.ratio;
SimpleLogger().Write(logDEBUG) << "fwd offset: " << result_phantom_node.forward_offset << ", rev offset: " << result_phantom_node.reverse_offset;// << ", ratio: " << result_phantom_node.ratio;
SimpleLogger().Write(logDEBUG) << "bidirected: " << (result_phantom_node.isBidirected() ? "y" : "n");
SimpleLogger().Write(logDEBUG) << "name id: " << result_phantom_node.name_id;
SimpleLogger().Write(logDEBUG) << "geom id: " << result_phantom_node.packed_geometry_id;