remove type attribute

This commit is contained in:
Emil Tin 2014-08-19 16:08:38 +02:00
parent 2780ff31b5
commit fccb1aad32
10 changed files with 8 additions and 22 deletions

View File

@ -371,7 +371,6 @@ void ExtractionContainers::PrepareData(const std::string &output_file_name,
}
file_out_stream.write((char *)&integer_weight, sizeof(int));
file_out_stream.write((char *)&edge_iterator->type, sizeof(short));
file_out_stream.write((char *)&edge_iterator->name_id, sizeof(unsigned));
file_out_stream.write((char *)&edge_iterator->is_roundabout, sizeof(bool));
file_out_stream.write((char *)&edge_iterator->is_in_tiny_cc, sizeof(bool));

View File

@ -48,7 +48,6 @@ struct ExtractionWay
forward_speed = -1;
backward_speed = -1;
duration = -1;
type = -1;
access = true;
roundabout = false;
isAccessRestricted = false;
@ -113,7 +112,6 @@ struct ExtractionWay
double backward_speed;
double duration;
std::string name;
short type;
bool access;
bool roundabout;
bool isAccessRestricted;

View File

@ -125,7 +125,6 @@ void ExtractorCallbacks::ProcessWay(ExtractionWay &parsed_way)
external_memory.all_edges_list.push_back(InternalExtractorEdge(
parsed_way.path[n],
parsed_way.path[n + 1],
parsed_way.type,
((split_edge || TRAVEL_MODE_INACCESSIBLE == parsed_way.backward_travel_mode) ? ExtractionWay::oneway
: ExtractionWay::bidirectional),
parsed_way.forward_speed,
@ -157,7 +156,6 @@ void ExtractorCallbacks::ProcessWay(ExtractionWay &parsed_way)
external_memory.all_edges_list.push_back(
InternalExtractorEdge(parsed_way.path[n],
parsed_way.path[n + 1],
parsed_way.type,
ExtractionWay::oneway,
parsed_way.backward_speed,
parsed_way.nameID,

View File

@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct InternalExtractorEdge
{
InternalExtractorEdge()
: start(0), target(0), type(0), direction(0), speed(0), name_id(0), is_roundabout(false),
: start(0), target(0), direction(0), speed(0), name_id(0), is_roundabout(false),
is_in_tiny_cc(false), is_duration_set(false), is_access_restricted(false),
travel_mode(TRAVEL_MODE_INACCESSIBLE), is_split(false)
{
@ -45,7 +45,6 @@ struct InternalExtractorEdge
explicit InternalExtractorEdge(NodeID start,
NodeID target,
short type,
short direction,
double speed,
unsigned name_id,
@ -55,7 +54,7 @@ struct InternalExtractorEdge
bool is_access_restricted,
TravelMode travel_mode,
bool is_split)
: start(start), target(target), type(type), direction(direction), speed(speed),
: start(start), target(target), direction(direction), speed(speed),
name_id(name_id), is_roundabout(is_roundabout), is_in_tiny_cc(is_in_tiny_cc),
is_duration_set(is_duration_set), is_access_restricted(is_access_restricted),
travel_mode(travel_mode), is_split(is_split)
@ -66,17 +65,16 @@ struct InternalExtractorEdge
// necessary static util functions for stxxl's sorting
static InternalExtractorEdge min_value()
{
return InternalExtractorEdge(0, 0, 0, 0, 0, 0, false, false, false, false, TRAVEL_MODE_INACCESSIBLE, false);
return InternalExtractorEdge(0, 0, 0, 0, 0, false, false, false, false, TRAVEL_MODE_INACCESSIBLE, false);
}
static InternalExtractorEdge max_value()
{
return InternalExtractorEdge(
SPECIAL_NODEID, SPECIAL_NODEID, 0, 0, 0, 0, false, false, false, false, TRAVEL_MODE_INACCESSIBLE, false);
SPECIAL_NODEID, SPECIAL_NODEID, 0, 0, 0, false, false, false, false, TRAVEL_MODE_INACCESSIBLE, false);
}
NodeID start;
NodeID target;
short type;
short direction;
double speed;
unsigned name_id;

View File

@ -79,7 +79,6 @@ void ScriptingEnvironment::initLuaState(lua_State* lua_state)
.def_readwrite("forward_speed", &ExtractionWay::forward_speed)
.def_readwrite("backward_speed", &ExtractionWay::backward_speed)
.def_readwrite("duration", &ExtractionWay::duration)
.def_readwrite("type", &ExtractionWay::type)
.def_readwrite("access", &ExtractionWay::access)
.def_readwrite("roundabout", &ExtractionWay::roundabout)
.def_readwrite("is_access_restricted", &ExtractionWay::isAccessRestricted)

View File

@ -138,7 +138,6 @@ NodeID readBinaryOSRMGraphFromStream(std::istream &input_stream,
input_stream.read((char *)&length, sizeof(int));
input_stream.read((char *)&dir, sizeof(short));
input_stream.read((char *)&weight, sizeof(int));
input_stream.read((char *)&type, sizeof(short));
input_stream.read((char *)&nameID, sizeof(unsigned));
input_stream.read((char *)&is_roundabout, sizeof(bool));
input_stream.read((char *)&ignore_in_grid, sizeof(bool));
@ -316,7 +315,6 @@ NodeID readBinaryOSRMGraphFromStream(std::istream &input_stream,
input_stream.read((char *)&length, sizeof(int));
input_stream.read((char *)&dir, sizeof(short));
input_stream.read((char *)&weight, sizeof(int));
input_stream.read((char *)&type, sizeof(short));
input_stream.read((char *)&nameID, sizeof(unsigned));
input_stream.read((char *)&is_roundabout, sizeof(bool));
input_stream.read((char *)&ignore_in_grid, sizeof(bool));

View File

@ -373,8 +373,7 @@ function way_function (way)
-- maxspeed
MaxSpeed.limit( way, maxspeed, maxspeed_forward, maxspeed_backward )
way.type = 1
return 1
return true
end
function turn_function (angle)

View File

@ -274,14 +274,13 @@ function way_function (way)
if ignore_in_grid[highway] then
way.ignore_in_grid = true
end
way.type = 1
-- scale speeds to get better avg driving times
way.forward_speed = way.forward_speed * speed_reduction
if maxspeed_backward > 0 then
way.backward_speed = way.backward_speed*speed_reduction
end
return
return true
end
-- These are wrappers to parse vectors of nodes and ways and thus to speed up any tracing JIT

View File

@ -203,6 +203,5 @@ function way_function (way)
end
end
way.type = 1
return 1
return true
end

View File

@ -119,6 +119,5 @@ function way_function (way)
way.roundabout = true
end
way.type = 1
return 1
return true
end