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

Function LatLonToZoneNumber

libs/platform/utm_mgrs_utils.cpp:64–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64int LatLonToZoneNumber(double lat, double lon)
65{
66 if (56.0 <= lat && lat < 64.0 && 3.0 <= lon && lon < 12.0)
67 return 32;
68
69 if (72.0 <= lat && lat <= 84.0 and lon >= 0.0)
70 {
71 if (lon < 9.0)
72 return 31;
73 if (lon < 21.0)
74 return 33;
75 if (lon < 33.0)
76 return 35;
77 if (lon < 42.0)
78 return 37;
79 }
80
81 return static_cast<int>((lon + 180.0) / 6.0) + 1;
82}
83
84char LatitudeToZoneLetter(double lat)
85{

Callers 1

LatLonToUtmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected