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 <cmath>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
typedef std::pair<unsigned, unsigned> BresenhamPixel;
|
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 dx = std::abs(x1-x0);
|
||||||
int dy = std::abs(y1-y0);
|
int dy = std::abs(y1-y0);
|
||||||
int sx = (x0 < x1 ? 1 : -1);
|
int sx = (x0 < x1 ? 1 : -1);
|
||||||
|
@ -21,12 +21,13 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#ifndef DOUGLASPEUCKER_H_
|
#ifndef DOUGLASPEUCKER_H_
|
||||||
#define DOUGLASPEUCKER_H_
|
#define DOUGLASPEUCKER_H_
|
||||||
|
|
||||||
|
#include "../DataStructures/Coordinate.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
#include <vector>
|
||||||
#include "../DataStructures/Coordinate.h"
|
|
||||||
|
|
||||||
/*This class object computes the bitvector of indicating generalized input points
|
/*This class object computes the bitvector of indicating generalized input points
|
||||||
* according to the (Ramer-)Douglas-Peucker algorithm.
|
* according to the (Ramer-)Douglas-Peucker algorithm.
|
||||||
|
@ -21,6 +21,8 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#ifndef OBJECTTOBASE64_H_
|
#ifndef OBJECTTOBASE64_H_
|
||||||
#define OBJECTTOBASE64_H_
|
#define OBJECTTOBASE64_H_
|
||||||
|
|
||||||
|
#include "../Util/StringUtil.h"
|
||||||
|
|
||||||
#include <boost/archive/iterators/base64_from_binary.hpp>
|
#include <boost/archive/iterators/base64_from_binary.hpp>
|
||||||
#include <boost/archive/iterators/binary_from_base64.hpp>
|
#include <boost/archive/iterators/binary_from_base64.hpp>
|
||||||
#include <boost/archive/iterators/transform_width.hpp>
|
#include <boost/archive/iterators/transform_width.hpp>
|
||||||
@ -29,8 +31,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "../Util/StringUtil.h"
|
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
boost::archive::iterators::base64_from_binary<
|
boost::archive::iterators::base64_from_binary<
|
||||||
boost::archive::iterators::transform_width<std::string::const_iterator, 6, 8>
|
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_
|
#ifndef POLYLINECOMPRESSOR_H_
|
||||||
#define POLYLINECOMPRESSOR_H_
|
#define POLYLINECOMPRESSOR_H_
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
//#include "../DataStructures/ExtractorStructs.h"
|
|
||||||
#include "../DataStructures/SegmentInformation.h"
|
#include "../DataStructures/SegmentInformation.h"
|
||||||
#include "../Util/StringUtil.h"
|
#include "../Util/StringUtil.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
class PolylineCompressor {
|
class PolylineCompressor {
|
||||||
private:
|
private:
|
||||||
inline void encodeVectorSignedNumber(std::vector<int> & numbers, std::string & output) const {
|
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
|
IP = 0.0.0.0
|
||||||
Port = 5000
|
Port = 5000
|
||||||
|
|
||||||
hsgrData=/opt/osm/berlin.osrm.hsgr
|
hsgrData=/Users/dennisluxen/Downloads/berlin-latest.osrm.hsgr
|
||||||
nodesData=/opt/osm/berlin.osrm.nodes
|
nodesData=/Users/dennisluxen/Downloads/berlin-latest.osrm.nodes
|
||||||
edgesData=/opt/osm/berlin.osrm.edges
|
edgesData=/Users/dennisluxen/Downloads/berlin-latest.osrm.edges
|
||||||
ramIndex=/opt/osm/berlin.osrm.ramIndex
|
ramIndex=/Users/dennisluxen/Downloads/berlin-latest.osrm.ramIndex
|
||||||
fileIndex=/opt/osm/berlin.osrm.fileIndex
|
fileIndex=/Users/dennisluxen/Downloads/berlin-latest.osrm.fileIndex
|
||||||
namesData=/opt/osm/berlin.osrm.names
|
namesData=/Users/dennisluxen/Downloads/berlin-latest.osrm.names
|
||||||
timestamp=/opt/osm/berlin.osrm.timestamp
|
timestamp=/Users/dennisluxen/Downloads/berlin-latest.osrm.timestamp
|
||||||
|
@ -21,7 +21,6 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
#ifndef TYPEDEFS_H_
|
#ifndef TYPEDEFS_H_
|
||||||
#define TYPEDEFS_H_
|
#define TYPEDEFS_H_
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user