switch edge-expanded street name indexes to be first segment names (18 failed tests left)
This commit is contained in:
@@ -316,8 +316,9 @@ public:
|
||||
}
|
||||
|
||||
//Unpack shortest path and alternative, if they exist
|
||||
if( INVALID_EDGE_WEIGHT != upper_bound_to_shortest_path_distance ) {
|
||||
BOOST_ASSERT( !packed_shortest_path.empty() );
|
||||
if( INVALID_EDGE_WEIGHT != upper_bound_to_shortest_path_distance )
|
||||
{
|
||||
BOOST_ASSERT(!packed_shortest_path.empty());
|
||||
raw_route_data.unpacked_path_segments.resize(1);
|
||||
// SimpleLogger().Write() << "fwd offset1: " << phantom_node_pair.source_phantom.fwd_segment_position;
|
||||
// SimpleLogger().Write() << "fwd offset2: " << phantom_node_pair.source_phantom.rev_segment_position;
|
||||
@@ -332,6 +333,9 @@ public:
|
||||
// SimpleLogger().Write(logDEBUG) << "phantom_node_pair.target_phantom.packed_geometry_id: " << phantom_node_pair.target_phantom.packed_geometry_id;
|
||||
// SimpleLogger().Write(logDEBUG) << "packed_shortest_path.back(): " << packed_shortest_path.back();
|
||||
|
||||
raw_route_data.source_traversed_in_reverse = (packed_shortest_path.front() != phantom_node_pair.source_phantom.forward_node_id);
|
||||
raw_route_data.target_traversed_in_reverse = (packed_shortest_path.back() != phantom_node_pair.target_phantom.forward_node_id);
|
||||
|
||||
super::UnpackPath(
|
||||
// -- packed input
|
||||
packed_shortest_path,
|
||||
@@ -357,6 +361,9 @@ public:
|
||||
packed_alternate_path
|
||||
);
|
||||
|
||||
raw_route_data.source_traversed_in_reverse = (packed_alternate_path.front() != phantom_node_pair.source_phantom.forward_node_id);
|
||||
raw_route_data.target_traversed_in_reverse = (packed_alternate_path.back() != phantom_node_pair.target_phantom.forward_node_id);
|
||||
|
||||
// unpack the alternate path
|
||||
super::UnpackPath(
|
||||
packed_alternate_path,
|
||||
|
||||
@@ -186,6 +186,7 @@ public:
|
||||
}
|
||||
}
|
||||
if( SPECIAL_EDGEID == smaller_edge_id ){
|
||||
SimpleLogger().Write() << "checking reverse";
|
||||
for(
|
||||
EdgeID edge_id = facade->BeginEdges(edge.second);
|
||||
edge_id < facade->EndEdges(edge.second);
|
||||
@@ -234,6 +235,9 @@ public:
|
||||
|
||||
const int start_index = ( unpacked_path.empty() ? ( ( start_traversed_in_reverse ) ? id_vector.size() - phantom_node_pair.source_phantom.fwd_segment_position - 1 : phantom_node_pair.source_phantom.fwd_segment_position ) : 0 );
|
||||
const int end_index = id_vector.size();
|
||||
std::string name = facade->GetEscapedNameForNameID(name_index);
|
||||
SimpleLogger().Write(logDEBUG) << "compressed via segment " << name << " from [" << start_index << "," << end_index << "]";
|
||||
|
||||
|
||||
BOOST_ASSERT( start_index >= 0 );
|
||||
BOOST_ASSERT( start_index <= end_index );
|
||||
@@ -293,7 +297,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// SimpleLogger().Write(logDEBUG) << "fetching from [" << start_index << "," << end_index << "]";
|
||||
SimpleLogger().Write(logDEBUG) << "fetching target segment from [" << start_index << "," << end_index << "]";
|
||||
|
||||
BOOST_ASSERT( start_index >= 0 );
|
||||
for(
|
||||
@@ -302,10 +306,10 @@ public:
|
||||
( start_index < end_index ? ++i :--i)
|
||||
) {
|
||||
BOOST_ASSERT( i >= -1 );
|
||||
// if ( i >= 0 )
|
||||
// {
|
||||
// SimpleLogger().Write(logDEBUG) << "[" << i << "]" << facade->GetCoordinateOfNode(id_vector[i]);
|
||||
// }
|
||||
if ( i >= 0 )
|
||||
{
|
||||
SimpleLogger().Write(logDEBUG) << "target [" << i << "]" << facade->GetCoordinateOfNode(id_vector[i]);
|
||||
}
|
||||
unpacked_path.push_back(
|
||||
PathData(
|
||||
id_vector[i],
|
||||
@@ -316,6 +320,11 @@ public:
|
||||
);
|
||||
}
|
||||
}
|
||||
BOOST_FOREACH(const PathData & path_data, unpacked_path)
|
||||
{
|
||||
std::string name = facade->GetEscapedNameForNameID(path_data.name_id);
|
||||
SimpleLogger().Write(logDEBUG) << "{up} " << facade->GetCoordinateOfNode(path_data.node) << ", name: " << name;
|
||||
}
|
||||
}
|
||||
|
||||
inline void UnpackEdge(
|
||||
|
||||
@@ -362,17 +362,22 @@ public:
|
||||
++current_leg;
|
||||
}
|
||||
|
||||
if( distance1 > distance2 ) {
|
||||
if (distance1 > distance2)
|
||||
{
|
||||
std::swap( packed_legs1, packed_legs2 );
|
||||
}
|
||||
raw_route_data.unpacked_path_segments.resize( packed_legs1.size() );
|
||||
// const int start_offset = ( packed_legs1[0].front() == phantom_nodes_vector.front().source_phantom.forward_node_id ? 1 : -1 )*phantom_nodes_vector.front().source_phantom.fwd_segment_position;
|
||||
|
||||
for(unsigned i = 0; i < packed_legs1.size(); ++i){
|
||||
BOOST_ASSERT( !phantom_nodes_vector.empty() );
|
||||
raw_route_data.source_traversed_in_reverse = (packed_legs1.front().front() != phantom_nodes_vector.front().source_phantom.forward_node_id);
|
||||
raw_route_data.target_traversed_in_reverse = (packed_legs1.back().back() != phantom_nodes_vector.back().target_phantom.forward_node_id);
|
||||
|
||||
for (unsigned i = 0; i < packed_legs1.size(); ++i)
|
||||
{
|
||||
BOOST_ASSERT(!phantom_nodes_vector.empty());
|
||||
// const bool at_beginning = (packed_legs1[i] == packed_legs1.front());
|
||||
// const bool at_end = (packed_legs1[i] == packed_legs1.back());
|
||||
BOOST_ASSERT(packed_legs1.size() == raw_route_data.unpacked_path_segments.size() );
|
||||
BOOST_ASSERT(packed_legs1.size() == raw_route_data.unpacked_path_segments.size());
|
||||
|
||||
PhantomNodes unpack_phantom_node_pair = phantom_nodes_vector[i];
|
||||
// if (!at_beginning)
|
||||
|
||||
Reference in New Issue
Block a user