updated to 1E6 based polyline format

This commit is contained in:
Andreas Gruß 2015-06-02 13:15:31 +02:00
parent 4d73f98050
commit 782fba2ce7
2 changed files with 3 additions and 3 deletions

View File

@ -119,8 +119,8 @@ std::vector<FixedPointCoordinate> 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);
}

View File

@ -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<FixedPointCoordinate> coords = pc.decode_string(polyline);