Compare commits
10 Commits
master
...
v5.16.0-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02754647f4 | ||
|
|
82cebfa1f8 | ||
|
|
986bb6f93d | ||
|
|
0c0ab78f13 | ||
|
|
99cda66b58 | ||
|
|
27fa2fc1d0 | ||
|
|
7434f18d04 | ||
|
|
7d1a12a12d | ||
|
|
6d7420e4e5 | ||
|
|
8a44660102 |
@ -13,6 +13,7 @@ notifications:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- "5.16"
|
||||
# enable building tags
|
||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||
|
||||
@ -161,6 +162,14 @@ matrix:
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
- os: osx
|
||||
osx_image: xcode9.2
|
||||
compiler: "mason-osx-release-node-4"
|
||||
# we use the xcode provides clang and don't install our own
|
||||
env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="4"
|
||||
after_success:
|
||||
- ./scripts/travis/publish.sh
|
||||
|
||||
# Shared Library
|
||||
- os: linux
|
||||
compiler: "gcc-7-release-shared"
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
# UNRELEASED
|
||||
# 5.16.0 RC 5
|
||||
- Changes from 5.15.1:
|
||||
- Guidance
|
||||
- ADDED #4676: Support for maneuver override relation, allowing data-driven overrides for turn-by-turn instructions [#4676](https://github.com/Project-OSRM/osrm-backend/pull/4676)
|
||||
- CHANGED #4830: Announce reference change if names are empty
|
||||
- CHANGED #4835: MAXIMAL_ALLOWED_SEPARATION_WIDTH increased to 12 meters
|
||||
- CHANGED #4842: Lower priority links from a motorway now are used as motorway links [#4842](https://github.com/Project-OSRM/osrm-backend/pull/4842)
|
||||
- Profile:
|
||||
- FIXED: `highway=service` will now be used for restricted access, `access=private` is still disabled for snapping.
|
||||
- ADDED #4775: Exposes more information to the turn function, now being able to set turn weights with highway and access information of the turn as well as other roads at the intersection [#4775](https://github.com/Project-OSRM/osrm-backend/issues/4775)
|
||||
- FIXED: #4763: Add support for non-numerical units in car profile for maxheight [#4763](https://github.com/Project-OSRM/osrm-backend/issues/4763)
|
||||
- FIXED #4763: Add support for non-numerical units in car profile for maxheight [#4763](https://github.com/Project-OSRM/osrm-backend/issues/4763)
|
||||
- ADDED #4872: Handling of `barrier=height_restrictor` nodes [#4872](https://github.com/Project-OSRM/osrm-backend/pull/4872)
|
||||
|
||||
# 5.15.1
|
||||
- Changes from 5.15.0:
|
||||
|
||||
@ -45,3 +45,11 @@ Feature: Car - Barriers
|
||||
| bollard | | |
|
||||
| bollard | rising | x |
|
||||
| bollard | removable | |
|
||||
|
||||
Scenario: Car - Height restrictions
|
||||
Then routability should be
|
||||
| node/barrier | node/maxheight | bothw |
|
||||
| height_restrictor | | x |
|
||||
| height_restrictor | 1 | |
|
||||
| height_restrictor | 3 | x |
|
||||
| height_restrictor | default | x |
|
||||
|
||||
@ -81,7 +81,7 @@ Feature: Motorway Guidance
|
||||
"""
|
||||
,g,e
|
||||
,f,d
|
||||
a-b-c
|
||||
a-b-c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@ -281,3 +281,21 @@ Feature: Motorway Guidance
|
||||
| waypoints | route | turns |
|
||||
| a,d | , | depart,arrive |
|
||||
| b,d | , | depart,arrive |
|
||||
|
||||
|
||||
Scenario: Ramp Exit with Lower Priority
|
||||
Given the node map
|
||||
"""
|
||||
a-b-c-d-e
|
||||
`--f-g
|
||||
"""
|
||||
|
||||
And the ways
|
||||
| nodes | highway | oneway |
|
||||
| abcde | trunk | |
|
||||
| bfg | primary_link | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | turns |
|
||||
| a,e | abcde,abcde | depart,arrive |
|
||||
| a,g | abcde,bfg,bfg | depart,off ramp slight right,arrive |
|
||||
|
||||
@ -129,8 +129,12 @@ Feature: osrm-extract lua ways:get_nodes()
|
||||
"""
|
||||
functions = require('testbot')
|
||||
|
||||
functions.process_node = function(profile, node, result, relations)
|
||||
print ('node ' .. tostring(node:get_location_tag('answer')))
|
||||
end
|
||||
|
||||
functions.process_way = function(profile, way, result, relations)
|
||||
print ('answer ' .. tostring(way:get_location_tag('answer')))
|
||||
print ('way ' .. tostring(way:get_location_tag('answer')))
|
||||
result.forward_mode = mode.driving
|
||||
result.forward_speed = 1
|
||||
end
|
||||
@ -148,4 +152,5 @@ Feature: osrm-extract lua ways:get_nodes()
|
||||
|
||||
When I run "osrm-extract --profile {profile_file} {osm_file} --location-dependent-data test/data/regions/null-island.geojson"
|
||||
Then it should exit successfully
|
||||
And stdout should contain "answer 42"
|
||||
And stdout should contain "node 42"
|
||||
And stdout should contain "way 42"
|
||||
|
||||
12
package.json
12
package.json
@ -1,12 +1,14 @@
|
||||
{
|
||||
"name": "osrm",
|
||||
"version": "5.16.0-latest.1",
|
||||
"version": "5.16.0-rc.5",
|
||||
"private": false,
|
||||
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
|
||||
"dependencies": {
|
||||
"mkdirp": "^0.5.1",
|
||||
"nan": "^2.6.2",
|
||||
"node-cmake": "^2.3.2",
|
||||
"node-pre-gyp": "^0.6.36"
|
||||
"node-pre-gyp": "^0.6.36",
|
||||
"rimraf": "^2.5.4"
|
||||
},
|
||||
"browserify": {
|
||||
"transform": [
|
||||
@ -45,18 +47,18 @@
|
||||
"documentation": "^4.0.0-rc.1",
|
||||
"eslint": "^2.4.0",
|
||||
"faucet": "^0.0.1",
|
||||
"mkdirp": "^0.5.1",
|
||||
"node-timeout": "0.0.4",
|
||||
"polyline": "^0.2.0",
|
||||
"request": "^2.69.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"tape": "^4.7.0",
|
||||
"xmlbuilder": "^4.2.1"
|
||||
},
|
||||
"bundleDependencies": [
|
||||
"mkdirp",
|
||||
"nan",
|
||||
"node-cmake",
|
||||
"node-pre-gyp"
|
||||
"node-pre-gyp",
|
||||
"rimraf"
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"binary": {
|
||||
|
||||
@ -9,6 +9,7 @@ Relations = require("lib/relations")
|
||||
find_access_tag = require("lib/access").find_access_tag
|
||||
limit = require("lib/maxspeed").limit
|
||||
Utils = require("lib/utils")
|
||||
Measure = require("lib/measure")
|
||||
|
||||
function setup()
|
||||
return {
|
||||
@ -54,7 +55,8 @@ function setup()
|
||||
'gate',
|
||||
'lift_gate',
|
||||
'no',
|
||||
'entrance'
|
||||
'entrance',
|
||||
'height_restrictor'
|
||||
},
|
||||
|
||||
access_tag_whitelist = Set {
|
||||
@ -320,11 +322,18 @@ function process_node(profile, node, result, relations)
|
||||
else
|
||||
local barrier = node:get_value_by_key("barrier")
|
||||
if barrier then
|
||||
-- check height restriction barriers
|
||||
local restricted_by_height = false
|
||||
if barrier == 'height_restrictor' then
|
||||
local maxheight = Measure.get_max_height(node:get_value_by_key("maxheight"), node)
|
||||
restricted_by_height = maxheight and maxheight < profile.vehicle_height
|
||||
end
|
||||
|
||||
-- make an exception for rising bollard barriers
|
||||
local bollard = node:get_value_by_key("bollard")
|
||||
local rising_bollard = bollard and "rising" == bollard
|
||||
|
||||
if not profile.barrier_whitelist[barrier] and not rising_bollard then
|
||||
if not profile.barrier_whitelist[barrier] and not rising_bollard or restricted_by_height then
|
||||
result.barrier = true
|
||||
end
|
||||
end
|
||||
|
||||
@ -62,11 +62,11 @@ local height_non_numerical_values = Set { "default", "none", "no-sign", "unsigne
|
||||
|
||||
--- Get maxheight of specified way in meters. If there are no
|
||||
--- max height, then return nil
|
||||
function Measure.get_max_height(raw_value,way)
|
||||
function Measure.get_max_height(raw_value, element)
|
||||
if raw_value then
|
||||
if height_non_numerical_values[raw_value] then
|
||||
if way then
|
||||
return way:get_location_tag('maxheight') or default_maxheight
|
||||
if element then
|
||||
return element:get_location_tag('maxheight') or default_maxheight
|
||||
else
|
||||
return default_maxheight
|
||||
end
|
||||
|
||||
@ -218,6 +218,22 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
"valid",
|
||||
&osmium::Location::valid);
|
||||
|
||||
auto get_location_tag = [](auto &context, const auto &location, const char *key) {
|
||||
if (context.location_dependent_data.empty())
|
||||
return sol::object(sol::nil);
|
||||
|
||||
const LocationDependentData::point_t point{location.lon(), location.lat()};
|
||||
if (!boost::geometry::equals(context.last_location_point, point))
|
||||
{
|
||||
context.last_location_point = point;
|
||||
context.last_location_indexes =
|
||||
context.location_dependent_data.GetPropertyIndexes(point);
|
||||
}
|
||||
|
||||
auto value = context.location_dependent_data.FindByKey(context.last_location_indexes, key);
|
||||
return boost::apply_visitor(to_lua_object(context.state), value);
|
||||
};
|
||||
|
||||
context.state.new_usertype<osmium::Way>(
|
||||
"Way",
|
||||
"get_value_by_key",
|
||||
@ -229,37 +245,29 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
|
||||
"get_nodes",
|
||||
[](const osmium::Way &way) { return sol::as_table(way.nodes()); },
|
||||
"get_location_tag",
|
||||
[&context](const osmium::Way &way, const char *key) {
|
||||
if (context.location_dependent_data.empty())
|
||||
return sol::object(sol::nil);
|
||||
[&context, &get_location_tag](const osmium::Way &way, const char *key) {
|
||||
// HEURISTIC: use a single node (last) of the way to localize the way
|
||||
// For more complicated scenarios a proper merging of multiple tags
|
||||
// at one or many locations must be provided
|
||||
const auto &nodes = way.nodes();
|
||||
const auto &location = nodes.back().location();
|
||||
const LocationDependentData::point_t point{location.lon(), location.lat()};
|
||||
|
||||
if (!boost::geometry::equals(context.last_location_point, point))
|
||||
{
|
||||
context.last_location_point = point;
|
||||
context.last_location_indexes =
|
||||
context.location_dependent_data.GetPropertyIndexes(point);
|
||||
}
|
||||
|
||||
auto value =
|
||||
context.location_dependent_data.FindByKey(context.last_location_indexes, key);
|
||||
return boost::apply_visitor(to_lua_object(context.state), value);
|
||||
return get_location_tag(context, location, key);
|
||||
});
|
||||
|
||||
context.state.new_usertype<osmium::Node>("Node",
|
||||
"location",
|
||||
&osmium::Node::location,
|
||||
"get_value_by_key",
|
||||
&get_value_by_key<osmium::Node>,
|
||||
"id",
|
||||
&osmium::Node::id,
|
||||
"version",
|
||||
&osmium::Node::version);
|
||||
context.state.new_usertype<osmium::Node>(
|
||||
"Node",
|
||||
"location",
|
||||
&osmium::Node::location,
|
||||
"get_value_by_key",
|
||||
&get_value_by_key<osmium::Node>,
|
||||
"id",
|
||||
&osmium::Node::id,
|
||||
"version",
|
||||
&osmium::Node::version,
|
||||
"get_location_tag",
|
||||
[&context, &get_location_tag](const osmium::Node &node, const char *key) {
|
||||
return get_location_tag(context, node.location(), key);
|
||||
});
|
||||
|
||||
context.state.new_usertype<ExtractionNode>("ResultNode",
|
||||
"traffic_lights",
|
||||
|
||||
@ -31,9 +31,13 @@ inline extractor::RoadClassification roadClass(const ConnectedRoad &road,
|
||||
return graph.GetEdgeData(road.eid).flags.road_classification;
|
||||
}
|
||||
|
||||
inline bool isRampClass(EdgeID eid, const util::NodeBasedDynamicGraph &node_based_graph)
|
||||
inline bool isRampClass(EdgeID eid,
|
||||
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
bool from_motorway = true)
|
||||
{
|
||||
return node_based_graph.GetEdgeData(eid).flags.road_classification.IsRampClass();
|
||||
return node_based_graph.GetEdgeData(eid).flags.road_classification.IsRampClass() ||
|
||||
(from_motorway &&
|
||||
node_based_graph.GetEdgeData(eid).flags.road_classification.IsLinkClass());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@ -63,6 +67,8 @@ bool MotorwayHandler::canProcess(const NodeID,
|
||||
const EdgeID via_eid,
|
||||
const Intersection &intersection) const
|
||||
{
|
||||
const bool from_motorway = isMotorwayClass(via_eid, node_based_graph);
|
||||
|
||||
bool has_motorway = false;
|
||||
bool has_normal_roads = false;
|
||||
|
||||
@ -76,14 +82,14 @@ bool MotorwayHandler::canProcess(const NodeID,
|
||||
if (road.entry_allowed)
|
||||
has_motorway = true;
|
||||
}
|
||||
else if (!isRampClass(road.eid, node_based_graph))
|
||||
else if (!isRampClass(road.eid, node_based_graph, from_motorway))
|
||||
has_normal_roads = true;
|
||||
}
|
||||
|
||||
if (has_normal_roads)
|
||||
return false;
|
||||
|
||||
return has_motorway || isMotorwayClass(via_eid, node_based_graph);
|
||||
return has_motorway || from_motorway;
|
||||
}
|
||||
|
||||
Intersection MotorwayHandler::
|
||||
|
||||
@ -139,6 +139,7 @@
|
||||
{"key": "access", "value": "emergency"},
|
||||
{"key": "access", "value": "psv"},
|
||||
{"key": "access", "value": "delivery"},
|
||||
{"key": "maxheight", "object_types": ["node", "way"]},
|
||||
{"key": "maxspeed", "value": "none"},
|
||||
{"key": "maxspeed", "value": "urban"},
|
||||
{"key": "maxspeed", "value": "rural"},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user