MCPcopy Create free account
hub / github.com/comaps/comaps / LoadRegionsFromDisk

Method LoadRegionsFromDisk

libs/storage/country_info_reader_light.cpp:46–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void CountryInfoReader::LoadRegionsFromDisk(size_t id, std::vector<m2::RegionD> & regions) const
47{
48 regions.clear();
49 ReaderSource<ModelReaderPtr> src(m_reader->GetReader(strings::to_string(id)));
50
51 uint32_t const count = ReadVarUint<uint32_t>(src);
52 for (size_t i = 0; i < count; ++i)
53 {
54 std::vector<m2::PointD> points;
55 serial::LoadOuterPath(src, serial::GeometryCodingParams(), points);
56 regions.emplace_back(std::move(points));
57 }
58}
59
60bool CountryInfoReader::BelongsToRegion(m2::PointD const & pt, size_t id) const
61{

Callers

nothing calls this directly

Calls 6

to_stringFunction · 0.85
LoadOuterPathFunction · 0.85
clearMethod · 0.45
GetReaderMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected