First implementation of moving the algorithmic core into a library
This commit is contained in:
parent
ae20bac3c5
commit
4430cbc3cb
@ -23,9 +23,10 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
typedef std::pair<unsigned, unsigned> BresenhamPixel;
|
||||
|
||||
inline void Bresenham (int x0, int y0, int x1, int y1, std::vector<BresenhamPixel> &resultList) {
|
||||
inline void Bresenham (int x0, int y0, const int x1, int const y1, std::vector<BresenhamPixel> &resultList) {
|
||||
int dx = std::abs(x1-x0);
|
||||
int dy = std::abs(y1-y0);
|
||||
int sx = (x0 < x1 ? 1 : -1);
|
||||
|
@ -21,12 +21,13 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
#ifndef DOUGLASPEUCKER_H_
|
||||
#define DOUGLASPEUCKER_H_
|
||||
|
||||
#include "../DataStructures/Coordinate.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <cfloat>
|
||||
#include <stack>
|
||||
|
||||
#include "../DataStructures/Coordinate.h"
|
||||
#include <vector>
|
||||
|
||||
/*This class object computes the bitvector of indicating generalized input points
|
||||
* according to the (Ramer-)Douglas-Peucker algorithm.
|
||||
|
@ -21,6 +21,8 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
#ifndef OBJECTTOBASE64_H_
|
||||
#define OBJECTTOBASE64_H_
|
||||
|
||||
#include "../Util/StringUtil.h"
|
||||
|
||||
#include <boost/archive/iterators/base64_from_binary.hpp>
|
||||
#include <boost/archive/iterators/binary_from_base64.hpp>
|
||||
#include <boost/archive/iterators/transform_width.hpp>
|
||||
@ -29,8 +31,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
#include "../Util/StringUtil.h"
|
||||
|
||||
typedef
|
||||
boost::archive::iterators::base64_from_binary<
|
||||
boost::archive::iterators::transform_width<std::string::const_iterator, 6, 8>
|
||||
|
@ -21,12 +21,11 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
#ifndef POLYLINECOMPRESSOR_H_
|
||||
#define POLYLINECOMPRESSOR_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
//#include "../DataStructures/ExtractorStructs.h"
|
||||
#include "../DataStructures/SegmentInformation.h"
|
||||
#include "../Util/StringUtil.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class PolylineCompressor {
|
||||
private:
|
||||
inline void encodeVectorSignedNumber(std::vector<int> & numbers, std::string & output) const {
|
||||
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
open source routing machine
|
||||
Copyright (C) Dennis Luxen, 2010
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU AFFERO General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
or see http://www.gnu.org/licenses/agpl.txt.
|
||||
*/
|
||||
|
||||
#ifndef SERVERCONFIGURATION_H_
|
||||
#define SERVERCONFIGURATION_H_
|
||||
|
||||
#include "../Util/BaseConfiguration.h"
|
||||
|
||||
typedef BaseConfiguration ServerConfiguration;
|
||||
|
||||
#endif /* SERVERCONFIGURATION_H_ */
|
14
server.ini
14
server.ini
@ -2,10 +2,10 @@ Threads = 8
|
||||
IP = 0.0.0.0
|
||||
Port = 5000
|
||||
|
||||
hsgrData=/opt/osm/berlin.osrm.hsgr
|
||||
nodesData=/opt/osm/berlin.osrm.nodes
|
||||
edgesData=/opt/osm/berlin.osrm.edges
|
||||
ramIndex=/opt/osm/berlin.osrm.ramIndex
|
||||
fileIndex=/opt/osm/berlin.osrm.fileIndex
|
||||
namesData=/opt/osm/berlin.osrm.names
|
||||
timestamp=/opt/osm/berlin.osrm.timestamp
|
||||
hsgrData=/Users/dennisluxen/Downloads/berlin-latest.osrm.hsgr
|
||||
nodesData=/Users/dennisluxen/Downloads/berlin-latest.osrm.nodes
|
||||
edgesData=/Users/dennisluxen/Downloads/berlin-latest.osrm.edges
|
||||
ramIndex=/Users/dennisluxen/Downloads/berlin-latest.osrm.ramIndex
|
||||
fileIndex=/Users/dennisluxen/Downloads/berlin-latest.osrm.fileIndex
|
||||
namesData=/Users/dennisluxen/Downloads/berlin-latest.osrm.names
|
||||
timestamp=/Users/dennisluxen/Downloads/berlin-latest.osrm.timestamp
|
||||
|
@ -21,7 +21,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
#ifndef TYPEDEFS_H_
|
||||
#define TYPEDEFS_H_
|
||||
|
||||
#include <cmath>
|
||||
#include <climits>
|
||||
#include <cstdlib>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user