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

Function ToLatLon

generator/intermediate_data.cpp:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15string const kShortExtension = ".short";
16
17void ToLatLon(double lat, double lon, LatLon & ll)
18{
19 int64_t const lat64 = lat * kValueOrder;
20 int64_t const lon64 = lon * kValueOrder;
21
22 CHECK(lat64 >= std::numeric_limits<int32_t>::min() && lat64 <= std::numeric_limits<int32_t>::max(),
23 ("Latitude is out of 32bit boundary:", lat64));
24 CHECK(lon64 >= std::numeric_limits<int32_t>::min() && lon64 <= std::numeric_limits<int32_t>::max(),
25 ("Longitude is out of 32bit boundary:", lon64));
26 ll.m_lat = static_cast<int32_t>(lat64);
27 ll.m_lon = static_cast<int32_t>(lon64);
28}
29
30bool FromLatLon(LatLon const & ll, double & lat, double & lon)
31{

Callers 15

DebugPrintFunction · 0.70
AddPointMethod · 0.70
AddPointMethod · 0.70
AddPointMethod · 0.70
ProcessRawEntriesMethod · 0.70
MatchMethod · 0.70
AreaOnEarthFunction · 0.70
DumpBorderToPolyFileFunction · 0.70
CreatePlaceMethod · 0.70
PreprocessElementFunction · 0.70
IsTransformToStateMethod · 0.70

Calls

no outgoing calls

Tested by 1

ForEachNodeIdxMethod · 0.40