User 27 bits/coord for normal data and 16 for world map.

This commit is contained in:
Yury Melnichek 2011-04-24 03:24:41 +02:00 committed by Alex Zolotarev
parent 60e2dcfbae
commit ac31ed145a

View file

@ -8,6 +8,7 @@
#include "../indexer/feature_visibility.hpp"
#include "../indexer/feature_impl.hpp"
#include "../indexer/geometry_serialization.hpp"
#include "../indexer/scales.hpp"
#include "../indexer/tesselator.hpp"
#include "../geometry/polygon.hpp"
@ -416,7 +417,10 @@ namespace feature
FileReader reader(tempDatFilePath);
feature::DataHeader header;
header.SetCodingParams(serial::CodingParams(30, midPoints.GetCenter()));
uint32_t coordBits = 27;
if (bWorld)
coordBits -= (scales::GetUpperScale() - scales::GetUpperWorldScale());
header.SetCodingParams(serial::CodingParams(coordBits, midPoints.GetCenter()));
header.SetScales(bWorld ? g_arrWorldScales : g_arrCountryScales);
FeaturesCollector2 collector(datFilePath, header);