diff options
author | Mikhail Gorbushin <m.gorbushin@corp.mail.ru> | 2019-06-12 20:54:27 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2019-06-17 16:40:55 +0300 |
commit | 4025f9f9f16c216983f08b1854f918bcb539efa8 (patch) | |
tree | 3335051fc3f0eb1523931fcc5e93e6200886523f /generator/borders.hpp | |
parent | 64e4c4ebe7d18474381f852452dc25f7f3487e1f (diff) |
[qt] add option - draw borders from packed_polygon.bin
Diffstat (limited to 'generator/borders.hpp')
-rw-r--r-- | generator/borders.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/generator/borders.hpp b/generator/borders.hpp index 2210ffc6e2..8be11528b9 100644 --- a/generator/borders.hpp +++ b/generator/borders.hpp @@ -3,6 +3,7 @@ #include "storage/storage_defines.hpp" #include "coding/geometry_coding.hpp" +#include "coding/reader.hpp" #include "geometry/rect2d.hpp" #include "geometry/region2d.hpp" @@ -68,21 +69,21 @@ bool LoadCountriesList(std::string const & baseDir, CountriesContainer & countri void GeneratePackedBorders(std::string const & baseDir); template <typename Source> -std::vector<std::vector<m2::PointD>> ReadPolygonsOfOneBorder(Source & src) +std::vector<m2::RegionD> ReadPolygonsOfOneBorder(Source & src) { auto const count = ReadVarUint<uint32_t>(src); - std::vector<std::vector<m2::PointD>> result(count); + std::vector<m2::RegionD> result(count); for (size_t i = 0; i < count; ++i) { std::vector<m2::PointD> points; serial::LoadOuterPath(src, serial::GeometryCodingParams(), points); - result[i] = std::move(points); + result[i] = m2::RegionD(std::move(points)); } return result; } void DumpBorderToPolyFile(std::string const & filePath, storage::CountryId const & mwmName, - std::vector<std::vector<m2::PointD>> const & polygons); + std::vector<m2::RegionD> const & polygons); void UnpackBorders(std::string const & baseDir, std::string const & targetDir); } // namespace borders |