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

Function BuildIsolinesInfoSection

generator/isolines_section_builder.cpp:13–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11using namespace topography_generator;
12
13void BuildIsolinesInfoSection(std::string const & isolinesPath, std::string const & country,
14 std::string const & mwmFile)
15{
16 Contours<Altitude> isolines;
17 auto const countryIsolinesPath = GetIsolinesFilePath(country, isolinesPath);
18 if (!LoadContours(countryIsolinesPath, isolines) || isolines.m_contours.empty())
19 {
20 LOG(LWARNING, ("Section", ISOLINES_INFO_FILE_TAG, "was not created for", mwmFile));
21 return;
22 }
23
24 isolines::IsolinesInfo info(isolines.m_minValue, isolines.m_maxValue, isolines.m_valueStep);
25
26 FilesContainerW cont(mwmFile, FileWriter::OP_WRITE_EXISTING);
27 auto writer = cont.GetWriter(ISOLINES_INFO_FILE_TAG);
28 isolines::Serializer serializer(std::move(info));
29 serializer.Serialize(*writer);
30
31 LOG(LINFO, ("Section", ISOLINES_INFO_FILE_TAG, "is built for", mwmFile));
32}
33} // namespace generator

Callers 1

generator_tool.cppFile · 0.85

Calls 5

GetIsolinesFilePathFunction · 0.85
LoadContoursFunction · 0.85
GetWriterMethod · 0.80
emptyMethod · 0.45
SerializeMethod · 0.45

Tested by

no test coverage detected