Updated changelog entry
This commit is contained in:
@@ -216,8 +216,9 @@ int main(int argc, const char *argv[]) try
|
||||
{
|
||||
engine::api::ResultT result = json::Object();
|
||||
const auto rc = osrm.Match(params, result);
|
||||
auto& json_result=result.get<json::Object>();
|
||||
if (rc != Status::Ok || json_result.values.at("matchings").get<json::Array>().values.size() != 1)
|
||||
auto &json_result = result.get<json::Object>();
|
||||
if (rc != Status::Ok ||
|
||||
json_result.values.at("matchings").get<json::Array>().values.size() != 1)
|
||||
{
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -158,8 +158,7 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
||||
|
||||
if (!time_increases_monotonically)
|
||||
{
|
||||
return Error(
|
||||
"InvalidValue", "Timestamps need to be monotonically increasing.", result);
|
||||
return Error("InvalidValue", "Timestamps need to be monotonically increasing.", result);
|
||||
}
|
||||
|
||||
SubMatchingList sub_matchings;
|
||||
@@ -180,9 +179,8 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
||||
(tidied.parameters.waypoints[0] != 0 ||
|
||||
tidied.parameters.waypoints.back() != (tidied.parameters.coordinates.size() - 1)))
|
||||
{
|
||||
return Error("InvalidValue",
|
||||
"First and last coordinates must be specified as waypoints.",
|
||||
result);
|
||||
return Error(
|
||||
"InvalidValue", "First and last coordinates must be specified as waypoints.", result);
|
||||
}
|
||||
|
||||
// assuming radius is the standard deviation of a normal distribution
|
||||
@@ -260,8 +258,7 @@ Status MatchPlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
||||
}
|
||||
if (!tidied_waypoints.empty())
|
||||
{
|
||||
return Error(
|
||||
"NoMatch", "Requested waypoint parameter could not be matched.", result);
|
||||
return Error("NoMatch", "Requested waypoint parameter could not be matched.", result);
|
||||
}
|
||||
}
|
||||
// we haven't errored yet, only allow leg collapsing if it was originally requested
|
||||
|
||||
@@ -669,7 +669,7 @@ Status TilePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
||||
{
|
||||
BOOST_ASSERT(parameters.IsValid());
|
||||
|
||||
auto& pbf_buffer = result.get<std::string>();
|
||||
auto &pbf_buffer = result.get<std::string>();
|
||||
const auto &facade = algorithms.GetFacade();
|
||||
auto edges = getEdges(facade, parameters.x, parameters.y, parameters.z);
|
||||
auto segregated_nodes = getSegregatedNodes(facade, edges);
|
||||
|
||||
@@ -78,9 +78,8 @@ Status ViaRoutePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithm
|
||||
(route_parameters.waypoints[0] != 0 ||
|
||||
route_parameters.waypoints.back() != (route_parameters.coordinates.size() - 1)))
|
||||
{
|
||||
return Error("InvalidValue",
|
||||
"First and last coordinates must be specified as waypoints.",
|
||||
result);
|
||||
return Error(
|
||||
"InvalidValue", "First and last coordinates must be specified as waypoints.", result);
|
||||
}
|
||||
|
||||
if (!CheckAlgorithms(route_parameters, algorithms, result))
|
||||
|
||||
@@ -152,7 +152,7 @@ inline void async(const Nan::FunctionCallbackInfo<v8::Value> &info,
|
||||
void Execute() override try
|
||||
{
|
||||
osrm::engine::api::ResultT r;
|
||||
r=osrm::util::json::Object();
|
||||
r = osrm::util::json::Object();
|
||||
const auto status = ((*osrm).*(service))(*params, r);
|
||||
auto json_result = r.get<osrm::json::Object>();
|
||||
ParseResult(status, json_result);
|
||||
|
||||
@@ -110,15 +110,16 @@ void RequestHandler::HandleRequest(const http::request ¤t_request, http::r
|
||||
|
||||
util::json::render(current_reply.content, result.get<util::json::Object>());
|
||||
}
|
||||
else if(result.is<flatbuffers::FlatBufferBuilder>())
|
||||
else if (result.is<flatbuffers::FlatBufferBuilder>())
|
||||
{
|
||||
auto& buffer = result.get<flatbuffers::FlatBufferBuilder>();
|
||||
auto &buffer = result.get<flatbuffers::FlatBufferBuilder>();
|
||||
current_reply.content.resize(buffer.GetSize());
|
||||
std::copy(buffer.GetBufferPointer(),
|
||||
buffer.GetBufferPointer() + buffer.GetSize(),
|
||||
current_reply.content.begin());
|
||||
|
||||
current_reply.headers.emplace_back("Content-Type", "application/x-flatbuffers;schema=osrm.engine.api.fbresult");
|
||||
current_reply.headers.emplace_back(
|
||||
"Content-Type", "application/x-flatbuffers;schema=osrm.engine.api.fbresult");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -41,8 +41,9 @@ std::string getWrongOptionHelp(const engine::api::MatchParameters ¶meters)
|
||||
}
|
||||
} // anon. ns
|
||||
|
||||
engine::Status
|
||||
MatchService::RunQuery(std::size_t prefix_length, std::string &query, osrm::engine::api::ResultT &result)
|
||||
engine::Status MatchService::RunQuery(std::size_t prefix_length,
|
||||
std::string &query,
|
||||
osrm::engine::api::ResultT &result)
|
||||
{
|
||||
result = util::json::Object();
|
||||
auto &json_result = result.get<util::json::Object>();
|
||||
@@ -70,7 +71,8 @@ MatchService::RunQuery(std::size_t prefix_length, std::string &query, osrm::engi
|
||||
|
||||
if (parameters->format)
|
||||
{
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS) {
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS)
|
||||
{
|
||||
result = flatbuffers::FlatBufferBuilder();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,9 @@ std::string getWrongOptionHelp(const engine::api::NearestParameters ¶meters)
|
||||
}
|
||||
} // anon. ns
|
||||
|
||||
engine::Status
|
||||
NearestService::RunQuery(std::size_t prefix_length, std::string &query, osrm::engine::api::ResultT &result)
|
||||
engine::Status NearestService::RunQuery(std::size_t prefix_length,
|
||||
std::string &query,
|
||||
osrm::engine::api::ResultT &result)
|
||||
{
|
||||
result = util::json::Object();
|
||||
auto &json_result = result.get<util::json::Object>();
|
||||
@@ -64,7 +65,8 @@ NearestService::RunQuery(std::size_t prefix_length, std::string &query, osrm::en
|
||||
|
||||
if (parameters->format)
|
||||
{
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS) {
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS)
|
||||
{
|
||||
result = flatbuffers::FlatBufferBuilder();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,8 +39,9 @@ std::string getWrongOptionHelp(const engine::api::RouteParameters ¶meters)
|
||||
}
|
||||
} // anon. ns
|
||||
|
||||
engine::Status
|
||||
RouteService::RunQuery(std::size_t prefix_length, std::string &query, osrm::engine::api::ResultT &result)
|
||||
engine::Status RouteService::RunQuery(std::size_t prefix_length,
|
||||
std::string &query,
|
||||
osrm::engine::api::ResultT &result)
|
||||
{
|
||||
result = util::json::Object();
|
||||
auto &json_result = result.get<util::json::Object>();
|
||||
@@ -68,7 +69,8 @@ RouteService::RunQuery(std::size_t prefix_length, std::string &query, osrm::engi
|
||||
|
||||
if (parameters->format)
|
||||
{
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS) {
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS)
|
||||
{
|
||||
result = flatbuffers::FlatBufferBuilder();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,8 +70,9 @@ std::string getWrongOptionHelp(const engine::api::TableParameters ¶meters)
|
||||
}
|
||||
} // anon. ns
|
||||
|
||||
engine::Status
|
||||
TableService::RunQuery(std::size_t prefix_length, std::string &query, osrm::engine::api::ResultT &result)
|
||||
engine::Status TableService::RunQuery(std::size_t prefix_length,
|
||||
std::string &query,
|
||||
osrm::engine::api::ResultT &result)
|
||||
{
|
||||
result = util::json::Object();
|
||||
auto &json_result = result.get<util::json::Object>();
|
||||
@@ -99,7 +100,8 @@ TableService::RunQuery(std::size_t prefix_length, std::string &query, osrm::engi
|
||||
|
||||
if (parameters->format)
|
||||
{
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS) {
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS)
|
||||
{
|
||||
result = flatbuffers::FlatBufferBuilder();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,9 @@ namespace server
|
||||
namespace service
|
||||
{
|
||||
|
||||
engine::Status TileService::RunQuery(std::size_t prefix_length, std::string &query, osrm::engine::api::ResultT &result)
|
||||
engine::Status TileService::RunQuery(std::size_t prefix_length,
|
||||
std::string &query,
|
||||
osrm::engine::api::ResultT &result)
|
||||
{
|
||||
auto query_iterator = query.begin();
|
||||
auto parameters =
|
||||
|
||||
@@ -41,7 +41,9 @@ std::string getWrongOptionHelp(const engine::api::TripParameters ¶meters)
|
||||
}
|
||||
} // anon. ns
|
||||
|
||||
engine::Status TripService::RunQuery(std::size_t prefix_length, std::string &query, osrm::engine::api::ResultT &result)
|
||||
engine::Status TripService::RunQuery(std::size_t prefix_length,
|
||||
std::string &query,
|
||||
osrm::engine::api::ResultT &result)
|
||||
{
|
||||
result = util::json::Object();
|
||||
auto &json_result = result.get<util::json::Object>();
|
||||
@@ -71,7 +73,8 @@ engine::Status TripService::RunQuery(std::size_t prefix_length, std::string &que
|
||||
|
||||
if (parameters->format)
|
||||
{
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS) {
|
||||
if (parameters->format == engine::api::BaseParameters::OutputFormatType::FLATBUFFERS)
|
||||
{
|
||||
result = flatbuffers::FlatBufferBuilder();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user