Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2118a2402f | |||
| 46e89716aa | |||
| 4cbc439e03 | |||
| 4acce593db | |||
| 1756208f3f | |||
| 99d78713a2 | |||
| 38ba8b90fc | |||
| 32402263f8 | |||
| 4fbe68f4d7 | |||
| 991cdf7958 | |||
| fdbcefe358 | |||
| 853691aee2 |
+1
-1
@@ -13,7 +13,7 @@ notifications:
|
|||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- "5.19"
|
- "5.18"
|
||||||
# enable building tags
|
# enable building tags
|
||||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||||
|
|
||||||
|
|||||||
+1
-12
@@ -1,18 +1,7 @@
|
|||||||
# 5.19.0
|
# 5.18.1
|
||||||
- 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`.
|
||||||
way | The input way to process (read-only).
|
node | 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 | ""
|
||||||
distance | Read | Float | Length of segment
|
target.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 | x |
|
| some_tag | |
|
||||||
| block | x |
|
| block | x |
|
||||||
|
|
||||||
Scenario: Bike - Access tag trumphs barriers
|
Scenario: Bike - Access tag trumphs barriers
|
||||||
|
|||||||
@@ -48,22 +48,3 @@ 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 | x |
|
| some_tag | |
|
||||||
| block | x |
|
| block | x |
|
||||||
|
|
||||||
Scenario: Foot - Access tag trumphs barriers
|
Scenario: Foot - Access tag trumphs barriers
|
||||||
|
|||||||
@@ -62,14 +62,12 @@ 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();
|
||||||
}
|
}
|
||||||
@@ -873,6 +871,10 @@ argumentsToPluginParameters(const Nan::FunctionCallbackInfo<v8::Value> &args)
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "No format on config" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,8 +146,6 @@ 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,8 +247,9 @@ 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 && (rest + ten_kappa < wp_w || /// closer
|
while (rest < wp_w && delta - rest >= ten_kappa &&
|
||||||
wp_w - rest > rest + ten_kappa - wp_w))
|
(rest + ten_kappa < wp_w || /// closer
|
||||||
|
wp_w - rest > rest + ten_kappa - wp_w))
|
||||||
{
|
{
|
||||||
buffer[len - 1]--;
|
buffer[len - 1]--;
|
||||||
rest += ten_kappa;
|
rest += ten_kappa;
|
||||||
|
|||||||
@@ -81,6 +81,19 @@ 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,11 +22,6 @@ 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) {}
|
||||||
@@ -40,13 +35,13 @@ struct Renderer
|
|||||||
|
|
||||||
void operator()(const Number &number) const
|
void operator()(const Number &number) const
|
||||||
{
|
{
|
||||||
char buffer[MAX_FLOAT_STRING_LENGTH] = {'\0'};
|
char buffer[256] = {'\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 < MAX_FLOAT_STRING_LENGTH && buffer[pos] != 0)
|
while (decimalpos == 0 && pos < 256 && buffer[pos] != 0)
|
||||||
{
|
{
|
||||||
if (buffer[pos] == '.')
|
if (buffer[pos] == '.')
|
||||||
{
|
{
|
||||||
@@ -55,7 +50,7 @@ struct Renderer
|
|||||||
}
|
}
|
||||||
++pos;
|
++pos;
|
||||||
}
|
}
|
||||||
while (pos < MAX_FLOAT_STRING_LENGTH && buffer[pos] != 0)
|
while (pos < 256 && buffer[pos] != 0)
|
||||||
{
|
{
|
||||||
if (pos - decimalpos == 10)
|
if (pos - decimalpos == 10)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "osrm",
|
"name": "osrm",
|
||||||
"version": "5.19.0",
|
"version": "5.18.0-moarshm.5",
|
||||||
"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": {
|
||||||
|
|||||||
+15
-5
@@ -38,10 +38,20 @@ function setup()
|
|||||||
mode.pushing_bike
|
mode.pushing_bike
|
||||||
},
|
},
|
||||||
|
|
||||||
barrier_blacklist = Set {
|
barrier_whitelist = Set {
|
||||||
'yes',
|
'sump_buster',
|
||||||
'wall',
|
'bus_trap',
|
||||||
'fence'
|
'cycle_barrier',
|
||||||
|
'bollard',
|
||||||
|
'entrance',
|
||||||
|
'cattle_grid',
|
||||||
|
'border_control',
|
||||||
|
'toll_booth',
|
||||||
|
'sally_port',
|
||||||
|
'gate',
|
||||||
|
'lift_gate',
|
||||||
|
'no',
|
||||||
|
'block'
|
||||||
},
|
},
|
||||||
|
|
||||||
access_tag_whitelist = Set {
|
access_tag_whitelist = Set {
|
||||||
@@ -235,7 +245,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 profile.barrier_blacklist[barrier] then
|
if not profile.barrier_whitelist[barrier] then
|
||||||
result.barrier = true
|
result.barrier = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -42,10 +42,6 @@ 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'
|
||||||
@@ -280,7 +276,6 @@ 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,
|
||||||
@@ -392,8 +387,6 @@ 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
|
||||||
|
|||||||
+14
-5
@@ -24,10 +24,19 @@ 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_blacklist = Set {
|
barrier_whitelist = Set {
|
||||||
'yes',
|
'cycle_barrier',
|
||||||
'wall',
|
'bollard',
|
||||||
'fence'
|
'entrance',
|
||||||
|
'cattle_grid',
|
||||||
|
'border_control',
|
||||||
|
'toll_booth',
|
||||||
|
'sally_port',
|
||||||
|
'gate',
|
||||||
|
'lift_gate',
|
||||||
|
'no',
|
||||||
|
'kerb',
|
||||||
|
'block'
|
||||||
},
|
},
|
||||||
|
|
||||||
access_tag_whitelist = Set {
|
access_tag_whitelist = Set {
|
||||||
@@ -148,7 +157,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 profile.barrier_blacklist[barrier] and not rising_bollard then
|
if not profile.barrier_whitelist[barrier] and not rising_bollard then
|
||||||
result.barrier = true
|
result.barrier = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+26
-20
@@ -5,7 +5,6 @@ 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
|
||||||
@@ -26,19 +25,33 @@ function Measure.parse_value_meters(value)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Parse weight value in kilograms.
|
--- according to http://wiki.openstreetmap.org/wiki/Map_Features/Units#Explicit_specifications
|
||||||
--- according to https://wiki.openstreetmap.org/wiki/Key:maxweight
|
local tonns_parse_patterns = Sequence {
|
||||||
|
"%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)
|
||||||
local n = tonumber(value:gsub(",", "."):match("%d+%.?%d*"))
|
-- try to parse kilograms
|
||||||
if n then
|
for i, templ in ipairs(kg_parse_patterns) do
|
||||||
if string.match(value, "lbs") then
|
m = string.match(value, templ)
|
||||||
n = n * pound_to_kilograms
|
if m then
|
||||||
elseif string.match(value, "kg") then
|
return tonumber(m)
|
||||||
-- n = n
|
end
|
||||||
else -- Default, metric tons
|
end
|
||||||
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
|
||||||
|
|
||||||
@@ -70,14 +83,7 @@ function Measure.get_max_width(raw_value)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Get maxlength of specified way in meters.
|
--- Get maxweight of specified way in kilogramms
|
||||||
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,38 +511,6 @@ 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,6 +430,7 @@ 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{
|
||||||
|
|||||||
+13
-9
@@ -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,12 +273,10 @@ int main(int argc, const char *argv[]) try
|
|||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
int sig = 0;
|
int sig = 0;
|
||||||
sigset_t wait_mask;
|
sigset_t new_mask;
|
||||||
sigemptyset(&wait_mask);
|
sigset_t old_mask;
|
||||||
sigaddset(&wait_mask, SIGINT);
|
sigfillset(&new_mask);
|
||||||
sigaddset(&wait_mask, SIGQUIT);
|
pthread_sigmask(SIG_BLOCK, &new_mask, &old_mask);
|
||||||
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);
|
||||||
@@ -300,13 +298,19 @@ 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,7 +159,6 @@
|
|||||||
{"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