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

Method GetKey

generator/srtm_parser.cpp:217–226  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

215
216// static
217SrtmTile::LatLonKey SrtmTile::GetKey(ms::LatLon const & coord)
218{
219 ms::LatLon center{floor(coord.m_lat) + 0.5, floor(coord.m_lon) + 0.5};
220 if (coord.m_lat < 0)
221 center.m_lat -= 1.0;
222 if (coord.m_lon < 0)
223 center.m_lon -= 1.0;
224
225 return {static_cast<int32_t>(center.m_lat), static_cast<int32_t>(center.m_lon)};
226}
227
228// static
229std::string SrtmTile::GetBase(ms::LatLon const & coord)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected