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

Method GetBase

generator/srtm_parser.cpp:229–253  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

227
228// static
229std::string SrtmTile::GetBase(ms::LatLon const & coord)
230{
231 auto key = GetKey(coord);
232 std::ostringstream ss;
233 if (coord.m_lat < 0)
234 {
235 ss << "S";
236 key.first = -key.first;
237 }
238 else
239 ss << "N";
240
241 ss << std::setw(2) << std::setfill('0') << key.first;
242
243 if (coord.m_lon < 0)
244 {
245 ss << "W";
246 key.second = -key.second;
247 }
248 else
249 ss << "E";
250
251 ss << std::setw(3) << key.second;
252 return ss.str();
253}
254
255geometry::Altitude * SrtmTile::DataForTests(size_t & sz)
256{

Callers

nothing calls this directly

Calls 1

GetKeyFunction · 0.70

Tested by

no test coverage detected