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

Function GetBordersRect

generator/borders.cpp:163–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163bool GetBordersRect(std::string const & baseDir, std::string const & country, m2::RectD & bordersRect)
164{
165 auto const bordersFile = base::JoinPath(baseDir, BORDERS_DIR, country + BORDERS_EXTENSION);
166 if (!Platform::IsFileExistsByFullPath(bordersFile))
167 {
168 LOG(LWARNING, ("File with borders does not exist:", bordersFile));
169 return false;
170 }
171
172 PolygonsList borders;
173 CHECK(LoadBorders(bordersFile, borders), ());
174 bordersRect.MakeEmpty();
175 for (auto const & border : borders)
176 bordersRect.Add(border.GetRect());
177
178 return true;
179}
180
181CountryPolygonsCollection LoadCountriesList(std::string const & baseDir)
182{

Callers 1

GenerateFinalFeaturesFunction · 0.85

Calls 5

JoinPathFunction · 0.85
MakeEmptyMethod · 0.80
LoadBordersFunction · 0.70
AddMethod · 0.45
GetRectMethod · 0.45

Tested by

no test coverage detected