separate logic between polyline compression algorithm and JSON formatting.
fixes and closes #1245
This commit is contained in:
@@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <osrm/Coordinate.h>
|
||||
|
||||
#include "../typedefs.h"
|
||||
#include "../Algorithms/PolylineCompressor.h"
|
||||
#include "../Algorithms/polyline_formatter.hpp"
|
||||
#include "../DataStructures/RawRouteData.h"
|
||||
#include "../DataStructures/SegmentInformation.h"
|
||||
#include "../DataStructures/TurnInstructions.h"
|
||||
@@ -112,9 +112,9 @@ JSON::Value DescriptionFactory::AppendGeometryString(const bool return_encoded)
|
||||
{
|
||||
if (return_encoded)
|
||||
{
|
||||
return polyline_compressor.printEncodedString(path_description);
|
||||
return PolylineFormatter().printEncodedString(path_description);
|
||||
}
|
||||
return polyline_compressor.printUnencodedString(path_description);
|
||||
return PolylineFormatter().printUnencodedString(path_description);
|
||||
}
|
||||
|
||||
void DescriptionFactory::BuildRouteSummary(const double distance, const unsigned time)
|
||||
|
||||
@@ -29,8 +29,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define DESCRIPTIONFACTORY_H_
|
||||
|
||||
#include "../Algorithms/DouglasPeucker.h"
|
||||
#include "../Algorithms/PolylineCompressor.h"
|
||||
#include "../DataStructures/phantom_node.hpp"
|
||||
#include "../DataStructures/JSONContainer.h"
|
||||
#include "../DataStructures/SegmentInformation.h"
|
||||
#include "../DataStructures/TurnInstructions.h"
|
||||
#include "../typedefs.h"
|
||||
@@ -47,7 +47,6 @@ struct PathData;
|
||||
class DescriptionFactory
|
||||
{
|
||||
DouglasPeucker polyline_generalizer;
|
||||
PolylineCompressor polyline_compressor;
|
||||
PhantomNode start_phantom, target_phantom;
|
||||
|
||||
double DegreeToRadian(const double degree) const;
|
||||
|
||||
Reference in New Issue
Block a user