Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 17e19663ba | |||
| 5597415f28 | |||
| 5476f6ab27 | |||
| 0971f06193 | |||
| 85515f063a | |||
| 69d7825542 | |||
| 9b779c704f | |||
| 5bd7d04fe3 | |||
| 0f78f7b2cc | |||
| 8473be69d2 | |||
| c0124f7d77 | |||
| b630b4e32a | |||
| 89fabc1b9c | |||
| a649a8a5cf | |||
| f928956584 | |||
| 7ff68792d7 | |||
| 3088dd0342 | |||
| d2590989f5 | |||
| 3a7b377586 | |||
| 82b5648c97 | |||
| 1628a3c4d5 | |||
| e5d8319c43 | |||
| 06699132eb | |||
| 918e794d6a | |||
| 8dd8ee1fc2 | |||
| c3d0efda93 |
+1
-1
@@ -13,7 +13,7 @@ notifications:
|
|||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- "5.18"
|
- "5.19"
|
||||||
# enable building tags
|
# enable building tags
|
||||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||||
|
|
||||||
|
|||||||
+12
-1
@@ -1,7 +1,18 @@
|
|||||||
# 5.18.1
|
# 5.19.0
|
||||||
- Changes from 5.18.0:
|
- Changes from 5.18.0:
|
||||||
|
- Optimizations:
|
||||||
|
- CHANGED: Use Grisu2 for serializing floating point numbers. [#5188](https://github.com/Project-OSRM/osrm-backend/pull/5188)
|
||||||
|
- ADDED: Node bindings can return pre-rendered JSON buffer. [#5189](https://github.com/Project-OSRM/osrm-backend/pull/5189)
|
||||||
|
- Profiles:
|
||||||
|
- CHANGED: Bicycle profile now blacklists barriers instead of whitelisting them [#5076
|
||||||
|
](https://github.com/Project-OSRM/osrm-backend/pull/5076/)
|
||||||
|
- CHANGED: Foot profile now blacklists barriers instead of whitelisting them [#5077
|
||||||
|
](https://github.com/Project-OSRM/osrm-backend/pull/5077/)
|
||||||
|
- CHANGED: Support maxlength and maxweight in car profile [#5101](https://github.com/Project-OSRM/osrm-backend/pull/5101]
|
||||||
- Bugfixes:
|
- Bugfixes:
|
||||||
- FIXED: collapsing of ExitRoundabout instructions [#5114](https://github.com/Project-OSRM/osrm-backend/issues/5114)
|
- FIXED: collapsing of ExitRoundabout instructions [#5114](https://github.com/Project-OSRM/osrm-backend/issues/5114)
|
||||||
|
- Misc:
|
||||||
|
- CHANGED: Support up to 512 named shared memory regions [#5185](https://github.com/Project-OSRM/osrm-backend/pull/5185)
|
||||||
|
|
||||||
# 5.18.0
|
# 5.18.0
|
||||||
- Changes from 5.17.0:
|
- Changes from 5.17.0:
|
||||||
|
|||||||
+2
-2
@@ -138,7 +138,7 @@ Given an OpenStreetMap way, the `process_way` function will either return nothin
|
|||||||
Argument | Description
|
Argument | Description
|
||||||
---------|-------------------------------------------------------
|
---------|-------------------------------------------------------
|
||||||
profile | The configuration table you returned in `setup`.
|
profile | The configuration table you returned in `setup`.
|
||||||
node | The input way to process (read-only).
|
way | The input way to process (read-only).
|
||||||
result | The output that you will modify.
|
result | The output that you will modify.
|
||||||
relations| Storage of relations to access relations, where `way` is a member.
|
relations| Storage of relations to access relations, where `way` is a member.
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ source.lon | Read | Float | Co-ordinates of segment start
|
|||||||
source.lat | Read | Float | ""
|
source.lat | Read | Float | ""
|
||||||
target.lon | Read | Float | Co-ordinates of segment end
|
target.lon | Read | Float | Co-ordinates of segment end
|
||||||
target.lat | Read | Float | ""
|
target.lat | Read | Float | ""
|
||||||
target.distance | Read | Float | Length of segment
|
distance | Read | Float | Length of segment
|
||||||
weight | Read/write | Float | Routing weight for this segment
|
weight | Read/write | Float | Routing weight for this segment
|
||||||
duration | Read/write | Float | Duration for this segment
|
duration | Read/write | Float | Duration for this segment
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Feature: Barriers
|
|||||||
| entrance | x |
|
| entrance | x |
|
||||||
| wall | |
|
| wall | |
|
||||||
| fence | |
|
| fence | |
|
||||||
| some_tag | |
|
| some_tag | x |
|
||||||
| block | x |
|
| block | x |
|
||||||
|
|
||||||
Scenario: Bike - Access tag trumphs barriers
|
Scenario: Bike - Access tag trumphs barriers
|
||||||
|
|||||||
@@ -48,3 +48,22 @@ Feature: Car - Handle physical limitation
|
|||||||
| primary | | none | x |
|
| primary | | none | x |
|
||||||
| primary | | no-sign | x |
|
| primary | | no-sign | x |
|
||||||
| primary | | unsigned | x |
|
| primary | | unsigned | x |
|
||||||
|
|
||||||
|
Scenario: Car - Limited by length
|
||||||
|
Then routability should be
|
||||||
|
| highway | maxlength | bothw |
|
||||||
|
| primary | | x |
|
||||||
|
| primary | 1 | |
|
||||||
|
| primary | 5 | x |
|
||||||
|
| primary | unsigned | x |
|
||||||
|
|
||||||
|
Scenario: Car - Limited by weight
|
||||||
|
Then routability should be
|
||||||
|
| highway | maxweight | bothw |
|
||||||
|
| primary | | x |
|
||||||
|
| primary | 1 | |
|
||||||
|
| primary | 3.5 | x |
|
||||||
|
| primary | 35000 kg | x |
|
||||||
|
| primary | 8.9t | x |
|
||||||
|
| primary | 0.1 lbs | |
|
||||||
|
| primary | unsigned | x |
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Feature: Barriers
|
|||||||
| entrance | x |
|
| entrance | x |
|
||||||
| wall | |
|
| wall | |
|
||||||
| fence | |
|
| fence | |
|
||||||
| some_tag | |
|
| some_tag | x |
|
||||||
| block | x |
|
| block | x |
|
||||||
|
|
||||||
Scenario: Foot - Access tag trumphs barriers
|
Scenario: Foot - Access tag trumphs barriers
|
||||||
|
|||||||
@@ -62,12 +62,14 @@ template <> v8::Local<v8::Value> inline render(const ObjectOrString &result)
|
|||||||
{
|
{
|
||||||
if (result.is<osrm::json::Object>())
|
if (result.is<osrm::json::Object>())
|
||||||
{
|
{
|
||||||
|
// Convert osrm::json object tree into matching v8 object tree
|
||||||
v8::Local<v8::Value> value;
|
v8::Local<v8::Value> value;
|
||||||
renderToV8(value, result.get<osrm::json::Object>());
|
renderToV8(value, result.get<osrm::json::Object>());
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Return the string object as a node Buffer
|
||||||
return Nan::CopyBuffer(result.get<std::string>().data(), result.get<std::string>().size())
|
return Nan::CopyBuffer(result.get<std::string>().data(), result.get<std::string>().size())
|
||||||
.ToLocalChecked();
|
.ToLocalChecked();
|
||||||
}
|
}
|
||||||
@@ -871,10 +873,6 @@ argumentsToPluginParameters(const Nan::FunctionCallbackInfo<v8::Value> &args)
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cout << "No format on config" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,6 +146,8 @@ template <typename Data> struct SharedMonitor
|
|||||||
// like two-turnstile reusable barrier or boost/interprocess/sync/spin/condition.hpp
|
// like two-turnstile reusable barrier or boost/interprocess/sync/spin/condition.hpp
|
||||||
// fail if a waiter is killed.
|
// fail if a waiter is killed.
|
||||||
|
|
||||||
|
// Buffer size needs to be large enough to hold all the semaphores for every
|
||||||
|
// listener you want to support.
|
||||||
static constexpr int buffer_size = 4096 * 4;
|
static constexpr int buffer_size = 4096 * 4;
|
||||||
|
|
||||||
struct InternalData
|
struct InternalData
|
||||||
|
|||||||
@@ -247,9 +247,8 @@ inline DiyFp GetCachedPower(int e, int *K)
|
|||||||
inline void
|
inline void
|
||||||
GrisuRound(char *buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w)
|
GrisuRound(char *buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, uint64_t wp_w)
|
||||||
{
|
{
|
||||||
while (rest < wp_w && delta - rest >= ten_kappa &&
|
while (rest < wp_w && delta - rest >= ten_kappa && (rest + ten_kappa < wp_w || /// closer
|
||||||
(rest + ten_kappa < wp_w || /// closer
|
wp_w - rest > rest + ten_kappa - wp_w))
|
||||||
wp_w - rest > rest + ten_kappa - wp_w))
|
|
||||||
{
|
{
|
||||||
buffer[len - 1]--;
|
buffer[len - 1]--;
|
||||||
rest += ten_kappa;
|
rest += ten_kappa;
|
||||||
|
|||||||
@@ -81,19 +81,6 @@ struct String
|
|||||||
std::string value;
|
std::string value;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Typed string wrapper.
|
|
||||||
*
|
|
||||||
* Unwrap the type via its value member attribute.
|
|
||||||
*/
|
|
||||||
struct Buffer
|
|
||||||
{
|
|
||||||
Buffer() = default;
|
|
||||||
Buffer(const char *value_) : value{value_} {}
|
|
||||||
Buffer(std::string value_) : value{std::move(value_)} {}
|
|
||||||
std::string value;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Typed floating point number.
|
* Typed floating point number.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -22,6 +22,11 @@ namespace util
|
|||||||
namespace json
|
namespace json
|
||||||
{
|
{
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
constexpr int MAX_FLOAT_STRING_LENGTH = 256;
|
||||||
|
}
|
||||||
|
|
||||||
struct Renderer
|
struct Renderer
|
||||||
{
|
{
|
||||||
explicit Renderer(std::ostream &_out) : out(_out) {}
|
explicit Renderer(std::ostream &_out) : out(_out) {}
|
||||||
@@ -35,13 +40,13 @@ struct Renderer
|
|||||||
|
|
||||||
void operator()(const Number &number) const
|
void operator()(const Number &number) const
|
||||||
{
|
{
|
||||||
char buffer[256] = {'\0'};
|
char buffer[MAX_FLOAT_STRING_LENGTH] = {'\0'};
|
||||||
ieee754::dtoa_milo(number.value, buffer);
|
ieee754::dtoa_milo(number.value, buffer);
|
||||||
|
|
||||||
// Trucate to 10 decimal places
|
// Trucate to 10 decimal places
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
int decimalpos = 0;
|
int decimalpos = 0;
|
||||||
while (decimalpos == 0 && pos < 256 && buffer[pos] != 0)
|
while (decimalpos == 0 && pos < MAX_FLOAT_STRING_LENGTH && buffer[pos] != 0)
|
||||||
{
|
{
|
||||||
if (buffer[pos] == '.')
|
if (buffer[pos] == '.')
|
||||||
{
|
{
|
||||||
@@ -50,7 +55,7 @@ struct Renderer
|
|||||||
}
|
}
|
||||||
++pos;
|
++pos;
|
||||||
}
|
}
|
||||||
while (pos < 256 && buffer[pos] != 0)
|
while (pos < MAX_FLOAT_STRING_LENGTH && buffer[pos] != 0)
|
||||||
{
|
{
|
||||||
if (pos - decimalpos == 10)
|
if (pos - decimalpos == 10)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "osrm",
|
"name": "osrm",
|
||||||
"version": "5.18.0-moarshm.5",
|
"version": "5.19.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
|
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+5
-15
@@ -38,20 +38,10 @@ function setup()
|
|||||||
mode.pushing_bike
|
mode.pushing_bike
|
||||||
},
|
},
|
||||||
|
|
||||||
barrier_whitelist = Set {
|
barrier_blacklist = Set {
|
||||||
'sump_buster',
|
'yes',
|
||||||
'bus_trap',
|
'wall',
|
||||||
'cycle_barrier',
|
'fence'
|
||||||
'bollard',
|
|
||||||
'entrance',
|
|
||||||
'cattle_grid',
|
|
||||||
'border_control',
|
|
||||||
'toll_booth',
|
|
||||||
'sally_port',
|
|
||||||
'gate',
|
|
||||||
'lift_gate',
|
|
||||||
'no',
|
|
||||||
'block'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
access_tag_whitelist = Set {
|
access_tag_whitelist = Set {
|
||||||
@@ -245,7 +235,7 @@ function process_node(profile, node, result)
|
|||||||
else
|
else
|
||||||
local barrier = node:get_value_by_key("barrier")
|
local barrier = node:get_value_by_key("barrier")
|
||||||
if barrier and "" ~= barrier then
|
if barrier and "" ~= barrier then
|
||||||
if not profile.barrier_whitelist[barrier] then
|
if profile.barrier_blacklist[barrier] then
|
||||||
result.barrier = true
|
result.barrier = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ function setup()
|
|||||||
vehicle_height = 2.5, -- in meters, 2.5m is the height of van
|
vehicle_height = 2.5, -- in meters, 2.5m is the height of van
|
||||||
vehicle_width = 1.9, -- in meters, ways with narrow tag are considered narrower than 2.2m
|
vehicle_width = 1.9, -- in meters, ways with narrow tag are considered narrower than 2.2m
|
||||||
|
|
||||||
|
-- Size of the vehicle, to be limited mostly by legal restriction of the way
|
||||||
|
vehicle_length = 4.8, -- in meters, 4.8m is the length of large or familly car
|
||||||
|
vehicle_weight = 3500, -- in kilograms
|
||||||
|
|
||||||
-- a list of suffixes to suppress in name change instructions. The suffixes also include common substrings of each other
|
-- a list of suffixes to suppress in name change instructions. The suffixes also include common substrings of each other
|
||||||
suffix_list = {
|
suffix_list = {
|
||||||
'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW', 'North', 'South', 'West', 'East', 'Nor', 'Sou', 'We', 'Ea'
|
'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW', 'North', 'South', 'West', 'East', 'Nor', 'Sou', 'We', 'Ea'
|
||||||
@@ -276,6 +280,7 @@ function setup()
|
|||||||
["de:rural"] = 100,
|
["de:rural"] = 100,
|
||||||
["de:motorway"] = 0,
|
["de:motorway"] = 0,
|
||||||
["dk:rural"] = 80,
|
["dk:rural"] = 80,
|
||||||
|
["fr:rural"] = 80,
|
||||||
["gb:nsl_single"] = (60*1609)/1000,
|
["gb:nsl_single"] = (60*1609)/1000,
|
||||||
["gb:nsl_dual"] = (70*1609)/1000,
|
["gb:nsl_dual"] = (70*1609)/1000,
|
||||||
["gb:motorway"] = (70*1609)/1000,
|
["gb:motorway"] = (70*1609)/1000,
|
||||||
@@ -387,6 +392,8 @@ function process_way(profile, way, result, relations)
|
|||||||
WayHandlers.avoid_ways,
|
WayHandlers.avoid_ways,
|
||||||
WayHandlers.handle_height,
|
WayHandlers.handle_height,
|
||||||
WayHandlers.handle_width,
|
WayHandlers.handle_width,
|
||||||
|
WayHandlers.handle_length,
|
||||||
|
WayHandlers.handle_weight,
|
||||||
|
|
||||||
-- determine access status by checking our hierarchy of
|
-- determine access status by checking our hierarchy of
|
||||||
-- access tags, e.g: motorcar, motor_vehicle, vehicle
|
-- access tags, e.g: motorcar, motor_vehicle, vehicle
|
||||||
|
|||||||
+5
-14
@@ -24,19 +24,10 @@ function setup()
|
|||||||
default_speed = walking_speed,
|
default_speed = walking_speed,
|
||||||
oneway_handling = 'specific', -- respect 'oneway:foot' but not 'oneway'
|
oneway_handling = 'specific', -- respect 'oneway:foot' but not 'oneway'
|
||||||
|
|
||||||
barrier_whitelist = Set {
|
barrier_blacklist = Set {
|
||||||
'cycle_barrier',
|
'yes',
|
||||||
'bollard',
|
'wall',
|
||||||
'entrance',
|
'fence'
|
||||||
'cattle_grid',
|
|
||||||
'border_control',
|
|
||||||
'toll_booth',
|
|
||||||
'sally_port',
|
|
||||||
'gate',
|
|
||||||
'lift_gate',
|
|
||||||
'no',
|
|
||||||
'kerb',
|
|
||||||
'block'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
access_tag_whitelist = Set {
|
access_tag_whitelist = Set {
|
||||||
@@ -157,7 +148,7 @@ function process_node(profile, node, result)
|
|||||||
local bollard = node:get_value_by_key("bollard")
|
local bollard = node:get_value_by_key("bollard")
|
||||||
local rising_bollard = bollard and "rising" == bollard
|
local rising_bollard = bollard and "rising" == bollard
|
||||||
|
|
||||||
if not profile.barrier_whitelist[barrier] and not rising_bollard then
|
if profile.barrier_blacklist[barrier] and not rising_bollard then
|
||||||
result.barrier = true
|
result.barrier = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+20
-26
@@ -5,6 +5,7 @@ Measure = {}
|
|||||||
-- measurements conversion constants
|
-- measurements conversion constants
|
||||||
local inch_to_meters = 0.0254
|
local inch_to_meters = 0.0254
|
||||||
local feet_to_inches = 12
|
local feet_to_inches = 12
|
||||||
|
local pound_to_kilograms = 0.45359237
|
||||||
|
|
||||||
--- Parse string as a height in meters.
|
--- Parse string as a height in meters.
|
||||||
--- according to http://wiki.openstreetmap.org/wiki/Key:maxheight
|
--- according to http://wiki.openstreetmap.org/wiki/Key:maxheight
|
||||||
@@ -25,33 +26,19 @@ function Measure.parse_value_meters(value)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- according to http://wiki.openstreetmap.org/wiki/Map_Features/Units#Explicit_specifications
|
--- Parse weight value in kilograms.
|
||||||
local tonns_parse_patterns = Sequence {
|
--- according to https://wiki.openstreetmap.org/wiki/Key:maxweight
|
||||||
"%d+",
|
|
||||||
"%d+.%d+",
|
|
||||||
"%d+.%d+ ?t"
|
|
||||||
}
|
|
||||||
|
|
||||||
local kg_parse_patterns = Sequence {
|
|
||||||
"%d+ ?kg"
|
|
||||||
}
|
|
||||||
|
|
||||||
--- Parse weight value in kilograms
|
|
||||||
function Measure.parse_value_kilograms(value)
|
function Measure.parse_value_kilograms(value)
|
||||||
-- try to parse kilograms
|
local n = tonumber(value:gsub(",", "."):match("%d+%.?%d*"))
|
||||||
for i, templ in ipairs(kg_parse_patterns) do
|
if n then
|
||||||
m = string.match(value, templ)
|
if string.match(value, "lbs") then
|
||||||
if m then
|
n = n * pound_to_kilograms
|
||||||
return tonumber(m)
|
elseif string.match(value, "kg") then
|
||||||
end
|
-- n = n
|
||||||
end
|
else -- Default, metric tons
|
||||||
|
n = n * 1000
|
||||||
-- try to parse tonns
|
|
||||||
for i, templ in ipairs(tonns_parse_patterns) do
|
|
||||||
m = string.match(value, templ)
|
|
||||||
if m then
|
|
||||||
return tonumber(m) * 1000
|
|
||||||
end
|
end
|
||||||
|
return n
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -83,7 +70,14 @@ function Measure.get_max_width(raw_value)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Get maxweight of specified way in kilogramms
|
--- Get maxlength of specified way in meters.
|
||||||
|
function Measure.get_max_length(raw_value)
|
||||||
|
if raw_value then
|
||||||
|
return Measure.parse_value_meters(raw_value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Get maxweight of specified way in kilogramms.
|
||||||
function Measure.get_max_weight(raw_value)
|
function Measure.get_max_weight(raw_value)
|
||||||
if raw_value then
|
if raw_value then
|
||||||
return Measure.parse_value_kilograms(raw_value)
|
return Measure.parse_value_kilograms(raw_value)
|
||||||
|
|||||||
@@ -511,6 +511,38 @@ function WayHandlers.handle_width(profile,way,result,data)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- handle maxweight tags
|
||||||
|
function WayHandlers.handle_weight(profile,way,result,data)
|
||||||
|
local keys = Sequence { 'maxweight' }
|
||||||
|
local forward, backward = Tags.get_forward_backward_by_set(way,data,keys)
|
||||||
|
forward = Measure.get_max_weight(forward)
|
||||||
|
backward = Measure.get_max_weight(backward)
|
||||||
|
|
||||||
|
if forward and forward < profile.vehicle_weight then
|
||||||
|
result.forward_mode = mode.inaccessible
|
||||||
|
end
|
||||||
|
|
||||||
|
if backward and backward < profile.vehicle_weight then
|
||||||
|
result.backward_mode = mode.inaccessible
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- handle maxlength tags
|
||||||
|
function WayHandlers.handle_length(profile,way,result,data)
|
||||||
|
local keys = Sequence { 'maxlength' }
|
||||||
|
local forward, backward = Tags.get_forward_backward_by_set(way,data,keys)
|
||||||
|
forward = Measure.get_max_length(forward)
|
||||||
|
backward = Measure.get_max_length(backward)
|
||||||
|
|
||||||
|
if forward and forward < profile.vehicle_length then
|
||||||
|
result.forward_mode = mode.inaccessible
|
||||||
|
end
|
||||||
|
|
||||||
|
if backward and backward < profile.vehicle_length then
|
||||||
|
result.backward_mode = mode.inaccessible
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- handle oneways tags
|
-- handle oneways tags
|
||||||
function WayHandlers.oneway(profile,way,result,data)
|
function WayHandlers.oneway(profile,way,result,data)
|
||||||
if not profile.oneway_handling then
|
if not profile.oneway_handling then
|
||||||
|
|||||||
@@ -430,7 +430,6 @@ void ExtractionContainers::PrepareEdges(ScriptingEnvironment &scripting_environm
|
|||||||
util::UnbufferedLog log;
|
util::UnbufferedLog log;
|
||||||
log << "Sorting edges by renumbered start ... ";
|
log << "Sorting edges by renumbered start ... ";
|
||||||
TIMER_START(sort_edges_by_renumbered_start);
|
TIMER_START(sort_edges_by_renumbered_start);
|
||||||
std::mutex name_data_mutex;
|
|
||||||
tbb::parallel_sort(all_edges_list.begin(),
|
tbb::parallel_sort(all_edges_list.begin(),
|
||||||
all_edges_list.end(),
|
all_edges_list.end(),
|
||||||
CmpEdgeByInternalSourceTargetAndName{
|
CmpEdgeByInternalSourceTargetAndName{
|
||||||
|
|||||||
+9
-13
@@ -70,8 +70,8 @@ std::istream &operator>>(std::istream &in, EngineConfig::Algorithm &algorithm)
|
|||||||
throw util::RuntimeError(token, ErrorCode::UnknownAlgorithm, SOURCE_REF);
|
throw util::RuntimeError(token, ErrorCode::UnknownAlgorithm, SOURCE_REF);
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
}
|
} // namespace engine
|
||||||
}
|
} // namespace osrm
|
||||||
|
|
||||||
// generate boost::program_options object for the routing part
|
// generate boost::program_options object for the routing part
|
||||||
inline unsigned generateServerProgramOptions(const int argc,
|
inline unsigned generateServerProgramOptions(const int argc,
|
||||||
@@ -273,10 +273,12 @@ int main(int argc, const char *argv[]) try
|
|||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
int sig = 0;
|
int sig = 0;
|
||||||
sigset_t new_mask;
|
sigset_t wait_mask;
|
||||||
sigset_t old_mask;
|
sigemptyset(&wait_mask);
|
||||||
sigfillset(&new_mask);
|
sigaddset(&wait_mask, SIGINT);
|
||||||
pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask);
|
sigaddset(&wait_mask, SIGQUIT);
|
||||||
|
sigaddset(&wait_mask, SIGTERM);
|
||||||
|
pthread_sigmask(SIG_BLOCK, &wait_mask, nullptr); // only block necessary signals
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto service_handler = std::make_unique<server::ServiceHandler>(config);
|
auto service_handler = std::make_unique<server::ServiceHandler>(config);
|
||||||
@@ -298,19 +300,13 @@ int main(int argc, const char *argv[]) try
|
|||||||
std::thread server_thread(std::move(server_task));
|
std::thread server_thread(std::move(server_task));
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
sigset_t wait_mask;
|
|
||||||
pthread_sigmask(SIG_SETMASK, &old_mask, nullptr);
|
|
||||||
sigemptyset(&wait_mask);
|
|
||||||
sigaddset(&wait_mask, SIGINT);
|
|
||||||
sigaddset(&wait_mask, SIGQUIT);
|
|
||||||
sigaddset(&wait_mask, SIGTERM);
|
|
||||||
pthread_sigmask(SIG_BLOCK, &wait_mask, nullptr);
|
|
||||||
util::Log() << "running and waiting for requests";
|
util::Log() << "running and waiting for requests";
|
||||||
if (std::getenv("SIGNAL_PARENT_WHEN_READY"))
|
if (std::getenv("SIGNAL_PARENT_WHEN_READY"))
|
||||||
{
|
{
|
||||||
kill(getppid(), SIGUSR1);
|
kill(getppid(), SIGUSR1);
|
||||||
}
|
}
|
||||||
sigwait(&wait_mask, &sig);
|
sigwait(&wait_mask, &sig);
|
||||||
|
util::Log() << "received signal " << sig;
|
||||||
#else
|
#else
|
||||||
// Set console control handler to allow server to be stopped.
|
// Set console control handler to allow server to be stopped.
|
||||||
console_ctrl_function = std::bind(&server::Server::Stop, routing_server);
|
console_ctrl_function = std::bind(&server::Server::Stop, routing_server);
|
||||||
|
|||||||
@@ -159,6 +159,7 @@
|
|||||||
{"key": "maxspeed", "value": "DE:rural"},
|
{"key": "maxspeed", "value": "DE:rural"},
|
||||||
{"key": "maxspeed", "value": "DE:motorway"},
|
{"key": "maxspeed", "value": "DE:motorway"},
|
||||||
{"key": "maxspeed", "value": "DK:rural"},
|
{"key": "maxspeed", "value": "DK:rural"},
|
||||||
|
{"key": "maxspeed", "value": "FR:rural"},
|
||||||
{"key": "maxspeed", "value": "GB:nsl_single"},
|
{"key": "maxspeed", "value": "GB:nsl_single"},
|
||||||
{"key": "maxspeed", "value": "GB:nsl_dual"},
|
{"key": "maxspeed", "value": "GB:nsl_dual"},
|
||||||
{"key": "maxspeed", "value": "GB:motorway"},
|
{"key": "maxspeed", "value": "GB:motorway"},
|
||||||
|
|||||||
Reference in New Issue
Block a user