From 782fba2ce75b347ef109f8561b3004a801f769c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Gru=C3=9F?= Date: Tue, 2 Jun 2015 13:15:31 +0200 Subject: [PATCH] updated to 1E6 based polyline format --- algorithms/polyline_compressor.cpp | 4 ++-- unit_tests/algorithms/geometry_string.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/algorithms/polyline_compressor.cpp b/algorithms/polyline_compressor.cpp index 6377592b7..0db75dcc6 100644 --- a/algorithms/polyline_compressor.cpp +++ b/algorithms/polyline_compressor.cpp @@ -119,8 +119,8 @@ std::vector PolylineCompressor::decode_string(const std::s lng += dlng; FixedPointCoordinate p; - p.lat = COORDINATE_PRECISION * (((double) lat / 1E5)); - p.lon = COORDINATE_PRECISION * (((double) lng / 1E5)); + p.lat = COORDINATE_PRECISION * (((double) lat / 1E6)); + p.lon = COORDINATE_PRECISION * (((double) lng / 1E6)); new_coordinates.push_back(p); } diff --git a/unit_tests/algorithms/geometry_string.cpp b/unit_tests/algorithms/geometry_string.cpp index c545e0d69..035b3217c 100644 --- a/unit_tests/algorithms/geometry_string.cpp +++ b/unit_tests/algorithms/geometry_string.cpp @@ -39,7 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. BOOST_AUTO_TEST_CASE(geometry_string) { // Polyline string for the 5 coordinates - const std::string polyline = "_c`|@_c`|@o}@_pRo}@}oRm}@apRo}@_pR"; + const std::string polyline = "_gjaR_gjaR_pR_ibE_pR_ibE_pR_ibE_pR_ibE"; PolylineCompressor pc; std::vector coords = pc.decode_string(polyline);