Removes access_restricted flag internally

This commit is contained in:
Daniel J. Hofmann 2016-12-05 10:54:24 +01:00 committed by Daniel J. H
parent d11927046f
commit 949d505783
8 changed files with 10 additions and 51 deletions

View File

@ -46,7 +46,6 @@ struct ExtractionWay
roundabout = false;
circular = false;
is_startpoint = true;
is_access_restricted = false;
name.clear();
ref.clear();
pronunciation.clear();
@ -96,7 +95,6 @@ struct ExtractionWay
std::string turn_lanes_backward;
bool roundabout;
bool circular;
bool is_access_restricted;
bool is_startpoint;
TravelMode forward_travel_mode : 4;
TravelMode backward_travel_mode : 4;

View File

@ -47,7 +47,6 @@ struct InternalExtractorEdge
false, // backward
false, // roundabout
false, // circular
false, // access restricted
true, // can be startpoint
TRAVEL_MODE_INACCESSIBLE,
false,
@ -64,7 +63,6 @@ struct InternalExtractorEdge
bool backward,
bool roundabout,
bool circular,
bool access_restricted,
bool startpoint,
TravelMode travel_mode,
bool is_split,
@ -78,7 +76,6 @@ struct InternalExtractorEdge
backward,
roundabout,
circular,
access_restricted,
startpoint,
travel_mode,
is_split,
@ -106,7 +103,6 @@ struct InternalExtractorEdge
false, // backward
false, // roundabout
false, // circular
false, // access restricted
true, // can be startpoint
TRAVEL_MODE_INACCESSIBLE,
false,
@ -123,7 +119,6 @@ struct InternalExtractorEdge
false, // backward
false, // roundabout
false, // circular
false, // access restricted
true, // can be startpoint
TRAVEL_MODE_INACCESSIBLE,
false,

View File

