Merge fixed

This commit is contained in:
DennisOSRM 2011-12-13 11:08:40 +01:00
commit e849d18c1b
20 changed files with 118 additions and 951 deletions

View File

@ -32,7 +32,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
* Note: points may also be pre-selected*/
//These thresholds are more or less heuristically chosen.
static double DouglasPeuckerThresholds[19] = { 10240000., 512., 2560000., 1280000., 640000., 320000., 160000., 80000., 40000., 20000., 10000., 5000., 2400., 1200., 200, 16, 6, 3., 1. };
static double DouglasPeuckerThresholds[19] = { 10240000., 5120000., 2560000., 1280000., 640000., 320000., 160000., 80000., 40000., 20000., 10000., 5000., 2400., 1200., 200, 16, 6, 3., 1. };
template<class PointT>
class DouglasPeucker {

View File

@ -40,11 +40,8 @@ private:
parent = p;
}
};
#ifdef _MANYCORES
typedef BinaryHeap< NodeID, NodeID, int, _HeapData, DenseStorage<NodeID, NodeID> > _Heap;
#else
typedef BinaryHeap< NodeID, NodeID, int, _CleanupHeapData > _Heap;
#endif
struct _ThreadData {
_Heap* _heapForward;
_Heap* _heapBackward;
@ -52,8 +49,7 @@ private:
_heapBackward = new _Heap(nodes);
_heapForward = new _Heap(nodes);
}
~_ThreadData()
{
~_ThreadData() {
delete _heapBackward;
delete _heapForward;
}
@ -65,13 +61,13 @@ public:
NodeID source;
NodeID target;
struct EdgeData {
NodeID via;
unsigned nameID;
int distance;
bool shortcut;
bool forward;
bool backward;
short turnInstruction;
NodeID via;
unsigned nameID;
int distance;
short turnInstruction;
bool shortcut:1;
bool forward:1;
bool backward:1;
} data;
//sorts by source and other attributes

View File

@ -41,16 +41,15 @@ or see http://www.gnu.org/licenses/agpl.txt.
class Contractor {
private:
struct _EdgeBasedContractorEdgeData {
unsigned distance;
unsigned originalEdges;
unsigned via;
unsigned nameID;
bool shortcut;
bool forward;
bool backward;
short turnInstruction;
unsigned distance;
unsigned originalEdges;
unsigned via;
unsigned nameID;
short turnInstruction;
bool shortcut:1;
bool forward:1;
bool backward:1;
} data;
struct _HeapData {
@ -107,7 +106,7 @@ public:
edge.data.distance = (std::max)((int)i->weight(), 1 );
assert( edge.data.distance > 0 );
#ifndef NDEBUG
#ifdef NDEBUG
if ( edge.data.distance > 24 * 60 * 60 * 10 ) {
std::cout << "Edge Weight too large -> May lead to invalid CH" << std::endl;
continue;

View File

@ -132,7 +132,7 @@ void EdgeBasedGraphFactory::Run() {
++secondRestrictionIterator;
} while(u == secondRestrictionIterator->fromNode);
}
if(_nodeBasedGraph->EndEdges(v) == _nodeBasedGraph->BeginEdges(v) + 1 && _nodeBasedGraph->GetEdgeData(e1).type != 14 ) {
if(_nodeBasedGraph->EndEdges(v) == _nodeBasedGraph->BeginEdges(v) + 1 && _nodeBasedGraph->GetEdgeData(e1).type != INT_MAX) {
EdgeBasedNode currentNode;
currentNode.nameID = _nodeBasedGraph->GetEdgeData(e1).nameID;
currentNode.lat1 = inputNodeInfoList[u].lat;
@ -205,7 +205,7 @@ void EdgeBasedGraphFactory::Run() {
EdgeBasedEdge newEdge(edgeBasedSource, edgeBasedTarget, v, nameID, distance, true, false, turnInstruction);
edgeBasedEdges.push_back(newEdge);
if(_nodeBasedGraph->GetEdgeData(e1).type != 14 ) {
if(_nodeBasedGraph->GetEdgeData(e1).type != INT_MAX ) {
EdgeBasedNode currentNode;
currentNode.nameID = _nodeBasedGraph->GetEdgeData(e1).nameID;
currentNode.lat1 = inputNodeInfoList[u].lat;
@ -213,12 +213,12 @@ void EdgeBasedGraphFactory::Run() {
currentNode.lat2 = inputNodeInfoList[v].lat;
currentNode.lon2 = inputNodeInfoList[v].lon;
currentNode.id = edgeBasedSource;
short startHeight = srtmLookup.height(currentNode.lon1/100000.,currentNode.lat1/100000. );
short targetHeight = srtmLookup.height(currentNode.lon2/100000.,currentNode.lat2/100000. );
short heightDiff = startHeight - targetHeight;
double increase = (heightDiff/ApproximateDistance(currentNode.lat1, currentNode.lon1, currentNode.lat2, currentNode.lon2));
if(heightDiff != 0)
INFO("Increase at turn: " << heightDiff << ", edge length: " << ApproximateDistance(currentNode.lat1, currentNode.lon1, currentNode.lat2, currentNode.lon2) << ", percentage: " << increase ); //incorporate height diff;
// short startHeight = srtmLookup.height(currentNode.lon1/100000.,currentNode.lat1/100000. );
// short targetHeight = srtmLookup.height(currentNode.lon2/100000.,currentNode.lat2/100000. );
// short heightDiff = startHeight - targetHeight;
// double increase = (heightDiff/ApproximateDistance(currentNode.lat1, currentNode.lon1, currentNode.lat2, currentNode.lon2));
// if(heightDiff != 0)
// INFO("Increase at turn: " << heightDiff << ", edge length: " << ApproximateDistance(currentNode.lat1, currentNode.lon1, currentNode.lat2, currentNode.lon2) << ", percentage: " << increase ); //incorporate height diff;
currentNode.weight = distance;
edgeBasedNodes.push_back(currentNode);
}

View File

@ -28,9 +28,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <vector>
#include <algorithm>
#include <map>
#include <google/dense_hash_map>
#include <google/sparse_hash_map>
#include <google/sparsetable>
#include <boost/unordered_map.hpp>
template< typename NodeID, typename Key >
class ArrayStorage {
@ -74,10 +72,10 @@ private:
};
template< typename NodeID, typename Key >
class DenseStorage {
class UnorderedMapStorage {
public:
DenseStorage( size_t size = 0 ) { nodes.set_empty_key(UINT_MAX); }
UnorderedMapStorage( size_t size = 0 ) { }
Key &operator[]( NodeID node ) {
return nodes[node];
@ -88,34 +86,7 @@ public:
}
private:
google::dense_hash_map< NodeID, Key > nodes;
};
template< typename NodeID, typename Key >
class SparseStorage {
public:
SparseStorage( size_t size = 0 ) { }
Key &operator[]( NodeID node ) {
return nodes[node];
}
void Clear() {
nodes.clear();
}
private:
google::sparse_hash_map< NodeID, Key > nodes;
};
template< typename NodeID, typename Key >
class SparseTableStorage : public google::sparsetable<NodeID> {
public:
SparseTableStorage(size_t n) : google::sparsetable<NodeID>(n){ }
void Clear() {
google::sparsetable<NodeID>::clear();
}
boost::unordered_map< NodeID, Key > nodes;
};
template<typename NodeID = unsigned>

View File

@ -264,6 +264,9 @@ struct Settings {
return speedProfile.at(param).first;
}
int GetHighwayTypeID(const std::string & param) const {
if(param == excludeFromGrid) {
return INT_MAX;
}
if(speedProfile.find(param) == speedProfile.end()) {
DEBUG("There is a bug with highway \"" << param << "\"");
return -1;

View File

@ -1,9 +1,10 @@
#include <climits>
#include <google/sparse_hash_map>
#include <iostream>
#include <list>
#include <vector>
#include <boost/unordered_map.hpp>
template < class T >
struct Countfn {
unsigned long operator()( const T &x ) { return 1; }
@ -17,7 +18,7 @@ public:
typedef std::vector< Key > Key_List; ///< List of keys
typedef typename Key_List::iterator Key_List_Iter; ///< Main cache iterator
typedef typename Key_List::const_iterator Key_List_cIter; ///< Main cache iterator (const)
typedef google::sparse_hash_map< Key, List_Iter > Map; ///< Index typedef
typedef boost::unordered_map< Key, List_Iter > Map; ///< Index typedef
typedef std::pair< Key, List_Iter > Pair; ///< Pair of Map elements
typedef typename Map::iterator Map_Iter; ///< Index iterator
typedef typename Map::const_iterator Map_cIter; ///< Index iterator (const)
@ -29,9 +30,7 @@ private:
unsigned long _curr_size; ///< Current abstract size of the cache
public:
LRUCache( const unsigned long Size ) : _max_size( Size ), _curr_size( 0 ) {
_index.set_deleted_key(UINT_MAX);
}
LRUCache( const unsigned long Size ) : _max_size( Size ), _curr_size( 0 ) { }
~LRUCache() { clear(); }

View File

@ -35,7 +35,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <boost/thread.hpp>
#include <boost/foreach.hpp>
#include <google/dense_hash_map>
#include <boost/unordered_map.hpp>
#include "ExtractorStructs.h"
#include "GridEdge.h"
@ -179,21 +179,15 @@ public:
void OpenIndexFiles() {
assert(ramInFile.is_open());
for(int i = 0; i < 1024*1024; ++i) {
unsigned temp;
ramInFile.read((char*)&temp, sizeof(unsigned));
ramIndexTable[i] = temp;
}
ramInFile.read((char*)&ramIndexTable[0], sizeof(unsigned)*1024*1024);
ramInFile.close();
}
template<typename EdgeT, typename NodeInfoT>
void ConstructGrid(std::vector<EdgeT> & edgeList, vector<NodeInfoT> * int2ExtNodeMap, char * ramIndexOut, char * fileIndexOut) {
Percent p(edgeList.size());
for(NodeID i = 0; i < edgeList.size(); ++i) {
BOOST_FOREACH(EdgeT & edge, edgeList) {
p.printIncrement();
EdgeT & edge = edgeList[i];
int slat = 100000*lat2y(edge.lat1/100000.);
int slon = edge.lon1;
@ -215,7 +209,9 @@ public:
std::vector<GridEntry> entriesInFileWithRAMSameIndex;
unsigned indexInRamTable = entries->begin()->ramIndex;
unsigned lastPositionInIndexFile = 0;
#ifdef NDEBUG
unsigned numberOfUsedCells = 0;
#endif
unsigned maxNumberOfRAMCellElements = 0;
cout << "writing data ..." << flush;
p.reinit(entries->size());
@ -230,65 +226,40 @@ public:
lastPositionInIndexFile += numberOfBytesInCell;
entriesInFileWithRAMSameIndex.clear();
indexInRamTable = vt->ramIndex;
#ifdef NDEBUG
numberOfUsedCells++;
#endif
}
entriesInFileWithRAMSameIndex.push_back(*vt);
}
/*unsigned numberOfBytesInCell = */FillCell(entriesInFileWithRAMSameIndex, lastPositionInIndexFile);
ramIndexTable[indexInRamTable] = lastPositionInIndexFile;
#ifdef NDEBUG
numberOfUsedCells++;
#endif
entriesInFileWithRAMSameIndex.clear();
std::vector<GridEntry>().swap(entriesInFileWithRAMSameIndex);
assert(entriesInFileWithRAMSameIndex.size() == 0);
//close index file
indexOutFile.close();
#ifdef NDEBUG
for(int i = 0; i < 1024*1024; ++i) {
if(ramIndexTable[i] != UINT_MAX) {
numberOfUsedCells--;
}
}
assert(numberOfUsedCells == 0);
//close index file
indexOutFile.close();
#endif
//Serialize RAM Index
ofstream ramFile(ramIndexOut, std::ios::out | std::ios::binary | std::ios::trunc);
//write 4 MB of index Table in RAM
for(int i = 0; i < 1024*1024; ++i)
ramFile.write((char *)&ramIndexTable[i], sizeof(unsigned) );
ramFile.write((char *)&ramIndexTable[0], sizeof(unsigned)*1024*1024 );
//close ram index file
ramFile.close();
}
bool GetEdgeBasedStartNode(const _Coordinate& coord, NodesOfEdge& nodesOfEdge) {
_Coordinate startCoord(100000*(lat2y(static_cast<double>(coord.lat)/100000.)), coord.lon);
/** search for point on edge next to source */
unsigned fileIndex = GetFileIndexForLatLon(startCoord.lat, startCoord.lon);
std::vector<_GridEdge> candidates;
for(int j = -32768; j < (32768+1); j+=32768) {
for(int i = -1; i < 2; i++){
GetContentsOfFileBucket(fileIndex+i+j, candidates);
}
}
_Coordinate tmp;
double dist = numeric_limits<double>::max();
BOOST_FOREACH(_GridEdge candidate, candidates) {
double r = 0.;
double tmpDist = ComputeDistance(startCoord, candidate.startCoord, candidate.targetCoord, tmp, &r);
if(tmpDist < dist) {
nodesOfEdge.edgeBasedNode = candidate.edgeBasedNode;
nodesOfEdge.ratio = r;
dist = tmpDist;
nodesOfEdge.projectedPoint.lat = round(100000*(y2lat(static_cast<double>(tmp.lat)/100000.)));
nodesOfEdge.projectedPoint.lon = tmp.lon;
}
}
if(dist != (numeric_limits<double>::max)()) {
return true;
}
return false;
}
bool FindPhantomNodeForCoordinate( const _Coordinate & location, PhantomNode & resultNode) {
bool foundNode = false;
_Coordinate startCoord(100000*(lat2y(static_cast<double>(location.lat)/100000.)), location.lon);
@ -308,24 +279,23 @@ public:
BOOST_FOREACH(_GridEdge candidate, candidates) {
double r = 0.;
double tmpDist = ComputeDistance(startCoord, candidate.startCoord, candidate.targetCoord, tmp, &r);
if(DoubleEpsilonCompare(dist, tmpDist) && 1 == std::abs((int)candidate.edgeBasedNode-(int)resultNode.edgeBasedNode)) {
resultNode.weight2 = candidate.weight;
// INFO("b) " << candidate.edgeBasedNode << ", dist: " << tmpDist);
}
if(tmpDist < dist && !DoubleEpsilonCompare(dist, tmpDist)) {
// INFO("a) " << candidate.edgeBasedNode << ", dist: " << tmpDist);
resultNode.Reset();
resultNode.edgeBasedNode = candidate.edgeBasedNode;
resultNode.nodeBasedEdgeNameID = candidate.nameID;
resultNode.weight1 = candidate.weight;
dist = tmpDist;
resultNode.location.lat = round(100000*(y2lat(static_cast<double>(tmp.lat)/100000.)));
resultNode.location.lon = tmp.lon;
foundNode = true;
smallestEdge = candidate;
newEndpoint = tmp;
// } else if(tmpDist < dist) {
// INFO("a) ignored " << candidate.edgeBasedNode << " at distance " << std::fabs(dist - tmpDist));
//INFO("a) " << candidate.edgeBasedNode << ", dist: " << tmpDist);
resultNode.Reset();
resultNode.edgeBasedNode = candidate.edgeBasedNode;
resultNode.nodeBasedEdgeNameID = candidate.nameID;
resultNode.weight1 = candidate.weight;
dist = tmpDist;
resultNode.location.lat = round(100000*(y2lat(static_cast<double>(tmp.lat)/100000.)));
resultNode.location.lon = tmp.lon;
foundNode = true;
smallestEdge = candidate;
newEndpoint = tmp;
//} else if(tmpDist < dist) {
//INFO("a) ignored " << candidate.edgeBasedNode << " at distance " << std::fabs(dist - tmpDist));
} else if(DoubleEpsilonCompare(dist, tmpDist) && 1 == std::abs((int)candidate.edgeBasedNode-(int)resultNode.edgeBasedNode)) {
resultNode.weight2 = candidate.weight;
//INFO("b) " << candidate.edgeBasedNode << ", dist: " << tmpDist);
}
}
@ -340,12 +310,12 @@ public:
double ratio = std::min(1., LengthOfVector(smallestEdge.startCoord, newEndpoint)/LengthOfVector(smallestEdge.startCoord, smallestEdge.targetCoord) );
assert(ratio >= 0 && ratio <=1);
// INFO("Old weight1: " << resultNode.weight1 << ", old weight2: " << resultNode.weight2);
// INFO("node: " << resultNode.edgeBasedNode << ", orig weight1: " << resultNode.weight1 << ", orig weight2: " << resultNode.weight2);
resultNode.weight1 *= ratio;
if(INT_MAX != resultNode.weight2) {
resultNode.weight2 *= (1.-ratio);
// INFO("New weight1: " << resultNode.weight1 << ", new weight2: " << resultNode.weight2);
resultNode.weight2 -= resultNode.weight1;
}
// INFO("New weight1: " << resultNode.weight1 << ", new weight2: " << resultNode.weight2);
// INFO("selected node: " << resultNode.edgeBasedNode << ", bidirected: " << (resultNode.isBidirected() ? "yes" : "no") << "\n--")
return foundNode;
}
@ -421,8 +391,7 @@ private:
vector<unsigned> cellIndex;
cellIndex.resize(32*32,UINT_MAX);
google::dense_hash_map< unsigned, unsigned > * cellMap = new google::dense_hash_map< unsigned, unsigned >(1024);
cellMap->set_empty_key(UINT_MAX);
boost::unordered_map< unsigned, unsigned > cellMap(1024);
unsigned ramIndex = entriesWithSameRAMIndex.begin()->ramIndex;
unsigned lineBase = ramIndex/1024;
@ -434,7 +403,7 @@ private:
for(int j = 0; j < 32; j++) {
unsigned fileIndex = lineBase + i*32768 + columnBase+j;
unsigned cellIndex = i*32+j;
cellMap->insert(std::make_pair(fileIndex, cellIndex));
cellMap.insert(std::make_pair(fileIndex, cellIndex));
}
}
@ -451,13 +420,13 @@ private:
unsigned fileIndex = entriesWithSameRAMIndex.begin()->fileIndex;
for(std::vector<GridEntry>::iterator it = entriesWithSameRAMIndex.begin(); it != uniqueEnd; it++) {
assert(cellMap->find(it->fileIndex) != cellMap->end() ); //asserting that file index belongs to cell index
assert(cellMap.find(it->fileIndex) != cellMap.end() ); //asserting that file index belongs to cell index
if(it->fileIndex != fileIndex) {
// start in cellIndex vermerken
int localFileIndex = entriesWithSameFileIndex.begin()->fileIndex;
int localCellIndex = cellMap->find(localFileIndex)->second;
int localCellIndex = cellMap.find(localFileIndex)->second;
/*int localRamIndex = */GetRAMIndexFromFileIndex(localFileIndex);
assert(cellMap->find(entriesWithSameFileIndex.begin()->fileIndex) != cellMap->end());
assert(cellMap.find(entriesWithSameFileIndex.begin()->fileIndex) != cellMap.end());
cellIndex[localCellIndex] = indexIntoTmpBuffer + fileOffset;
indexIntoTmpBuffer += FlushEntriesWithSameFileIndexToBuffer(entriesWithSameFileIndex, tmpBuffer, indexIntoTmpBuffer);
@ -466,9 +435,9 @@ private:
entriesWithSameFileIndex.push_back(data);
fileIndex = it->fileIndex;
}
assert(cellMap->find(entriesWithSameFileIndex.begin()->fileIndex) != cellMap->end());
assert(cellMap.find(entriesWithSameFileIndex.begin()->fileIndex) != cellMap.end());
int localFileIndex = entriesWithSameFileIndex.begin()->fileIndex;
int localCellIndex = cellMap->find(localFileIndex)->second;
int localCellIndex = cellMap.find(localFileIndex)->second;
/*int localRamIndex = */GetRAMIndexFromFileIndex(localFileIndex);
cellIndex[localCellIndex] = indexIntoTmpBuffer + fileOffset;
@ -488,7 +457,6 @@ private:
}
delete tmpBuffer;
delete cellMap;
return numberOfWrittenBytes;
}
@ -530,8 +498,7 @@ private:
std::vector<unsigned> cellIndex;
cellIndex.resize(32*32);
google::dense_hash_map< unsigned, unsigned > cellMap(1024);
cellMap.set_empty_key(UINT_MAX);
boost::unordered_map< unsigned, unsigned > cellMap(1024);
unsigned lineBase = ramIndex/1024;
lineBase = lineBase*32*32768;

View File

@ -73,10 +73,6 @@ public:
return true;
}
inline bool GetStartAndDestNodesOfEdge(const _Coordinate& coord, NodesOfEdge& nodesOfEdge) {
return readOnlyGrid->GetEdgeBasedStartNode(coord, nodesOfEdge);
}
inline void FindNearestPointOnEdge(const _Coordinate & input, _Coordinate& output){
readOnlyGrid->FindNearestPointOnEdge(input, output);
}

View File

@ -36,7 +36,7 @@ struct _HeapData {
_HeapData( NodeID p ) : parent(p) { }
};
typedef boost::thread_specific_ptr<BinaryHeap< NodeID, NodeID, int, _HeapData > > HeapPtr;
typedef boost::thread_specific_ptr<BinaryHeap< NodeID, NodeID, int, _HeapData> > HeapPtr;
template<class EdgeData, class GraphT>
class SearchEngine {
@ -58,12 +58,12 @@ public:
inline void InitializeThreadLocalStorageIfNecessary() {
if(!_forwardHeap.get())
_forwardHeap.reset(new BinaryHeap< NodeID, NodeID, int, _HeapData >(nodeHelpDesk->getNumberOfNodes()));
_forwardHeap.reset(new BinaryHeap< NodeID, NodeID, int, _HeapData>(nodeHelpDesk->getNumberOfNodes()));
else
_forwardHeap->Clear();
if(!_backwardHeap.get())
_backwardHeap.reset(new BinaryHeap< NodeID, NodeID, int, _HeapData >(nodeHelpDesk->getNumberOfNodes()));
_backwardHeap.reset(new BinaryHeap< NodeID, NodeID, int, _HeapData>(nodeHelpDesk->getNumberOfNodes()));
else
_backwardHeap->Clear();
}
@ -89,15 +89,15 @@ public:
_backwardHeap->Insert(phantomNodes.targetPhantom.edgeBasedNode+1, phantomNodes.targetPhantom.weight2, phantomNodes.targetPhantom.edgeBasedNode+1);
// INFO("d) back insert " << phantomNodes.targetPhantom.edgeBasedNode+1 << ", weight: " << phantomNodes.targetPhantom.weight2);
}
int startOffset = (phantomNodes.startPhantom.isBidirected() ? std::max(phantomNodes.startPhantom.weight1, phantomNodes.startPhantom.weight2) : phantomNodes.startPhantom.weight1) ;
int targetOffset = 0;//(phantomNodes.targetPhantom.isBidirected() ? std::max(phantomNodes.targetPhantom.weight1, phantomNodes.targetPhantom.weight2) : phantomNodes.targetPhantom.weight1) ;
int offset = (phantomNodes.startPhantom.isBidirected() ? std::max(phantomNodes.startPhantom.weight1, phantomNodes.startPhantom.weight2) : phantomNodes.startPhantom.weight1) ;
offset += (phantomNodes.targetPhantom.isBidirected() ? std::max(phantomNodes.targetPhantom.weight1, phantomNodes.targetPhantom.weight2) : phantomNodes.targetPhantom.weight1) ;
while(_forwardHeap->Size() + _backwardHeap->Size() > 0){
if(_forwardHeap->Size() > 0){
_RoutingStep(_forwardHeap, _backwardHeap, true, &middle, &_upperbound, startOffset);
_RoutingStep(_forwardHeap, _backwardHeap, true, &middle, &_upperbound, 2*offset);
}
if(_backwardHeap->Size() > 0){
_RoutingStep(_backwardHeap, _forwardHeap, false, &middle, &_upperbound, targetOffset);
_RoutingStep(_backwardHeap, _forwardHeap, false, &middle, &_upperbound, 2*offset);
}
}
@ -158,25 +158,25 @@ public:
return GetEscapedNameForNameID(nameID);
}
private:
inline void _RoutingStep(HeapPtr & _forwardHeap, HeapPtr & _backwardHeap, const bool & forwardDirection, NodeID *middle, int *_upperbound, const int negativeOffset) const {
inline void _RoutingStep(HeapPtr & _forwardHeap, HeapPtr & _backwardHeap, const bool & forwardDirection, NodeID *middle, int *_upperbound, const int edgeBasedOffset) const {
const NodeID node = _forwardHeap->DeleteMin();
const int distance = _forwardHeap->GetKey(node);
// INFO((forwardDirection ? "[forw]" : "[back]") << " settled node " << node << " at distance " << distance);
if(_backwardHeap->WasInserted(node) ){
// INFO((forwardDirection ? "[forw]" : "[back]") << " scanned node " << node << " in both directions");
const int newDistance = _backwardHeap->GetKey(node) + distance;
if(newDistance < *_upperbound ){
if(newDistance>=0 ) {
// INFO((forwardDirection ? "[forw]" : "[back]") << " settled node " << node << " is new middle at total distance " << newDistance);
*middle = node;
*_upperbound = newDistance;
// } else {
// INFO((forwardDirection ? "[forw]" : "[back]") << " ignored " << node << " as new middle at total distance " << newDistance);
}
// INFO((forwardDirection ? "[forw]" : "[back]") << " scanned node " << node << " in both directions");
const int newDistance = _backwardHeap->GetKey(node) + distance;
if(newDistance < *_upperbound ){
if(newDistance>=0 ) {
// INFO((forwardDirection ? "[forw]" : "[back]") << " -> node " << node << " is new middle at total distance " << newDistance);
*middle = node;
*_upperbound = newDistance;
} else {
// INFO((forwardDirection ? "[forw]" : "[back]") << " -> ignored " << node << " as new middle at total distance " << newDistance);
}
}
}
if(distance-negativeOffset > *_upperbound){
if(distance-edgeBasedOffset > *_upperbound){
_forwardHeap->DeleteAll();
return;
}
@ -217,7 +217,7 @@ private:
}
//Found a shorter Path -> Update distance
else if ( toDistance < _forwardHeap->GetKey( to ) ) {
// INFO((forwardDirection ? "[forw]" : "[back]") << " decrease and scanning edge (" << node << "," << to << ") with distance " << toDistance << ", edge length: " << data.distance);
// INFO((forwardDirection ? "[forw]" : "[back]") << " decrease and scanning edge (" << node << "," << to << ") from " << _forwardHeap->GetKey(to) << "to " << toDistance << ", edge length: " << data.distance);
_forwardHeap->GetData( to ).parent = node;
_forwardHeap->DecreaseKey( to, toDistance );
//new parent

View File

@ -1,9 +0,0 @@
Third Party Libraries:
Scons 1.3+
Boost 1.37+
sparsehash 1.4+
stxxl 1.3.1+
libz2-dev 1.0.5+
protobuffer 2.3.0+
zlib 1.2.3.4+

View File

@ -1,11 +0,0 @@
<?
$url = $_SERVER['HTTP_HOST'];
if($url == "map.project-osrm.org" || $url == "www.map.project-osrm.org") {
$file = file_get_contents('map.html');
echo $file;
return;
}
$file = file_get_contents('main.html');
echo $file;
return;
?>

View File

@ -1,158 +0,0 @@
<html><head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
<title>Open Source Routing Machine</title>
<link href="osrm.css" rel="stylesheet" type="text/css">
</head><body>
<div id="mainnav" class="nav">
<ul>
<a href="http://sourceforge.net/apps/trac/routed/wiki">Wiki</a></li><li><a href="http://sourceforge.net/apps/trac/routed/timeline">Timeline</a></li><li><a href="http://sourceforge.net/apps/trac/routed/roadmap">Roadmap</a></li><li><a href="http://sourceforge.net/apps/trac/routed/browser">Browse Source</a></li><li><a href="http://sourceforge.net/apps/trac/routed/report">View Tickets</a></li><li><a href="http://sourceforge.net/apps/trac/routed/newticket">New Ticket</a></li><li class="last"><a href="http://sourceforge.net/apps/trac/routed/search">Search</a></li>
</ul>
</div>
<img src="osrm3.png" alt="Logo" >
<p> The Open Source Routing Machine (<strong>OSRM</strong>) is a C++ implementation of a high-performance routing engine for shortest paths in road networks.
It combines sophisticated routing algorithms with the open and free road network data of the <a href="http://www.openstreetmap.org">OpenStreetMap</a> (OSM) project.
Shortest path computation on a <strong>continental sized network</strong> can take up to several seconds if it is done without a so-called speedup-technique.
OSRM is able to compute and output a shortest path between any origin and destination within a few miliseconds.
Since it is designed with <strong>OpenStreetMap</strong> compatibility in mind, OSM data files can be easily imported.
A <a href="http://map.project-osrm.org/">demo installation</a> is provided by our friends at <a href="http://www.geofabrik.de">Geofabrik</a>. OSRM is under active development.
</p>
<p style="padding-bottom: 0px;"> The key features of <b>OSRM</b> are:
</p>
<ul style="margin-left: 20px;">
<li> High Performance Routing Algorithm </li>
<li> Easy import of OSM data files. </li>
<li> Written entirely in C++ and available under the <a href="http://www.gnu.org/licenses/agpl-3.0.html">GNU Affero General Public License</a> for anyone to use. </li>
<li> Ability to handle continental sized networks. </li>
<li> Influenced by current and ongoing academic research. [<a href="http://algo2.iti.kit.edu/routeplanning.php">more info</a>]
</li>
</ul>
<ul>
<li> <b>General Instructions</b> [<a href="http://sourceforge.net/apps/trac/routed/wiki/RunInstructions">html</a>]
</li>
<li> <b>Readme</b> [<a href="http://sourceforge.net/apps/trac/routed/wiki/ReadMe">html</a>] </li>
</ul>
<br>
<h2> Support </h2>
<p> Questions concerning use and development of the <b>OSRM</b> should be posted to the <a href="https://sourceforge.net/projects/routed/forums/forum/1175398">Help Forum</a>. </p>
<p> Bugs should be reported by filing a ticket in the <a href="http://sourceforge.net/apps/trac/routed/newticket">Bug Tracker</a>
</p>
<h2> License </h2>
<p> OSRM is free, open source, and available under the <a href="http://www.gnu.org/licenses/agpl-3.0.html">GNU Affero General Public License</a>.
Companies with concerns about the AGPL should contact us to work something out.</p>
<h2> Platforms supported </h2>
<table>
<tbody>
<tr>
<td> <b>Operating Systems</b> </td>
<td> <b>Compilers</b> </td>
<td> <b>Third Party dependencies</b> </td>
</tr>
<tr>
<td>
Linux (kernel &gt;= 2.6.25)<br>
Mac OS X<br>
FreeBSD
</td>
<td>
g++ 4.2.3 (with warnings and unsupported)<br>
g++ 4.3+ <br>
llvm-g++/dragonegg 2.8+ </td>
<td>
Boost 1.37+<br>
sparsehash 1.4+<br>
libxml2 2.7+<br>
scons 1.20+<br>
stxxl 1.3.1+ <br>
libprotobuf 2.30+
</td>
</tr>
</tbody>
</table>
<h2> Current version </h2>
<p> Version 0.1 (July 10, 2010) is a baseline release. It has basic features. Version 0.2 (March 2011) is much faster and resource friendly. While it is safe to use this version, the code in svn trunk is much more advanced.</p>
<h2> Major improvements in version 0.2 </h2>
<table>
<tbody>
<tr>
<td>
<ul>
<li> Improved memory consumption </li>
<li> Much faster I/O thanks to binary intermediate data files </li>
<li> Origin and Destination can be on arbitrary points of any street segment </li>
<li> Support for PBF and BZ2 compressed OSM files </li>
<li> Support for http 1.1 gzip/deflate compression </li>
<li> Server can be bound to any IP/Port in the system </li>
<li> many, many bug fixes </li>
<li> many under-the-hood improvements </li>
<li> For a detailed list, please read the <a href="http://sourceforge.net/apps/trac/routed/timeline">Timeline</a>. </li>
</ul>
</td>
<td>
<script tystxxlpe="text/javascript" src="http://www.ohloh.net/p/487596/widgets/project_basic_stats.js"></script>
</td>
</tr>
</tbody>
</table>
<h2> Links/Download </h2>
<table border="1">
<tbody>
<tr>
<td>
</td>
<td> <b>Current Stable Version </b> </td>
<td> <b>Previous Stable Version </b> </td>
<td> <b>Development Version (subversion) </b> </td>
</tr>
<tr>
<td>
Download: [<a href="http://sourceforge.net/projects/osrm/">sf.net page</a>]
</td>
<td> [<a href="https://sourceforge.net/projects/routed/files/">0.2</a>]
tar.bz2/.gz (sf.net) </td>
<td> [<a href="https://sourceforge.net/projects/routed/files/">0.1</a>]
tar.gz (sf.net) </td>
<td> subversion checkout </td>
</tr>
<tr>
<td>
Subversion repository:
</td>
<td> [see above]
</td>
<td> [Browse] [Checkout]
</td>
<td> [<a href="http://routed.svn.sourceforge.net/viewvc/routed/osrm/">Browse</a>]
[<a href="https://svn.project-osrm.org/svnroot/routed/osrm/">Checkout</a>]
</td>
</tr>
</tbody>
</table>
</body></html>

View File

@ -1,582 +0,0 @@
h2 {
padding: 3px;
background: #ffb20F;
color: #FFFFFF;
font-variant: normal;
font-weight: normal;
font-size: medium;
margin: 0px;
}
body { background: #fff; color: #000; margin: 10px; padding: 0; }
body, th, td {
font: normal 13px Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;
}
h1, h2, h3, h4 {
font-family: Arial,Verdana,'Bitstream Vera Sans',Helvetica,sans-serif;
font-weight: bold;
letter-spacing: -0.018em;
page-break-after: avoid;
}
h1 { font-size: 19px; margin: .15em 1em 0.5em 0 }
h2 { font-size: 16px }
h3 { font-size: 14px }
hr { border: none; border-top: 1px solid #ccb; margin: 2em 0 }
address { font-style: normal }
img { border: none }
.underline { text-decoration: underline }
ol.loweralpha { list-style-type: lower-alpha }
ol.upperalpha { list-style-type: upper-alpha }
ol.lowerroman { list-style-type: lower-roman }
ol.upperroman { list-style-type: upper-roman }
ol.arabic { list-style-type: decimal }
/* Link styles */
:link, :visited {
text-decoration: none;
color: #b00;
border-bottom: 1px dotted #bbb;
}
:link:hover, :visited:hover { background-color: #eee; color: #555 }
h1 :link, h1 :visited ,h2 :link, h2 :visited, h3 :link, h3 :visited,
h4 :link, h4 :visited, h5 :link, h5 :visited, h6 :link, h6 :visited {
color: inherit;
}
/* Heading anchors */
.anchor:link, .anchor:visited {
border: none;
color: #d7d7d7;
font-size: .8em;
vertical-align: text-top;
}
* > .anchor:link, * > .anchor:visited {
visibility: hidden;
}
h1:hover .anchor, h2:hover .anchor, h3:hover .anchor,
h4:hover .anchor, h5:hover .anchor, h6:hover .anchor {
visibility: visible;
}
@media screen {
a.ext-link .icon {
background: url(../extlink.gif) left center no-repeat;
padding-left: 16px;
}
a.mail-link .icon {
background: url(../envelope.png) left center no-repeat;
padding-left: 16px;
}
}
/* Forms */
input, textarea, select { margin: 2px }
input, select { vertical-align: middle }
input[type=button], input[type=submit], input[type=reset] {
background: #eee;
color: #222;
border: 1px outset #ccc;
padding: .1em .5em;
}
input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover {
background: #ccb;
}
input[type=button][disabled], input[type=submit][disabled],
input[type=reset][disabled] {
background: #f6f6f6;
border-style: solid;
color: #999;
}
input[type=text], input.textwidget, textarea { border: 1px solid #d7d7d7 }
input[type=text], input.textwidget { padding: .25em .5em }
input[type=text]:focus, input.textwidget:focus, textarea:focus {
border: 1px solid #886;
}
option { border-bottom: 1px dotted #d7d7d7 }
fieldset { border: 1px solid #d7d7d7; padding: .5em; margin: 1em 0 }
form p.hint, form span.hint { color: #666; font-size: 85%; font-style: italic; margin: .5em 0;
padding-left: 1em;
}
fieldset.iefix {
background: transparent;
border: none;
padding: 0;
margin: 0;
}
* html fieldset.iefix { width: 98% }
fieldset.iefix p { margin: 0 }
legend { color: #999; padding: 0 .25em; font-size: 90%; font-weight: bold }
label.disabled { color: #d7d7d7 }
.buttons { margin: .5em .5em .5em 0 }
.buttons form, .buttons form div { display: inline }
.buttons input { margin: 1em .5em .1em 0 }
.inlinebuttons input {
font-size: 70%;
border-width: 1px;
border-style: dotted;
margin: 0 .1em;
padding: 0.1em;
background: none;
}
/* Header */
#header hr { display: none }
#header h1 { margin: 1.5em 0 -1.5em; }
#header img { border: none; margin: 0 0 -3em }
#header :link, #header :visited, #header :link:hover, #header :visited:hover {
background: transparent;
color: #555;
margin-bottom: 2px;
border: none;
}
#header h1 :link:hover, #header h1 :visited:hover { color: #000 }
/* Quick search */
#search {
clear: both;
font-size: 10px;
height: 2.2em;
margin: 0 0 1em;
text-align: right;
}
#search input { font-size: 10px }
#search label { display: none }
/* Navigation */
.nav h2, .nav hr { display: none }
.nav ul { font-size: 10px; list-style: none; margin: 0; text-align: right }
.nav li {
border-right: 1px solid #d7d7d7;
display: inline;
padding: 0 .75em;
white-space: nowrap;
}
.nav li.last { border-right: none }
/* Main navigation bar */
#mainnav {
background: #f7f7f7 url(../topbar_gradient.png) 0 0;
border: 1px solid #000;
font: normal 10px verdana,'Bitstream Vera Sans',helvetica,arial,sans-serif;
margin: .66em 0 .33em;
padding: .2em 0;
}
#mainnav li { border-right: none; padding: .25em 0 }
#mainnav :link, #mainnav :visited {
background: url(../dots.gif) 0 0 no-repeat;
border-right: 1px solid #fff;
border-bottom: none;
border-left: 1px solid #555;
color: #000;
padding: .2em 20px;
}
* html #mainnav :link, * html #mainnav :visited { background-position: 1px 0 }
#mainnav :link:hover, #mainnav :visited:hover {
background-color: #ccc;
border-right: 1px solid #ddd;
}
#mainnav .active :link, #mainnav .active :visited {
background: #333 url(../topbar_gradient2.png) 0 0 repeat-x;
border-top: none;
border-right: 1px solid #000;
color: #eee;
font-weight: bold;
}
#mainnav .active :link:hover, #mainnav .active :visited:hover {
border-right: 1px solid #000;
}
/* Context-dependent navigation links */
#ctxtnav { height: 1em }
#ctxtnav li ul {
background: #f7f7f7;
color: #ccc;
border: 1px solid;
padding: 0;
display: inline;
margin: 0;
}
#ctxtnav li li { padding: 0; }
#ctxtnav li li :link, #ctxtnav li li :visited { padding: 0 1em }
#ctxtnav li li :link:hover, #ctxtnav li li :visited:hover {
background: #bba;
color: #fff;
}
/* Alternate links */
#altlinks { clear: both; text-align: center }
#altlinks h3 { font-size: 12px; letter-spacing: normal; margin: 0 }
#altlinks ul { list-style: none; margin: 0; padding: 0 0 1em }
#altlinks li {
border-right: 1px solid #d7d7d7;
display: inline;
font-size: 11px;
line-height: 1.5;
padding: 0 1em;
white-space: nowrap;
}
#altlinks li.last { border-right: none }
#altlinks li :link, #altlinks li :visited {
background-repeat: no-repeat;
color: #666;
border: none;
padding: 0 0 2px;
}
#altlinks li a.ics { background-image: url(../ics.png); padding-left: 22px }
#altlinks li a.rss { background-image: url(../feed.png); padding-left: 20px }
/* Footer */
#footer {
clear: both;
color: #bbb;
font-size: 10px;
border-top: 1px solid;
height: 31px;
padding: .25em 0;
}
#footer :link, #footer :visited { color: #bbb; }
#footer hr { display: none }
#footer #tracpowered { border: 0; float: left }
#footer #tracpowered:hover { background: transparent }
#footer p { margin: 0 }
#footer p.left {
float: left;
margin-left: 1em;
padding: 0 1em;
border-left: 1px solid #d7d7d7;
border-right: 1px solid #d7d7d7;
}
#footer p.right {
float: right;
text-align: right;
}
#content { padding-bottom: 2em; position: relative }
#help {
clear: both;
color: #999;
font-size: 90%;
margin: 1em;
text-align: right;
}
#help :link, #help :visited { cursor: help }
#help hr { display: none }
/* Page preferences form */
#prefs {
background: #f7f7f0;
border: 1px outset #998;
float: right;
font-size: 9px;
padding: .8em;
position: relative;
margin: 0 1em 1em;
}
* html #prefs { width: 26em } /* Set width only for IE */
#prefs input, #prefs select { font-size: 9px; vertical-align: middle }
#prefs fieldset {
background: transparent;
border: none;
margin: .5em;
padding: 0;
}
#prefs fieldset legend {
background: transparent;
color: #000;
font-size: 9px;
font-weight: normal;
margin: 0 0 0 -1.5em;
padding: 0;
}
#prefs .buttons { text-align: right }
/* Version information (browser, wiki, attachments) */
#info {
margin: 1em 0 0 0;
background: #f7f7f0;
border: 1px solid #d7d7d7;
border-collapse: collapse;
border-spacing: 0;
clear: both;
width: 100%;
}
#info th, #info td { font-size: 85%; padding: 2px .5em; vertical-align: top }
#info th { font-weight: bold; text-align: left; white-space: nowrap }
#info td.message { width: 100% }
#info .message ul { padding: 0; margin: 0 2em }
#info .message p { margin: 0; padding: 0 }
/* Wiki */
.wikipage { padding-left: 18px }
.wikipage h1, .wikipage h2, .wikipage h3 { margin-left: -18px }
a.missing:link, a.missing:visited, a.missing, span.missing,
a.forbidden, span.forbidden { color: #998 }
a.missing:hover { color: #000 }
a.closed:link, a.closed:visited, span.closed { text-decoration: line-through }
/* User-selectable styles for blocks */
.important {
background: #fcb;
border: 1px dotted #d00;
color: #500;
padding: 0 .5em 0 .5em;
margin: .5em;
}
dl.wiki dt { font-weight: bold }
dl.compact dt { float: left; padding-right: .5em }
dl.compact dd { margin: 0; padding: 0 }
pre.wiki, pre.literal-block {
background: #f7f7f7;
border: 1px solid #d7d7d7;
margin: 1em 1.75em;
padding: .25em;
overflow: auto;
}
blockquote.citation {
margin: -0.6em 0;
border-style: solid;
border-width: 0 0 0 2px;
padding-left: .5em;
border-color: #b44;
}
.citation blockquote.citation { border-color: #4b4; }
.citation .citation blockquote.citation { border-color: #44b; }
.citation .citation .citation blockquote.citation { border-color: #c55; }
table.wiki {
border: 2px solid #ccc;
border-collapse: collapse;
border-spacing: 0;
}
table.wiki td { border: 1px solid #ccc; padding: .1em .25em; }
.wikitoolbar {
border: solid #d7d7d7;
border-width: 1px 1px 1px 0;
height: 18px;
width: 234px;
}
.wikitoolbar :link, .wikitoolbar :visited {
background: transparent url(../edit_toolbar.png) no-repeat;
border: 1px solid #fff;
border-left-color: #d7d7d7;
cursor: default;
display: block;
float: left;
width: 24px;
height: 16px;
}
.wikitoolbar :link:hover, .wikitoolbar :visited:hover {
background-color: transparent;
border: 1px solid #fb2;
}
.wikitoolbar a#em { background-position: 0 0 }
.wikitoolbar a#strong { background-position: 0 -16px }
.wikitoolbar a#heading { background-position: 0 -32px }
.wikitoolbar a#link { background-position: 0 -48px }
.wikitoolbar a#code { background-position: 0 -64px }
.wikitoolbar a#hr { background-position: 0 -80px }
.wikitoolbar a#np { background-position: 0 -96px }
.wikitoolbar a#br { background-position: 0 -112px }
.wikitoolbar a#img { background-position: 0 -128px }
/* Styles for the form for adding attachments. */
#attachment .field { margin-top: 1.3em }
#attachment label { padding-left: .2em }
#attachment fieldset { margin-top: 2em }
#attachment fieldset .field { float: left; margin: 0 1em .5em 0 }
#attachment .options { float: left; padding: 0 0 1em 1em }
#attachment br { clear: left }
.attachment #preview { margin-top: 1em }
/* Styles for the list of attachments. */
#attachments { border: 1px outset #996; padding: 1em }
#attachments .attachments { margin-left: 2em; padding: 0 }
#attachments dt { display: list-item; list-style: square; }
#attachments dd { font-style: italic; margin-left: 0; padding-left: 0; }
/* Styles for tabular listings such as those used for displaying directory
contents and report results. */
table.listing {
clear: both;
border-bottom: 1px solid #d7d7d7;
border-collapse: collapse;
border-spacing: 0;
margin-top: 1em;
width: 100%;
}
table.listing th { text-align: left; padding: 0 1em .1em 0; font-size: 12px }
table.listing thead { background: #f7f7f0 }
table.listing thead th {
border: 1px solid #d7d7d7;
border-bottom-color: #999;
font-size: 11px;
font-weight: bold;
padding: 2px .5em;
vertical-align: bottom;
}
table.listing thead th :link:hover, table.listing thead th :visited:hover {
background-color: transparent;
}
table.listing thead th a { border: none; padding-right: 12px }
table.listing th.asc a, table.listing th.desc a { font-weight: bold }
table.listing th.asc a, table.listing th.desc a {
background-position: 100% 50%;
background-repeat: no-repeat;
}
table.listing th.asc a { background-image: url(../asc.png) }
table.listing th.desc a { background-image: url(../desc.png) }
table.listing tbody td, table.listing tbody th {
border: 1px dotted #ddd;
padding: .3em .5em;
vertical-align: top;
}
table.listing tbody td a:hover, table.listing tbody th a:hover {
background-color: transparent;
}
table.listing tbody tr { border-top: 1px solid #ddd }
table.listing tbody tr.even { background-color: #fcfcfc }
table.listing tbody tr.odd { background-color: #f7f7f7 }
table.listing tbody tr:hover { background: #eed !important }
table.listing tbody tr.focus { background: #ddf !important }
/* Styles for the page history table
(extends the styles for "table.listing") */
#fieldhist td { padding: 0 .5em }
#fieldhist td.date, #fieldhist td.diff, #fieldhist td.version,
#fieldhist td.author {
white-space: nowrap;
}
#fieldhist td.version { text-align: center }
#fieldhist td.comment { width: 100% }
/* Auto-completion interface */
.suggestions { background: #fff; border: 1px solid #886; color: #222; }
.suggestions ul {
font-family: sans-serif;
max-height: 20em;
min-height: 3em;
list-style: none;
margin: 0;
overflow: auto;
padding: 0;
width: 440px;
}
* html .suggestions ul { height: 10em; }
.suggestions li { background: #fff; cursor: pointer; padding: 2px 5px }
.suggestions li.selected { background: #b9b9b9 }
/* Styles for the error page (and rst errors) */
#content.error .message, div.system-message {
background: #fdc;
border: 2px solid #d00;
color: #500;
padding: .5em;
margin: 1em 0;
}
#content.error div.message pre, div.system-message pre {
margin-left: 1em;
overflow: hidden;
white-space: normal;
}
div.system-message p { margin: 0; }
div.system-message p.system-message-title { font-weight: bold; }
#warning.system-message { background: #ffa; border: 2px solid #886; }
#warning.system-message li { list-style-type: square; }
#notice.system-message { background: #bfb; border: 2px solid #484; }
#notice.system-message li { list-style-type: square; }
#content.error form.newticket { display: inline; }
#content.error form.newticket textarea { display: none; }
#content.error #systeminfo { margin: 1em; width: auto; }
#content.error #systeminfo th { font-weight: bold; text-align: right; }
#content.error #traceback { margin-left: 1em; }
#content.error #traceback :link, #content.error #traceback :visited {
border: none;
}
#content.error #tbtoggle { font-size: 80%; }
#content.error #traceback div { margin-left: 1em; }
#content.error #traceback h3 { font-size: 95%; margin: .5em 0 0; }
#content.error #traceback :link var, #content.error #traceback :visited var {
font-family: monospace;
font-style: normal;
font-weight: bold;
}
#content.error #traceback span.file { color: #666; font-size: 85%; }
#content.error #traceback ul { list-style: none; margin: .5em 0; padding: 0; }
#content.error #traceback ol {
border: 1px dotted #d7d7d7;
color: #999;
font-size: 85%;
line-height: 1;
margin: .5em 0;
}
#content.error #traceback ol li { white-space: pre; }
#content.error #traceback ol li.current { background: #e6e6e6; color: #333; }
#content.error #traceback ol li code { color: #666; }
#content.error #traceback ol li.current code { color: #000; }
#content.error #traceback table { margin: .5em 0 1em; }
#content.error #traceback th, #content.error #traceback td {
font-size: 85%; padding: 1px;
}
#content.error #traceback th var {
font-family: monospace;
font-style: normal;
}
#content.error #traceback td code { white-space: pre; }
#content.error #traceback pre { font-size: 95%; }
#content .paging { margin: 0 0 2em; padding: .5em 0 0;
font-size: 85%; line-height: 2em; text-align: center;
}
#content .paging .current {
padding: .1em .3em;
border: 1px solid #333;
background: #999; color: #fff;
}
#content .paging :link, #content .paging :visited {
padding: .1em .3em;
border: 1px solid #666;
background: transparent; color: #666;
}
#content .paging :link:hover, #content .paging :visited:hover {
background: #999; color: #fff; border-color: #333;
}
#content .paging .previous a,
#content .paging .next a {
font-size: 150%; font-weight: bold; border: none;
}
#content .paging .previous a:hover,
#content .paging .next a:hover {
background: transparent; color: #666;
}
#content h2 .numresults { color: #666; font-size: 90%; }
/* Styles for search word highlighting */
@media screen {
.searchword0 { background: #ff9 }
.searchword1 { background: #cfc }
.searchword2 { background: #cff }
.searchword3 { background: #ccf }
.searchword4 { background: #fcf }
}
@media print {
#header, #altlinks, #footer, #help { display: none }
.nav, form, .buttons form, form .buttons, form .inlinebuttons {
display: none;
}
form.printableform { display: block }
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@ -6,7 +6,6 @@ installing dependencies and running make should suffice. Make sure the following
dependencies are installed:
- Boost 1.41+
- sparsehash 1.4+
- g++ 4.2+
- libxml2 2.7+
- scons 2.10+
@ -52,8 +51,6 @@ lib\
bin (contains protoc.exe)
include
lib (contains libprotobuf.lib and libprotobuf-debug.lib)
sparsehash
src
stxxl
include
lib (contains libstxxl.lib and libstxxl-debug.lib)

View File

@ -101,9 +101,6 @@ if not conf.CheckLibWithHeader('z', 'zlib.h', 'CXX'):
if not conf.CheckCXXHeader('stxxl.h'):
print "Could not locate stxxl header. Exiting"
Exit(-1)
if not conf.CheckCXXHeader('google/sparse_hash_map'):
print "Could not find Google Sparsehash library. Exiting"
Exit(-1)
if not conf.CheckCXXHeader('boost/asio.hpp'):
print "boost/asio.hpp not found. Exiting"
Exit(-1)

View File

@ -39,7 +39,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include <boost/foreach.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <google/sparse_hash_map>
#include <unistd.h>
#include <stxxl.h>

View File

@ -1,6 +1,6 @@
[car]
motorway = 110
motorway_link = 90
motorway = 110
motorway_link = 90
trunk = 90
trunk_link = 70
primary = 70
@ -13,12 +13,13 @@
living_street = 10
service = 30
ferry = 5
pier = 5
barrier = bollard
obeyOneways = yes
pier = 5
barrier = bollard
obeyOneways = yes
useRestrictions = yes
accessTag = motorcar
accessTag = motorcar
excludeFromGrid = ferry
defaultSpeed = 50
[bike]
trunk = 16
trunk_link = 16
@ -31,11 +32,13 @@
residential = 16
living_street = 16
service = 16
track = 16
cycleway = 16
path = 16
ferry = 5
pier = 5
obeyOneways = yes
track = 16
cycleway = 16
path = 16
ferry = 5
pier = 5
obeyOneways = yes
useRestrictions = no
accessTag = bicycle
accessTag = bicycle
excludeFromGrid = ferry
defaultSpeed = 5