diff --git a/Algorithms/PolylineCompressor.h b/Algorithms/PolylineCompressor.h index db90ef6ff..3e14c6639 100644 --- a/Algorithms/PolylineCompressor.h +++ b/Algorithms/PolylineCompressor.h @@ -56,11 +56,14 @@ private: } public: - inline void printEncodedString(const std::vector& polyline, std::string &output) const { + inline void printEncodedString( + const std::vector & polyline, + std::string & output + ) const { std::vector deltaNumbers; output += "\""; if(!polyline.empty()) { - _Coordinate lastCoordinate = polyline[0].location; + FixedPointCoordinate lastCoordinate = polyline[0].location; deltaNumbers.push_back( lastCoordinate.lat ); deltaNumbers.push_back( lastCoordinate.lon ); for(unsigned i = 1; i < polyline.size(); ++i) { @@ -76,7 +79,7 @@ public: } - inline void printEncodedString(const std::vector<_Coordinate>& polyline, std::string &output) const { + inline void printEncodedString(const std::vector& polyline, std::string &output) const { std::vector deltaNumbers(2*polyline.size()); output += "\""; if(!polyline.empty()) { @@ -91,7 +94,7 @@ public: output += "\""; } - inline void printUnencodedString(std::vector<_Coordinate> & polyline, std::string & output) const { + inline void printUnencodedString(std::vector & polyline, std::string & output) const { output += "["; std::string tmp; for(unsigned i = 0; i < polyline.size(); i++) { diff --git a/Contractor/EdgeBasedGraphFactory.cpp b/Contractor/EdgeBasedGraphFactory.cpp index c6d138040..9f6e64bee 100644 --- a/Contractor/EdgeBasedGraphFactory.cpp +++ b/Contractor/EdgeBasedGraphFactory.cpp @@ -22,8 +22,8 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory( int nodes, std::vector & inputEdges, - std::vector & bn, - std::vector & tl, + std::vector & barrier_node_list, + std::vector & traffic_light_node_list, std::vector & input_restrictions_list, std::vector & inputNodeInfoList, SpeedProfileProperties speedProfile @@ -54,8 +54,15 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory( _restrictionBucketVector.at(index).push_back(std::make_pair(restriction.toNode, restriction.flags.isOnly)); } - _barrierNodes.insert(bn.begin(), bn.end()); - _trafficLights.insert(tl.begin(), tl.end()); + _barrierNodes.insert( + barrier_node_list.begin(), + barrier_node_list.end() + ); + + _trafficLights.insert( + traffic_light_node_list.begin(), + traffic_light_node_list.end() + ); DeallocatingVector< _NodeBasedEdge > edges; _NodeBasedEdge edge; diff --git a/Contractor/EdgeBasedGraphFactory.h b/Contractor/EdgeBasedGraphFactory.h index c53d69464..05b8462b3 100644 --- a/Contractor/EdgeBasedGraphFactory.h +++ b/Contractor/EdgeBasedGraphFactory.h @@ -75,8 +75,8 @@ public: return id == other.id; } - inline _Coordinate Centroid() const { - _Coordinate centroid; + inline FixedPointCoordinate Centroid() const { + FixedPointCoordinate centroid; //The coordinates of the midpoint are given by: //x = (x1 + x2) /2 and y = (y1 + y2) /2. centroid.lon = (std::min(lon1, lon2) + std::max(lon1, lon2))/2; @@ -87,6 +87,7 @@ public: inline bool isIgnored() const { return ignoreInGrid; } + NodeID id; int lat1; int lat2; diff --git a/DataStructures/Coordinate.h b/DataStructures/Coordinate.h index 47008d65f..a701f80db 100644 --- a/DataStructures/Coordinate.h +++ b/DataStructures/Coordinate.h @@ -18,8 +18,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/agpl.txt. */ -#ifndef COORDINATE_H_ -#define COORDINATE_H_ +#ifndef FIXED_POINT_COORDINATE_H_ +#define FIXED_POINT_COORDINATE_H_ #include "../Util/StringUtil.h" @@ -31,11 +31,11 @@ or see http://www.gnu.org/licenses/agpl.txt. static const double COORDINATE_PRECISION = 1000000.; -struct _Coordinate { +struct FixedPointCoordinate { int lat; int lon; - _Coordinate () : lat(INT_MIN), lon(INT_MIN) {} - explicit _Coordinate (int t, int n) : lat(t) , lon(n) {} + FixedPointCoordinate () : lat(INT_MIN), lon(INT_MIN) {} + explicit FixedPointCoordinate (int t, int n) : lat(t) , lon(n) {} void Reset() { lat = INT_MIN; @@ -55,12 +55,12 @@ struct _Coordinate { } return true; } - bool operator==(const _Coordinate & other) const { + bool operator==(const FixedPointCoordinate & other) const { return lat == other.lat && lon == other.lon; } }; -inline std::ostream & operator<<(std::ostream & out, const _Coordinate & c){ +inline std::ostream & operator<<(std::ostream & out, const FixedPointCoordinate & c){ out << "(" << c.lat << "," << c.lon << ")"; return out; } @@ -93,11 +93,11 @@ inline double ApproximateDistance( const int lat1, const int lon1, const int lat return distance; } -inline double ApproximateDistance(const _Coordinate &c1, const _Coordinate &c2) { +inline double ApproximateDistance(const FixedPointCoordinate &c1, const FixedPointCoordinate &c2) { return ApproximateDistance( c1.lat, c1.lon, c2.lat, c2.lon ); } -inline double ApproximateEuclideanDistance(const _Coordinate &c1, const _Coordinate &c2) { +inline double ApproximateEuclideanDistance(const FixedPointCoordinate &c1, const FixedPointCoordinate &c2) { assert(c1.lat != INT_MIN); assert(c1.lon != INT_MIN); assert(c2.lat != INT_MIN); @@ -122,7 +122,7 @@ static inline void convertInternalLatLonToString(const int value, std::string & output = string; } -static inline void convertInternalCoordinateToString(const _Coordinate & coord, std::string & output) { +static inline void convertInternalCoordinateToString(const FixedPointCoordinate & coord, std::string & output) { std::string tmp; convertInternalLatLonToString(coord.lon, tmp); output = tmp; @@ -131,7 +131,7 @@ static inline void convertInternalCoordinateToString(const _Coordinate & coord, output += tmp; output += " "; } -static inline void convertInternalReversedCoordinateToString(const _Coordinate & coord, std::string & output) { +static inline void convertInternalReversedCoordinateToString(const FixedPointCoordinate & coord, std::string & output) { std::string tmp; convertInternalLatLonToString(coord.lat, tmp); output = tmp; @@ -141,4 +141,4 @@ static inline void convertInternalReversedCoordinateToString(const _Coordinate & output += " "; } -#endif /* COORDINATE_H_ */ +#endif /* FIXED_POINT_COORDINATE_H_ */ diff --git a/DataStructures/HilbertValue.h b/DataStructures/HilbertValue.h index 8b64a505b..f73396928 100644 --- a/DataStructures/HilbertValue.h +++ b/DataStructures/HilbertValue.h @@ -31,7 +31,8 @@ or see http://www.gnu.org/licenses/agpl.txt. class HilbertCode : boost::noncopyable { public: static uint64_t GetHilbertNumberForCoordinate( - const _Coordinate & current_coordinate) { + const FixedPointCoordinate & current_coordinate + ) { unsigned location[2]; location[0] = current_coordinate.lat+( 90*COORDINATE_PRECISION); location[1] = current_coordinate.lon+(180*COORDINATE_PRECISION); diff --git a/DataStructures/NodeInformationHelpDesk.h b/DataStructures/NodeInformationHelpDesk.h index 581287cd5..7d638be3b 100644 --- a/DataStructures/NodeInformationHelpDesk.h +++ b/DataStructures/NodeInformationHelpDesk.h @@ -107,8 +107,8 @@ public: } inline bool FindNearestNodeCoordForLatLon( - const _Coordinate& input_coordinate, - _Coordinate& result, + const FixedPointCoordinate& input_coordinate, + FixedPointCoordinate& result, const unsigned zoom_level = 18 ) const { PhantomNode resulting_phantom_node; @@ -121,7 +121,7 @@ public: } inline bool FindPhantomNodeForCoordinate( - const _Coordinate & input_coordinate, + const FixedPointCoordinate & input_coordinate, PhantomNode & resulting_phantom_node, const unsigned zoom_level ) const { @@ -164,9 +164,9 @@ private: NodeInfo b; while(!nodes_input_stream.eof()) { nodes_input_stream.read((char *)&b, sizeof(NodeInfo)); - coordinateVector.push_back(_Coordinate(b.lat, b.lon)); + coordinateVector.push_back(FixedPointCoordinate(b.lat, b.lon)); } - std::vector<_Coordinate>(coordinateVector).swap(coordinateVector); + std::vector(coordinateVector).swap(coordinateVector); nodes_input_stream.close(); SimpleLogger().Write(logDEBUG) << "Loading edge data"; @@ -191,7 +191,7 @@ private: SimpleLogger().Write(logDEBUG) << "Opening NN indices"; } - std::vector<_Coordinate> coordinateVector; + std::vector coordinateVector; std::vector origEdgeData_viaNode; std::vector origEdgeData_nameID; std::vector origEdgeData_turnInstruction; diff --git a/DataStructures/PhantomNodes.h b/DataStructures/PhantomNodes.h index 2827d7a91..d48d61797 100644 --- a/DataStructures/PhantomNodes.h +++ b/DataStructures/PhantomNodes.h @@ -24,13 +24,20 @@ or see http://www.gnu.org/licenses/agpl.txt. #include "Coordinate.h" struct PhantomNode { - PhantomNode() : edgeBasedNode(UINT_MAX), nodeBasedEdgeNameID(UINT_MAX), weight1(INT_MAX), weight2(INT_MAX), ratio(0.) {} + PhantomNode() : + edgeBasedNode(UINT_MAX), + nodeBasedEdgeNameID(UINT_MAX), + weight1(INT_MAX), + weight2(INT_MAX), + ratio(0.) + { } + NodeID edgeBasedNode; unsigned nodeBasedEdgeNameID; int weight1; int weight2; double ratio; - _Coordinate location; + FixedPointCoordinate location; void Reset() { edgeBasedNode = UINT_MAX; nodeBasedEdgeNameID = UINT_MAX; @@ -88,7 +95,7 @@ inline std::ostream& operator<<(std::ostream &out, const PhantomNode & pn){ struct NodesOfEdge { NodeID edgeBasedNode; double ratio; - _Coordinate projectedPoint; + FixedPointCoordinate projectedPoint; }; #endif /* PHANTOMNODES_H_ */ diff --git a/DataStructures/SearchEngine.cpp b/DataStructures/SearchEngine.cpp index 2a538a7ac..f3e79aa63 100644 --- a/DataStructures/SearchEngine.cpp +++ b/DataStructures/SearchEngine.cpp @@ -33,14 +33,14 @@ SearchEngine::SearchEngine( void SearchEngine::GetCoordinatesForNodeID( NodeID id, - _Coordinate& result + FixedPointCoordinate& result ) const { result.lat = _queryData.nodeHelpDesk->getLatitudeOfNode(id); result.lon = _queryData.nodeHelpDesk->getLongitudeOfNode(id); } void SearchEngine::FindPhantomNodeForCoordinate( - const _Coordinate & location, + const FixedPointCoordinate & location, PhantomNode & result, const unsigned zoomLevel ) const { diff --git a/DataStructures/SearchEngine.h b/DataStructures/SearchEngine.h index 64d273bb0..14cbd975e 100644 --- a/DataStructures/SearchEngine.h +++ b/DataStructures/SearchEngine.h @@ -45,17 +45,17 @@ public: AlternativeRouting alternativePaths; SearchEngine( - QueryGraph * g, - NodeInformationHelpDesk * nh, + QueryGraph * g, + NodeInformationHelpDesk * nh, std::vector & n ); ~SearchEngine(); - void GetCoordinatesForNodeID(NodeID id, _Coordinate& result) const; + void GetCoordinatesForNodeID(NodeID id, FixedPointCoordinate& result) const; void FindPhantomNodeForCoordinate( - const _Coordinate & location, - PhantomNode & result, + const FixedPointCoordinate & location, + PhantomNode & result, unsigned zoomLevel ) const; diff --git a/DataStructures/SegmentInformation.h b/DataStructures/SegmentInformation.h index 8f65eda72..20e5e05d8 100644 --- a/DataStructures/SegmentInformation.h +++ b/DataStructures/SegmentInformation.h @@ -27,16 +27,16 @@ or see http://www.gnu.org/licenses/agpl.txt. #include struct SegmentInformation { - _Coordinate location; + FixedPointCoordinate location; NodeID nameID; double length; unsigned duration; double bearing; TurnInstruction turnInstruction; bool necessary; - SegmentInformation(const _Coordinate & loc, const NodeID nam, const double len, const unsigned dur, const TurnInstruction tInstr, const bool nec) : + SegmentInformation(const FixedPointCoordinate & loc, const NodeID nam, const double len, const unsigned dur, const TurnInstruction tInstr, const bool nec) : location(loc), nameID(nam), length(len), duration(dur), bearing(0.), turnInstruction(tInstr), necessary(nec) {} - SegmentInformation(const _Coordinate & loc, const NodeID nam, const double len, const unsigned dur, const TurnInstruction tInstr) : + SegmentInformation(const FixedPointCoordinate & loc, const NodeID nam, const double len, const unsigned dur, const TurnInstruction tInstr) : location(loc), nameID(nam), length(len), duration(dur), bearing(0.), turnInstruction(tInstr), necessary(tInstr != 0) {} }; diff --git a/DataStructures/StaticRTree.h b/DataStructures/StaticRTree.h index 57c099b98..603e7b3d4 100644 --- a/DataStructures/StaticRTree.h +++ b/DataStructures/StaticRTree.h @@ -100,8 +100,8 @@ private: max_lat = std::max(max_lat, other.max_lat); } - inline _Coordinate Centroid() const { - _Coordinate centroid; + inline FixedPointCoordinate Centroid() const { + FixedPointCoordinate centroid; //The coordinates of the midpoints are given by: //x = (x1 + x2) /2 and y = (y1 + y2) /2. centroid.lon = (min_lon + max_lon)/2; @@ -110,10 +110,10 @@ private: } inline bool Intersects(const RectangleInt2D & other) const { - _Coordinate upper_left (other.max_lat, other.min_lon); - _Coordinate upper_right(other.max_lat, other.max_lon); - _Coordinate lower_right(other.min_lat, other.max_lon); - _Coordinate lower_left (other.min_lat, other.min_lon); + FixedPointCoordinate upper_left (other.max_lat, other.min_lon); + FixedPointCoordinate upper_right(other.max_lat, other.max_lon); + FixedPointCoordinate lower_right(other.min_lat, other.max_lon); + FixedPointCoordinate lower_left (other.min_lat, other.min_lon); return ( Contains(upper_left) @@ -123,7 +123,7 @@ private: ); } - inline double GetMinDist(const _Coordinate & location) const { + inline double GetMinDist(const FixedPointCoordinate & location) const { bool is_contained = Contains(location); if (is_contained) { return 0.0; @@ -169,13 +169,13 @@ private: return min_dist; } - inline double GetMinMaxDist(const _Coordinate & location) const { + inline double GetMinMaxDist(const FixedPointCoordinate & location) const { double min_max_dist = DBL_MAX; //Get minmax distance to each of the four sides - _Coordinate upper_left (max_lat, min_lon); - _Coordinate upper_right(max_lat, max_lon); - _Coordinate lower_right(min_lat, max_lon); - _Coordinate lower_left (min_lat, min_lon); + FixedPointCoordinate upper_left (max_lat, min_lon); + FixedPointCoordinate upper_right(max_lat, max_lon); + FixedPointCoordinate lower_right(min_lat, max_lon); + FixedPointCoordinate lower_left (min_lat, min_lon); min_max_dist = std::min( min_max_dist, @@ -211,7 +211,7 @@ private: return min_max_dist; } - inline bool Contains(const _Coordinate & location) const { + inline bool Contains(const FixedPointCoordinate & location) const { bool lats_contained = (location.lat > min_lat) && (location.lat < max_lat); bool lons_contained = @@ -303,7 +303,7 @@ public: input_wrapper_vector[element_counter].m_array_index = element_counter; //Get Hilbert-Value for centroid in mercartor projection DataT & current_element = input_data_vector[element_counter]; - _Coordinate current_centroid = current_element.Centroid(); + FixedPointCoordinate current_centroid = current_element.Centroid(); current_centroid.lat = COORDINATE_PRECISION*lat2y(current_centroid.lat/COORDINATE_PRECISION); uint64_t current_hilbert_value = HilbertCode::GetHilbertNumberForCoordinate(current_centroid); @@ -449,7 +449,7 @@ public: } /* inline void FindKNearestPhantomNodesForCoordinate( - const _Coordinate & location, + const FixedPointCoordinate & location, const unsigned zoom_level, const unsigned candidate_count, std::vector > & result_vector @@ -465,7 +465,7 @@ public: double min_max_dist = DBL_MAX; bool found_a_nearest_edge = false; - _Coordinate nearest, current_start_coordinate, current_end_coordinate; + FixedPointCoordinate nearest, current_start_coordinate, current_end_coordinate; //initialize queue with root element std::priority_queue traversal_queue; @@ -493,8 +493,8 @@ public: double current_ratio = 0.; double current_perpendicular_distance = ComputePerpendicularDistance( input_coordinate, - _Coordinate(current_edge.lat1, current_edge.lon1), - _Coordinate(current_edge.lat2, current_edge.lon2), + FixedPointCoordinate(current_edge.lat1, current_edge.lon1), + FixedPointCoordinate(current_edge.lat2, current_edge.lon2), nearest, ¤t_ratio ); @@ -523,11 +523,11 @@ public: 1 == abs(current_edge.id - result_phantom_node.edgeBasedNode ) && CoordinatesAreEquivalent( current_start_coordinate, - _Coordinate( + FixedPointCoordinate( current_edge.lat1, current_edge.lon1 ), - _Coordinate( + FixedPointCoordinate( current_edge.lat2, current_edge.lon2 ), @@ -563,14 +563,14 @@ public: const double distance_to_edge = ApproximateDistance ( - _Coordinate(nearest_edge.lat1, nearest_edge.lon1), + FixedPointCoordinate(nearest_edge.lat1, nearest_edge.lon1), result_phantom_node.location ); const double length_of_edge = ApproximateDistance( - _Coordinate(nearest_edge.lat1, nearest_edge.lon1), - _Coordinate(nearest_edge.lat2, nearest_edge.lon2) + FixedPointCoordinate(nearest_edge.lat1, nearest_edge.lon1), + FixedPointCoordinate(nearest_edge.lat2, nearest_edge.lon2) ); const double ratio = (found_a_nearest_edge ? @@ -596,7 +596,7 @@ public: */ bool FindPhantomNodeForCoordinate( - const _Coordinate & input_coordinate, + const FixedPointCoordinate & input_coordinate, PhantomNode & result_phantom_node, const unsigned zoom_level ) { @@ -611,7 +611,7 @@ public: double min_max_dist = DBL_MAX; bool found_a_nearest_edge = false; - _Coordinate nearest, current_start_coordinate, current_end_coordinate; + FixedPointCoordinate nearest, current_start_coordinate, current_end_coordinate; //initialize queue with root element std::priority_queue traversal_queue; @@ -650,8 +650,8 @@ public: double current_ratio = 0.; double current_perpendicular_distance = ComputePerpendicularDistance( input_coordinate, - _Coordinate(current_edge.lat1, current_edge.lon1), - _Coordinate(current_edge.lat2, current_edge.lon2), + FixedPointCoordinate(current_edge.lat1, current_edge.lon1), + FixedPointCoordinate(current_edge.lat2, current_edge.lon2), nearest, ¤t_ratio ); @@ -680,11 +680,11 @@ public: 1 == abs(current_edge.id - result_phantom_node.edgeBasedNode ) && CoordinatesAreEquivalent( current_start_coordinate, - _Coordinate( + FixedPointCoordinate( current_edge.lat1, current_edge.lon1 ), - _Coordinate( + FixedPointCoordinate( current_edge.lat2, current_edge.lon2 ), @@ -768,10 +768,10 @@ private: } inline double ComputePerpendicularDistance( - const _Coordinate& inputPoint, - const _Coordinate& source, - const _Coordinate& target, - _Coordinate& nearest, double *r) const { + const FixedPointCoordinate& inputPoint, + const FixedPointCoordinate& source, + const FixedPointCoordinate& target, + FixedPointCoordinate& nearest, double *r) const { const double x = static_cast(inputPoint.lat); const double y = static_cast(inputPoint.lon); const double a = static_cast(source.lat); @@ -815,7 +815,7 @@ private: return (p-x)*(p-x) + (q-y)*(q-y); } - inline bool CoordinatesAreEquivalent(const _Coordinate & a, const _Coordinate & b, const _Coordinate & c, const _Coordinate & d) const { + inline bool CoordinatesAreEquivalent(const FixedPointCoordinate & a, const FixedPointCoordinate & b, const FixedPointCoordinate & c, const FixedPointCoordinate & d) const { return (a == b && c == d) || (a == c && b == d) || (a == d && b == c); } diff --git a/Descriptors/DescriptionFactory.cpp b/Descriptors/DescriptionFactory.cpp index 692dc31cb..1acf83a66 100644 --- a/Descriptors/DescriptionFactory.cpp +++ b/Descriptors/DescriptionFactory.cpp @@ -32,7 +32,10 @@ inline double DescriptionFactory::RadianToDegree(const double radian) const { return radian * (180/M_PI); } -double DescriptionFactory::GetBearing(const _Coordinate& A, const _Coordinate& B) const { +double DescriptionFactory::GetBearing( + const FixedPointCoordinate & A, + const FixedPointCoordinate & B +) const { double deltaLong = DegreeToRadian(B.lon/COORDINATE_PRECISION - A.lon/COORDINATE_PRECISION); double lat1 = DegreeToRadian(A.lat/COORDINATE_PRECISION); @@ -59,7 +62,7 @@ void DescriptionFactory::SetEndSegment(const PhantomNode & _targetPhantom) { pathDescription.push_back(SegmentInformation(_targetPhantom.location, _targetPhantom.nodeBasedEdgeNameID, 0, _targetPhantom.weight1, 0, true) ); } -void DescriptionFactory::AppendSegment(const _Coordinate & coordinate, const _PathData & data ) { +void DescriptionFactory::AppendSegment(const FixedPointCoordinate & coordinate, const _PathData & data ) { if(1 == pathDescription.size() && pathDescription.back().location == coordinate) { pathDescription.back().nameID = data.nameID; } else { diff --git a/Descriptors/DescriptionFactory.h b/Descriptors/DescriptionFactory.h index 36071e492..68182a881 100644 --- a/Descriptors/DescriptionFactory.h +++ b/Descriptors/DescriptionFactory.h @@ -63,10 +63,10 @@ public: std::vector pathDescription; DescriptionFactory(); virtual ~DescriptionFactory(); - double GetBearing(const _Coordinate& C, const _Coordinate& B) const; + double GetBearing(const FixedPointCoordinate& C, const FixedPointCoordinate& B) const; void AppendEncodedPolylineString(std::string &output); void AppendUnencodedPolylineString(std::string &output); - void AppendSegment(const _Coordinate & coordinate, const _PathData & data); + void AppendSegment(const FixedPointCoordinate & coordinate, const _PathData & data); void BuildRouteSummary(const double distance, const unsigned time); void SetStartSegment(const PhantomNode & startPhantom); void SetEndSegment(const PhantomNode & startPhantom); diff --git a/Descriptors/GPXDescriptor.h b/Descriptors/GPXDescriptor.h index f4a8190c5..9c3caa77b 100644 --- a/Descriptors/GPXDescriptor.h +++ b/Descriptors/GPXDescriptor.h @@ -28,7 +28,7 @@ or see http://www.gnu.org/licenses/agpl.txt. class GPXDescriptor : public BaseDescriptor{ private: _DescriptorConfig config; - _Coordinate current; + FixedPointCoordinate current; std::string tmp; public: diff --git a/Descriptors/JSONDescriptor.h b/Descriptors/JSONDescriptor.h index da7afcbb8..a45d478ed 100644 --- a/Descriptors/JSONDescriptor.h +++ b/Descriptors/JSONDescriptor.h @@ -39,7 +39,7 @@ private: _DescriptorConfig config; DescriptionFactory descriptionFactory; DescriptionFactory alternateDescriptionFactory; - _Coordinate current; + FixedPointCoordinate current; unsigned numberOfEnteredRestrictedAreas; struct RoundAbout{ RoundAbout() : diff --git a/Extractor/ExtractorStructs.h b/Extractor/ExtractorStructs.h index 108acf97d..778778ed0 100644 --- a/Extractor/ExtractorStructs.h +++ b/Extractor/ExtractorStructs.h @@ -21,7 +21,6 @@ or see http://www.gnu.org/licenses/agpl.txt. #ifndef EXTRACTORSTRUCTS_H_ #define EXTRACTORSTRUCTS_H_ - #include "../DataStructures/Coordinate.h" #include "../DataStructures/HashTable.h" #include "../DataStructures/ImportNode.h" @@ -110,8 +109,8 @@ struct InternalExtractorEdge { bool isAccessRestricted; bool isContraFlow; - _Coordinate startCoord; - _Coordinate targetCoord; + FixedPointCoordinate startCoord; + FixedPointCoordinate targetCoord; static InternalExtractorEdge min_value() { return InternalExtractorEdge(0,0); diff --git a/Plugins/BasePlugin.h b/Plugins/BasePlugin.h index d8956d022..4985719b5 100644 --- a/Plugins/BasePlugin.h +++ b/Plugins/BasePlugin.h @@ -36,7 +36,7 @@ public: virtual const std::string & GetDescriptor() const = 0; virtual void HandleRequest(const RouteParameters & routeParameters, http::Reply& reply) = 0; - inline bool checkCoord(const _Coordinate & c) { + inline bool checkCoord(const FixedPointCoordinate & c) { if( c.lat > 90*COORDINATE_PRECISION || c.lat < -90*COORDINATE_PRECISION || diff --git a/Plugins/LocatePlugin.h b/Plugins/LocatePlugin.h index e6f59159e..8a1c9af91 100644 --- a/Plugins/LocatePlugin.h +++ b/Plugins/LocatePlugin.h @@ -48,7 +48,7 @@ public: } //query to helpdesk - _Coordinate result; + FixedPointCoordinate result; std::string tmp; //json diff --git a/Plugins/RawRouteData.h b/Plugins/RawRouteData.h index f0c105486..e43e22c62 100644 --- a/Plugins/RawRouteData.h +++ b/Plugins/RawRouteData.h @@ -35,7 +35,7 @@ struct RawRouteData { std::vector< _PathData > computedShortestPath; std::vector< _PathData > computedAlternativePath; std::vector< PhantomNodes > segmentEndCoordinates; - std::vector< _Coordinate > rawViaNodeCoordinates; + std::vector< FixedPointCoordinate > rawViaNodeCoordinates; unsigned checkSum; int lengthOfShortestPath; int lengthOfAlternativePath; diff --git a/Plugins/RouteParameters.h b/Plugins/RouteParameters.h index e4455f839..ecef68f24 100644 --- a/Plugins/RouteParameters.h +++ b/Plugins/RouteParameters.h @@ -52,7 +52,7 @@ struct RouteParameters { std::string jsonpParameter; std::string language; std::vector hints; - std::vector<_Coordinate> coordinates; + std::vector coordinates; typedef HashTable::const_iterator OptionsIterator; void setZoomLevel(const short i) { @@ -109,7 +109,7 @@ struct RouteParameters { void addCoordinate(const boost::fusion::vector < double, double > & arg_) { int lat = COORDINATE_PRECISION*boost::fusion::at_c < 0 > (arg_); int lon = COORDINATE_PRECISION*boost::fusion::at_c < 1 > (arg_); - coordinates.push_back(_Coordinate(lat, lon)); + coordinates.push_back(FixedPointCoordinate(lat, lon)); } }; diff --git a/Tools/simpleclient.cpp b/Tools/simpleclient.cpp index d7cc5c08f..a4588a5db 100644 --- a/Tools/simpleclient.cpp +++ b/Tools/simpleclient.cpp @@ -65,8 +65,8 @@ int main (int argc, char * argv[]) { route_parameters.language = ""; //unused atm //route_parameters.hints.push_back(); // see wiki, saves I/O if done properly - _Coordinate start_coordinate(52.519930*COORDINATE_PRECISION,13.438640*COORDINATE_PRECISION); - _Coordinate target_coordinate(52.513191*COORDINATE_PRECISION,13.415852*COORDINATE_PRECISION); + FixedPointCoordinate start_coordinate(52.519930*COORDINATE_PRECISION,13.438640*COORDINATE_PRECISION); + FixedPointCoordinate target_coordinate(52.513191*COORDINATE_PRECISION,13.415852*COORDINATE_PRECISION); route_parameters.coordinates.push_back(start_coordinate); route_parameters.coordinates.push_back(target_coordinate);