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

Function MercatorRectToTilesRange

tools/topography_generator/generator.cpp:28–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26int constexpr kAsterTilesLatBottom = -60;
27
28void MercatorRectToTilesRange(m2::RectD const & rect, int & left, int & bottom, int & right, int & top)
29{
30 auto const leftBottom = mercator::ToLatLon(rect.LeftBottom());
31 auto const rightTop = mercator::ToLatLon(rect.RightTop());
32
33 left = static_cast<int>(floor(leftBottom.m_lon));
34 bottom = static_cast<int>(floor(leftBottom.m_lat));
35 right = std::min(179, static_cast<int>(floor(rightTop.m_lon)));
36 top = std::min(89, static_cast<int>(floor(rightTop.m_lat)));
37}
38
39std::string GetTileProfilesDir(std::string const & tilesDir)
40{

Callers 2

Calls 3

LeftBottomMethod · 0.80
RightTopMethod · 0.80
ToLatLonFunction · 0.50

Tested by

no test coverage detected