Fix omitting the last point's coordinates in the geometry field

This commit is contained in:
Michael Krasnyk
2016-06-15 00:23:21 +02:00
parent b98431e8e6
commit 8c378191df
4 changed files with 36 additions and 3 deletions
+2 -2
View File
@@ -85,12 +85,12 @@ std::vector<util::Coordinate> assembleOverview(const std::vector<LegGeometry> &l
std::vector<util::Coordinate> overview_geometry;
overview_geometry.reserve(overview_size);
auto leg_index = 0UL;
auto leg_reverse_index = leg_geometries.size();
for (const auto &geometry : leg_geometries)
{
auto begin = geometry.locations.begin();
auto end = geometry.locations.end();
if (leg_index < leg_geometries.size() - 1)
if (--leg_reverse_index > 0)
{
end = std::prev(end);
}