@ -23,7 +23,6 @@ struct NodeBasedEdge
bool backward,
bool roundabout,
bool circular,
bool access_restricted,
bool startpoint,
TravelMode travel_mode,
bool is_split,
@ -40,7 +39,6 @@ struct NodeBasedEdge
bool backward : 1;
bool roundabout : 1;
bool circular : 1;
bool access_restricted : 1;
bool startpoint : 1;
bool is_split : 1;
TravelMode travel_mode : 4;
@ -58,7 +56,6 @@ struct NodeBasedEdgeWithOSM : NodeBasedEdge
bool backward,
bool roundabout,
bool circular,
bool access_restricted,
bool startpoint,
TravelMode travel_mode,
bool is_split,
@ -73,9 +70,8 @@ struct NodeBasedEdgeWithOSM : NodeBasedEdge
inline NodeBasedEdge::NodeBasedEdge()
: source(SPECIAL_NODEID), target(SPECIAL_NODEID), name_id(0), weight(0), forward(false),
backward(false), roundabout(false), circular(false), access_restricted(false),
startpoint(true), is_split(false), travel_mode(false),
lane_description_id(INVALID_LANE_DESCRIPTIONID)
backward(false), roundabout(false), circular(false), startpoint(true), is_split(false),
travel_mode(false), lane_description_id(INVALID_LANE_DESCRIPTIONID)
{
}
@ -87,16 +83,14 @@ inline NodeBasedEdge::NodeBasedEdge(NodeID source,
bool backward,
bool roundabout,
bool circular,
bool access_restricted,
bool startpoint,
TravelMode travel_mode,
bool is_split,
const LaneDescriptionID lane_description_id,
guidance::RoadClassification road_classification)
: source(source), target(target), name_id(name_id), weight(weight), forward(forward),
backward(backward), roundabout(roundabout), circular(circular),
access_restricted(access_restricted), startpoint(startpoint), is_split(is_split),
travel_mode(travel_mode), lane_description_id(lane_description_id),
backward(backward), roundabout(roundabout), circular(circular), startpoint(startpoint),
is_split(is_split), travel_mode(travel_mode), lane_description_id(lane_description_id),
road_classification(std::move(road_classification))
{
}
@ -126,7 +120,6 @@ inline NodeBasedEdgeWithOSM::NodeBasedEdgeWithOSM(OSMNodeID source,
bool backward,
bool roundabout,
bool circular,
bool access_restricted,
bool startpoint,
TravelMode travel_mode,
bool is_split,
@ -140,7 +133,6 @@ inline NodeBasedEdgeWithOSM::NodeBasedEdgeWithOSM(OSMNodeID source,
backward,
roundabout,
circular,
access_restricted,
startpoint,
travel_mode,
is_split,

View File

@ -19,8 +19,8 @@ struct NodeBasedEdgeData
{
NodeBasedEdgeData()
: distance(INVALID_EDGE_WEIGHT), edge_id(SPECIAL_NODEID),
name_id(std::numeric_limits<unsigned>::max()), access_restricted(false), reversed(false),
roundabout(false), circular(false), travel_mode(TRAVEL_MODE_INACCESSIBLE),
name_id(std::numeric_limits<unsigned>::max()), reversed(false), roundabout(false),
circular(false), travel_mode(TRAVEL_MODE_INACCESSIBLE),
lane_description_id(INVALID_LANE_DESCRIPTIONID)
{
}
@ -28,24 +28,21 @@ struct NodeBasedEdgeData
NodeBasedEdgeData(int distance,
unsigned edge_id,
unsigned name_id,
bool access_restricted,
bool reversed,
bool roundabout,
bool circular,
bool startpoint,
extractor::TravelMode travel_mode,
const LaneDescriptionID lane_description_id)
: distance(distance), edge_id(edge_id), name_id(name_id),
access_restricted(access_restricted), reversed(reversed), roundabout(roundabout),
circular(circular), startpoint(startpoint), travel_mode(travel_mode),
lane_description_id(lane_description_id)
: distance(distance), edge_id(edge_id), name_id(name_id), reversed(reversed),
roundabout(roundabout), circular(circular), startpoint(startpoint),
travel_mode(travel_mode), lane_description_id(lane_description_id)
{
}
int distance;
unsigned edge_id;
unsigned name_id;
bool access_restricted : 1;
bool reversed : 1;
bool roundabout : 1;
bool circular : 1;
@ -58,7 +55,6 @@ struct NodeBasedEdgeData
{
return (reversed == other.reversed) && (roundabout == other.roundabout) &&
(circular == other.circular) && (startpoint == other.startpoint) &&
(access_restricted == other.access_restricted) &&
(travel_mode == other.travel_mode) &&
(road_classification == other.road_classification);
}
@ -88,7 +84,6 @@ NodeBasedDynamicGraphFromEdges(NodeID number_of_nodes,
output_edge.data.roundabout = input_edge.roundabout;
output_edge.data.circular = input_edge.circular;
output_edge.data.name_id = input_edge.name_id;
output_edge.data.access_restricted = input_edge.access_restricted;
output_edge.data.travel_mode = input_edge.travel_mode;
output_edge.data.startpoint = input_edge.startpoint;
output_edge.data.road_classification = input_edge.road_classification;

View File

@ -40,11 +40,6 @@ access_tag_blacklist = Set {
'delivery'
}
access_tag_restricted = Set {
'destination',
'delivery'
}
access_tags_hierarchy = Sequence {
'motorcar',
'motor_vehicle',
@ -52,11 +47,6 @@ access_tags_hierarchy = Sequence {
'access'
}
service_tag_restricted = Set {
'parking_aisle',
'parking'
}
service_tag_forbidden = Set {
'emergency_access'
}
@ -545,11 +535,6 @@ end
function handle_service(way,result)
local service = way:get_value_by_key("service")
if service then
-- Set access restriction flag if service is allowed under certain restrictions only
if service_tag_restricted[service] then
result.is_access_restricted = true
end
-- Set don't allow access to certain service roads
if service_tag_forbidden[service] then
result.forward_mode = mode.inaccessible

View File

@ -328,7 +328,6 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti
false,
parsed_way.roundabout,
parsed_way.circular,
parsed_way.is_access_restricted,
parsed_way.is_startpoint,
parsed_way.backward_travel_mode,
false,
@ -361,7 +360,6 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti
!forward_only,
parsed_way.roundabout,
parsed_way.circular,
parsed_way.is_access_restricted,
parsed_way.is_startpoint,
parsed_way.forward_travel_mode,
split_edge,
@ -384,7 +382,6 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti
true,
parsed_way.roundabout,
parsed_way.circular,
parsed_way.is_access_restricted,
parsed_way.is_startpoint,
parsed_way.backward_travel_mode,
true,

View File

@ -221,7 +221,6 @@ void LuaScriptingEnvironment::InitContext(LuaScriptingContext &context)
&ExtractionWay::SetTurnLanesBackward)
.def_readwrite("roundabout", &ExtractionWay::roundabout)
.def_readwrite("circular", &ExtractionWay::circular)
.def_readwrite("is_access_restricted", &ExtractionWay::is_access_restricted)
.def_readwrite("is_startpoint", &ExtractionWay::is_startpoint)
.def_readwrite("duration", &ExtractionWay::duration)
.def_readwrite("road_classification", &ExtractionWay::road_classification)

View File

@ -22,8 +22,7 @@ namespace
// creates a default edge of unit weight
inline InputEdge MakeUnitEdge(const NodeID from, const NodeID to)
{
// src, tgt, dist, edge_id, name_id, access_restricted, fwd, bkwd, roundabout, circular
// travel_mode
// src, tgt, dist, edge_id, name_id, fwd, bkwd, roundabout, circular, travel_mode
return {from,
to,
1,
@ -32,7 +31,6 @@ inline InputEdge MakeUnitEdge(const NodeID from, const NodeID to)
false,
false,
false,
false,
true,
TRAVEL_MODE_INACCESSIBLE,
INVALID_LANE_DESCRIPTIONID};