Merge branch 'develop' into develop-lua
This commit is contained in:
commit
6980d19214
@ -40,7 +40,7 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory(
|
|||||||
if(restriction_iter == m_restriction_map.end()) {
|
if(restriction_iter == m_restriction_map.end()) {
|
||||||
index = m_restriction_bucket_list.size();
|
index = m_restriction_bucket_list.size();
|
||||||
m_restriction_bucket_list.resize(index+1);
|
m_restriction_bucket_list.resize(index+1);
|
||||||
m_restriction_map[restriction_source] = index;
|
m_restriction_map.emplace(restriction_source, index);
|
||||||
} else {
|
} else {
|
||||||
index = restriction_iter->second;
|
index = restriction_iter->second;
|
||||||
//Map already contains an is_only_*-restriction
|
//Map already contains an is_only_*-restriction
|
||||||
|
@ -106,9 +106,9 @@ OSRM::~OSRM() {
|
|||||||
void OSRM::RegisterPlugin(BasePlugin * plugin) {
|
void OSRM::RegisterPlugin(BasePlugin * plugin) {
|
||||||
SimpleLogger().Write() << "loaded plugin: " << plugin->GetDescriptor();
|
SimpleLogger().Write() << "loaded plugin: " << plugin->GetDescriptor();
|
||||||
if( pluginMap.find(plugin->GetDescriptor()) != pluginMap.end() ) {
|
if( pluginMap.find(plugin->GetDescriptor()) != pluginMap.end() ) {
|
||||||
delete pluginMap[plugin->GetDescriptor()];
|
delete pluginMap.find(plugin->GetDescriptor())->second;
|
||||||
}
|
}
|
||||||
pluginMap.insert(std::make_pair(plugin->GetDescriptor(), plugin));
|
pluginMap.emplace(plugin->GetDescriptor(), plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OSRM::RunQuery(RouteParameters & route_parameters, http::Reply & reply) {
|
void OSRM::RunQuery(RouteParameters & route_parameters, http::Reply & reply) {
|
||||||
|
@ -24,7 +24,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include "BasePlugin.h"
|
#include "BasePlugin.h"
|
||||||
|
|
||||||
#include "../Algorithms/ObjectToBase64.h"
|
#include "../Algorithms/ObjectToBase64.h"
|
||||||
#include "../DataStructures/HashTable.h"
|
|
||||||
#include "../DataStructures/QueryEdge.h"
|
#include "../DataStructures/QueryEdge.h"
|
||||||
#include "../DataStructures/StaticGraph.h"
|
#include "../DataStructures/StaticGraph.h"
|
||||||
#include "../DataStructures/SearchEngine.h"
|
#include "../DataStructures/SearchEngine.h"
|
||||||
@ -35,6 +34,8 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include "../Util/SimpleLogger.h"
|
#include "../Util/SimpleLogger.h"
|
||||||
#include "../Util/StringUtil.h"
|
#include "../Util/StringUtil.h"
|
||||||
|
|
||||||
|
#include <boost/unordered_map.hpp>
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -58,9 +59,9 @@ public:
|
|||||||
|
|
||||||
searchEnginePtr = new SearchEngine(objects);
|
searchEnginePtr = new SearchEngine(objects);
|
||||||
|
|
||||||
descriptorTable.insert(std::make_pair("" , 0));
|
// descriptorTable.emplace("" , 0);
|
||||||
descriptorTable.insert(std::make_pair("json", 0));
|
descriptorTable.emplace("json", 0);
|
||||||
descriptorTable.insert(std::make_pair("gpx" , 1));
|
descriptorTable.emplace("gpx" , 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~ViaRoutePlugin() {
|
virtual ~ViaRoutePlugin() {
|
||||||
@ -129,7 +130,11 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
_DescriptorConfig descriptorConfig;
|
_DescriptorConfig descriptorConfig;
|
||||||
unsigned descriptorType = descriptorTable[routeParameters.outputFormat];
|
|
||||||
|
unsigned descriptorType = 0;
|
||||||
|
if(descriptorTable.find(routeParameters.outputFormat) != descriptorTable.end() ) {
|
||||||
|
descriptorType = descriptorTable.find(routeParameters.outputFormat)->second;
|
||||||
|
}
|
||||||
descriptorConfig.z = routeParameters.zoomLevel;
|
descriptorConfig.z = routeParameters.zoomLevel;
|
||||||
descriptorConfig.instructions = routeParameters.printInstructions;
|
descriptorConfig.instructions = routeParameters.printInstructions;
|
||||||
descriptorConfig.geometry = routeParameters.geometry;
|
descriptorConfig.geometry = routeParameters.geometry;
|
||||||
|
@ -129,7 +129,6 @@ std::vector<boost::asio::const_buffer> Reply::HeaderstoBuffers(){
|
|||||||
buffers.push_back(ToBuffer(status));
|
buffers.push_back(ToBuffer(status));
|
||||||
for (std::size_t i = 0; i < headers.size(); ++i) {
|
for (std::size_t i = 0; i < headers.size(); ++i) {
|
||||||
Header& h = headers[i];
|
Header& h = headers[i];
|
||||||
// std::cout << h.name << ": " << h.value << std::endl;
|
|
||||||
buffers.push_back(boost::asio::buffer(h.name));
|
buffers.push_back(boost::asio::buffer(h.name));
|
||||||
buffers.push_back(boost::asio::buffer(seperators));
|
buffers.push_back(boost::asio::buffer(seperators));
|
||||||
buffers.push_back(boost::asio::buffer(h.value));
|
buffers.push_back(boost::asio::buffer(h.value));
|
||||||
|
@ -25,12 +25,13 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include "RequestHandler.h"
|
#include "RequestHandler.h"
|
||||||
#include "RequestParser.h"
|
#include "RequestParser.h"
|
||||||
|
|
||||||
#include <boost/asio.hpp>
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
|
#include <boost/asio.hpp>
|
||||||
|
#include <boost/assert.hpp>
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
|
#include <boost/enable_shared_from_this.hpp>
|
||||||
#include <boost/noncopyable.hpp>
|
#include <boost/noncopyable.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/enable_shared_from_this.hpp>
|
|
||||||
|
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
|
||||||
@ -39,88 +40,178 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
namespace http {
|
namespace http {
|
||||||
|
|
||||||
/// Represents a single connection from a client.
|
/// Represents a single connection from a client.
|
||||||
class Connection : public boost::enable_shared_from_this<Connection>, private boost::noncopyable {
|
class Connection : public boost::enable_shared_from_this<Connection>,
|
||||||
|
private boost::noncopyable {
|
||||||
public:
|
public:
|
||||||
explicit Connection(boost::asio::io_service& io_service, RequestHandler& handler) : strand(io_service), TCPsocket(io_service), requestHandler(handler) {}
|
explicit Connection(
|
||||||
|
boost::asio::io_service& io_service,
|
||||||
|
RequestHandler& handler
|
||||||
|
) : strand(io_service), TCP_socket(io_service), request_handler(handler) { }
|
||||||
|
|
||||||
boost::asio::ip::tcp::socket& socket() {
|
boost::asio::ip::tcp::socket& socket() {
|
||||||
return TCPsocket;
|
return TCP_socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Start the first asynchronous operation for the connection.
|
/// Start the first asynchronous operation for the connection.
|
||||||
void start() {
|
void start() {
|
||||||
TCPsocket.async_read_some(boost::asio::buffer(incomingDataBuffer), strand.wrap( boost::bind(&Connection::handleRead, this->shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)));
|
TCP_socket.async_read_some(
|
||||||
|
boost::asio::buffer(incoming_data_buffer),
|
||||||
|
strand.wrap( boost::bind(
|
||||||
|
&Connection::handle_read,
|
||||||
|
this->shared_from_this(),
|
||||||
|
boost::asio::placeholders::error,
|
||||||
|
boost::asio::placeholders::bytes_transferred)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void handleRead(const boost::system::error_code& e, std::size_t bytes_transferred) {
|
void handle_read(
|
||||||
|
const boost::system::error_code& e,
|
||||||
|
std::size_t bytes_transferred
|
||||||
|
) {
|
||||||
if( !e ) {
|
if( !e ) {
|
||||||
CompressionType compressionType(noCompression);
|
CompressionType compression_type(noCompression);
|
||||||
boost::tribool result;
|
boost::tribool result;
|
||||||
boost::tie(result, boost::tuples::ignore) = requestParser.Parse( request, incomingDataBuffer.data(), incomingDataBuffer.data() + bytes_transferred, &compressionType);
|
boost::tie(result, boost::tuples::ignore) = request_parser.Parse(
|
||||||
|
request,
|
||||||
|
incoming_data_buffer.data(),
|
||||||
|
incoming_data_buffer.data() + bytes_transferred,
|
||||||
|
&compression_type
|
||||||
|
);
|
||||||
|
|
||||||
if( result ) {
|
if( result ) {
|
||||||
// std::cout << "----" << std::endl;
|
request.endpoint = TCP_socket.remote_endpoint().address();
|
||||||
// if(compressionType == gzipRFC1952)
|
request_handler.handle_request(request, reply);
|
||||||
// std::cout << "[debug] using gzip" << std::endl;
|
|
||||||
// if(compressionType == deflateRFC1951)
|
|
||||||
// std::cout << "[debug] using deflate" << std::endl;
|
|
||||||
// if(compressionType == noCompression)
|
|
||||||
// std::cout << "[debug] no compression" << std::endl;
|
|
||||||
request.endpoint = TCPsocket.remote_endpoint().address();
|
|
||||||
requestHandler.handle_request(request, reply);
|
|
||||||
|
|
||||||
Header compressionHeader;
|
Header compression_header;
|
||||||
std::vector<unsigned char> compressed;
|
std::vector<unsigned char> compressed_output;
|
||||||
std::vector<boost::asio::const_buffer> outputBuffer;
|
std::vector<boost::asio::const_buffer> output_buffer;
|
||||||
switch(compressionType) {
|
switch(compression_type) {
|
||||||
case deflateRFC1951:
|
case deflateRFC1951:
|
||||||
compressionHeader.name = "Content-Encoding";
|
compression_header.name = "Content-Encoding";
|
||||||
compressionHeader.value = "deflate";
|
compression_header.value = "deflate";
|
||||||
reply.headers.insert(reply.headers.begin(), compressionHeader); //push_back(compressionHeader);
|
reply.headers.insert(
|
||||||
compressCharArray(reply.content.c_str(), reply.content.length(), compressed, compressionType);
|
reply.headers.begin(),
|
||||||
reply.setSize(compressed.size());
|
compression_header
|
||||||
outputBuffer = reply.HeaderstoBuffers();
|
);
|
||||||
outputBuffer.push_back(boost::asio::buffer(compressed));
|
compressCharArray(
|
||||||
boost::asio::async_write(TCPsocket, outputBuffer, strand.wrap( boost::bind(&Connection::handleWrite, this->shared_from_this(), boost::asio::placeholders::error)));
|
reply.content.c_str(),
|
||||||
|
reply.content.length(),
|
||||||
|
compressed_output,
|
||||||
|
compression_type
|
||||||
|
);
|
||||||
|
reply.setSize(compressed_output.size());
|
||||||
|
output_buffer = reply.HeaderstoBuffers();
|
||||||
|
output_buffer.push_back(
|
||||||
|
boost::asio::buffer(compressed_output)
|
||||||
|
);
|
||||||
|
boost::asio::async_write(
|
||||||
|
TCP_socket,
|
||||||
|
output_buffer,
|
||||||
|
strand.wrap(
|
||||||
|
boost::bind(
|
||||||
|
&Connection::handle_write,
|
||||||
|
this->shared_from_this(),
|
||||||
|
boost::asio::placeholders::error
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case gzipRFC1952:
|
case gzipRFC1952:
|
||||||
compressionHeader.name = "Content-Encoding";
|
compression_header.name = "Content-Encoding";
|
||||||
compressionHeader.value = "gzip";
|
compression_header.value = "gzip";
|
||||||
reply.headers.insert(reply.headers.begin(), compressionHeader);
|
reply.headers.insert(
|
||||||
compressCharArray(reply.content.c_str(), reply.content.length(), compressed, compressionType);
|
reply.headers.begin(),
|
||||||
reply.setSize(compressed.size());
|
compression_header
|
||||||
outputBuffer = reply.HeaderstoBuffers();
|
);
|
||||||
outputBuffer.push_back(boost::asio::buffer(compressed));
|
compressCharArray(
|
||||||
boost::asio::async_write(TCPsocket, outputBuffer, strand.wrap( boost::bind(&Connection::handleWrite, this->shared_from_this(), boost::asio::placeholders::error)));break;
|
reply.content.c_str(),
|
||||||
|
reply.content.length(),
|
||||||
|
compressed_output,
|
||||||
|
compression_type
|
||||||
|
);
|
||||||
|
reply.setSize(compressed_output.size());
|
||||||
|
output_buffer = reply.HeaderstoBuffers();
|
||||||
|
output_buffer.push_back(
|
||||||
|
boost::asio::buffer(compressed_output)
|
||||||
|
);
|
||||||
|
boost::asio::async_write(
|
||||||
|
TCP_socket,
|
||||||
|
output_buffer,
|
||||||
|
strand.wrap(
|
||||||
|
boost::bind(
|
||||||
|
&Connection::handle_write,
|
||||||
|
this->shared_from_this(),
|
||||||
|
boost::asio::placeholders::error
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
case noCompression:
|
case noCompression:
|
||||||
boost::asio::async_write(TCPsocket, reply.toBuffers(), strand.wrap( boost::bind(&Connection::handleWrite, this->shared_from_this(), boost::asio::placeholders::error)));
|
boost::asio::async_write(
|
||||||
|
TCP_socket,
|
||||||
|
reply.toBuffers(),
|
||||||
|
strand.wrap(
|
||||||
|
boost::bind(
|
||||||
|
&Connection::handle_write,
|
||||||
|
this->shared_from_this(),
|
||||||
|
boost::asio::placeholders::error
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (!result) {
|
} else if (!result) {
|
||||||
reply = Reply::stockReply(Reply::badRequest);
|
reply = Reply::stockReply(Reply::badRequest);
|
||||||
boost::asio::async_write(TCPsocket, reply.toBuffers(), strand.wrap( boost::bind(&Connection::handleWrite, this->shared_from_this(), boost::asio::placeholders::error)));
|
boost::asio::async_write(
|
||||||
|
TCP_socket,
|
||||||
|
reply.toBuffers(),
|
||||||
|
strand.wrap(
|
||||||
|
boost::bind(
|
||||||
|
&Connection::handle_write,
|
||||||
|
this->shared_from_this(),
|
||||||
|
boost::asio::placeholders::error
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
TCPsocket.async_read_some(boost::asio::buffer(incomingDataBuffer), strand.wrap( boost::bind(&Connection::handleRead, this->shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)));
|
TCP_socket.async_read_some(
|
||||||
|
boost::asio::buffer(incoming_data_buffer),
|
||||||
|
strand.wrap(
|
||||||
|
boost::bind(
|
||||||
|
&Connection::handle_read,
|
||||||
|
this->shared_from_this(),
|
||||||
|
boost::asio::placeholders::error,
|
||||||
|
boost::asio::placeholders::bytes_transferred
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handle completion of a write operation.
|
/// Handle completion of a write operation.
|
||||||
void handleWrite(const boost::system::error_code& e) {
|
void handle_write(const boost::system::error_code& e) {
|
||||||
if (!e) {
|
if (!e) {
|
||||||
// Initiate graceful connection closure.
|
// Initiate graceful connection closure.
|
||||||
boost::system::error_code ignoredEC;
|
boost::system::error_code ignoredEC;
|
||||||
TCPsocket.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignoredEC);
|
TCP_socket.shutdown(
|
||||||
|
boost::asio::ip::tcp::socket::shutdown_both,
|
||||||
|
ignoredEC
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// No new asynchronous operations are started. This means that all shared_ptr
|
|
||||||
// references to the connection object will disappear and the object will be
|
|
||||||
// destroyed automatically after this handler returns. The connection class's
|
|
||||||
// destructor closes the socket.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void compressCharArray(const void *in_data, size_t in_data_size, std::vector<unsigned char> &buffer, CompressionType type) {
|
// Big thanks to deusty who explains how to use gzip compression by
|
||||||
|
// the right call to deflateInit2():
|
||||||
|
// http://deusty.blogspot.com/2007/07/gzip-compressiondecompression.html
|
||||||
|
void compressCharArray(
|
||||||
|
const char * in_data,
|
||||||
|
size_t in_data_size,
|
||||||
|
std::vector<unsigned char> & buffer,
|
||||||
|
CompressionType type
|
||||||
|
) {
|
||||||
const size_t BUFSIZE = 128 * 1024;
|
const size_t BUFSIZE = 128 * 1024;
|
||||||
unsigned char temp_buffer[BUFSIZE];
|
unsigned char temp_buffer[BUFSIZE];
|
||||||
|
|
||||||
@ -140,20 +231,23 @@ private:
|
|||||||
deflateInit(&strm, Z_BEST_SPEED);
|
deflateInit(&strm, Z_BEST_SPEED);
|
||||||
break;
|
break;
|
||||||
case gzipRFC1952:
|
case gzipRFC1952:
|
||||||
/*
|
deflateInit2(
|
||||||
* Big thanks to deusty who explains how to have gzip compression turned on by the right call to deflateInit2():
|
&strm,
|
||||||
* http://deusty.blogspot.com/2007/07/gzip-compressiondecompression.html
|
Z_DEFAULT_COMPRESSION,
|
||||||
*/
|
Z_DEFLATED,
|
||||||
deflateInit2(&strm, Z_DEFAULT_COMPRESSION, Z_DEFLATED, (15+16), 9, Z_DEFAULT_STRATEGY);
|
(15+16),
|
||||||
|
9,
|
||||||
|
Z_DEFAULT_STRATEGY
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
BOOST_ASSERT_MSG(false, "should not happen");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int deflate_res = Z_OK;
|
int deflate_res = Z_OK;
|
||||||
do {
|
do {
|
||||||
if (strm.avail_out == 0) {
|
if ( 0 == strm.avail_out ) {
|
||||||
buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE);
|
buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE);
|
||||||
strm.next_out = temp_buffer;
|
strm.next_out = temp_buffer;
|
||||||
strm.avail_out = BUFSIZE;
|
strm.avail_out = BUFSIZE;
|
||||||
@ -162,17 +256,25 @@ private:
|
|||||||
|
|
||||||
} while (deflate_res == Z_OK);
|
} while (deflate_res == Z_OK);
|
||||||
|
|
||||||
assert(deflate_res == Z_STREAM_END);
|
BOOST_ASSERT_MSG(
|
||||||
buffer.insert(buffer.end(), temp_buffer, temp_buffer + BUFSIZE - strm.avail_out);
|
deflate_res == Z_STREAM_END,
|
||||||
|
"compression not properly finished"
|
||||||
|
);
|
||||||
|
|
||||||
|
buffer.insert(
|
||||||
|
buffer.end(),
|
||||||
|
temp_buffer,
|
||||||
|
temp_buffer + BUFSIZE - strm.avail_out
|
||||||
|
);
|
||||||
deflateEnd(&strm);
|
deflateEnd(&strm);
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::asio::io_service::strand strand;
|
boost::asio::io_service::strand strand;
|
||||||
boost::asio::ip::tcp::socket TCPsocket;
|
boost::asio::ip::tcp::socket TCP_socket;
|
||||||
RequestHandler& requestHandler;
|
RequestHandler& request_handler;
|
||||||
boost::array<char, 8192> incomingDataBuffer;
|
boost::array<char, 8192> incoming_data_buffer;
|
||||||
Request request;
|
Request request;
|
||||||
RequestParser requestParser;
|
RequestParser request_parser;
|
||||||
Reply reply;
|
Reply reply;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
class RequestHandler : private boost::noncopyable {
|
class RequestHandler : private boost::noncopyable {
|
||||||
public:
|
public:
|
||||||
typedef APIGrammar<std::string::iterator, RouteParameters> APIGrammarParser;
|
typedef APIGrammar<std::string::iterator, RouteParameters> APIGrammarParser;
|
||||||
explicit RequestHandler() { }
|
explicit RequestHandler() : routing_machine(NULL) { }
|
||||||
|
|
||||||
void handle_request(const http::Request& req, http::Reply& rep){
|
void handle_request(const http::Request& req, http::Reply& rep){
|
||||||
//parse command
|
//parse command
|
||||||
@ -90,6 +90,10 @@ public:
|
|||||||
rep.content += "^<br></pre>";
|
rep.content += "^<br></pre>";
|
||||||
} else {
|
} else {
|
||||||
//parsing done, lets call the right plugin to handle the request
|
//parsing done, lets call the right plugin to handle the request
|
||||||
|
BOOST_ASSERT_MSG(
|
||||||
|
routing_machine != NULL,
|
||||||
|
"pointer not init'ed"
|
||||||
|
);
|
||||||
routing_machine->RunQuery(routeParameters, rep);
|
routing_machine->RunQuery(routeParameters, rep);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,8 @@ private:
|
|||||||
|
|
||||||
class SimpleLogger {
|
class SimpleLogger {
|
||||||
public:
|
public:
|
||||||
|
SimpleLogger() : level(logINFO) { }
|
||||||
|
|
||||||
std::ostringstream& Write(LogLevel l = logINFO) {
|
std::ostringstream& Write(LogLevel l = logINFO) {
|
||||||
try {
|
try {
|
||||||
boost::mutex::scoped_lock lock(logger_mutex);
|
boost::mutex::scoped_lock lock(logger_mutex);
|
||||||
|
@ -22,7 +22,7 @@ Reference: http://wiki.openstreetmap.org/wiki/Key:access
|
|||||||
| | no | yes | x |
|
| | no | yes | x |
|
||||||
| | yes | no | |
|
| | yes | no | |
|
||||||
|
|
||||||
Scenario: Bike - Overwriting implied acccess on nodes
|
Scenario: Bike - Overwriting implied acccess on nodes doesn't overwrite way
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | node/access | node/vehicle | node/bicycle | bothw |
|
| highway | node/access | node/vehicle | node/bicycle | bothw |
|
||||||
| cycleway | | | | x |
|
| cycleway | | | | x |
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
class FuzzyMatch
|
class FuzzyMatch
|
||||||
|
|
||||||
def self.match got, want
|
def self.match got, want
|
||||||
@ -31,4 +30,3 @@ class FuzzyMatch
|
|||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -47,4 +47,3 @@ end
|
|||||||
def fingerprint
|
def fingerprint
|
||||||
@fingerprint ||= Digest::SHA1.hexdigest "#{bin_extract_hash}-#{bin_prepare_hash}-#{bin_routed_hash}-#{profile_hash}-#{lua_lib_hash}-#{osm_hash}"
|
@fingerprint ||= Digest::SHA1.hexdigest "#{bin_extract_hash}-#{bin_prepare_hash}-#{bin_routed_hash}-#{profile_hash}-#{lua_lib_hash}-#{osm_hash}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -63,5 +63,3 @@ end
|
|||||||
|
|
||||||
def log_preprocess_done
|
def log_preprocess_done
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
10
routed.cpp
10
routed.cpp
@ -73,16 +73,6 @@ int main (int argc, char * argv[]) {
|
|||||||
|
|
||||||
installCrashHandler(argv[0]);
|
installCrashHandler(argv[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Bug - testing not necessary. testDataFiles also tries to open the first
|
|
||||||
// argv, which is the name of exec file
|
|
||||||
//if(testDataFiles(argc, argv)==false) {
|
|
||||||
//std::cerr << "[error] at least one data file name seems to be bogus!" << std::endl;
|
|
||||||
//exit(-1);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//std::cout << "fingerprint: " << UUID::GetInstance().GetUUID() << std::endl;
|
|
||||||
|
|
||||||
SimpleLogger().Write() <<
|
SimpleLogger().Write() <<
|
||||||
"starting up engines, compiled at " << __DATE__ << ", " __TIME__;
|
"starting up engines, compiled at " << __DATE__ << ", " __TIME__;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user