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

View File

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

View File

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

View File

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

View File

@ -40,11 +40,6 @@ access_tag_blacklist = Set {
'delivery' 'delivery'
} }
access_tag_restricted = Set {
'destination',
'delivery'
}
access_tags_hierarchy = Sequence { access_tags_hierarchy = Sequence {
'motorcar', 'motorcar',
'motor_vehicle', 'motor_vehicle',
@ -52,11 +47,6 @@ access_tags_hierarchy = Sequence {
'access' 'access'
} }
service_tag_restricted = Set {
'parking_aisle',
'parking'
}
service_tag_forbidden = Set { service_tag_forbidden = Set {
'emergency_access' 'emergency_access'
} }
@ -545,11 +535,6 @@ end
function handle_service(way,result) function handle_service(way,result)
local service = way:get_value_by_key("service") local service = way:get_value_by_key("service")
if service then 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 -- Set don't allow access to certain service roads
if service_tag_forbidden[service] then if service_tag_forbidden[service] then
result.forward_mode = mode.inaccessible result.forward_mode = mode.inaccessible

View File

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

View File

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

View File

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