10 #if !defined(GEOGRAPHICLIB_MGRS_HPP) 11 #define GEOGRAPHICLIB_MGRS_HPP 1 71 static const char*
const hemispheres_;
72 static const char*
const utmcols_[3];
73 static const char*
const utmrow_;
74 static const char*
const upscols_[4];
75 static const char*
const upsrows_[2];
76 static const char*
const latband_;
77 static const char*
const upsband_;
78 static const char*
const digits_;
79 static const char*
const alpha_;
81 static const int mineasting_[4];
82 static const int maxeasting_[4];
83 static const int minnorthing_[4];
84 static const int maxnorthing_[4];
85 static constexpr
int base_ = 10;
87 static constexpr
int tilelevel_ = 5;
89 static constexpr
int utmrowperiod_ = 20;
91 static constexpr
int utmevenrowshift_ = 5;
93 static constexpr
int maxprec_ = 5 + 6;
95 static constexpr
int mult_ = 1000000;
96 static void CheckCoords(
bool utmp,
bool& northp, real& x, real& y);
97 static int UTMRow(
int iband,
int icol,
int irow);
102 static int LatitudeBand(real lat) {
104 int ilat = int(floor(lat));
105 return (std::max)(-10, (std::min)(9, (ilat + 80)/8 - 10));
111 static int ApproxLatitudeBand(
real y) {
113 using std::floor, std::fabs, std::fmin;
117 int b = int(floor( ((ya * 9 + 1) / 10) / 8 ));
130 return y >= 0 ? b : -(b + 1);
133 static constexpr
int tile_ = 100000;
134 static constexpr
int minutmcol_ = 1;
135 static constexpr
int maxutmcol_ = 9;
136 static constexpr
int minutmSrow_ = 10;
137 static constexpr
int maxutmSrow_ = 100;
138 static constexpr
int minutmNrow_ = 0;
139 static constexpr
int maxutmNrow_ = 95;
140 static constexpr
int minupsSind_ = 8;
141 static constexpr
int maxupsSind_ = 32;
142 static constexpr
int minupsNind_ = 13;
143 static constexpr
int maxupsNind_ = 27;
144 static constexpr
int upseasting_ = 20;
145 static constexpr
int utmeasting_ = 5;
147 static constexpr
int utmNshift_ = (maxutmSrow_ - minutmNrow_) * tile_;
233 static void Forward(
int zone,
bool northp,
real x,
real y,
234 int prec, std::string& mgrs);
257 static void Forward(
int zone,
bool northp,
real x,
real y,
real lat,
258 int prec, std::string& mgrs);
305 static void Reverse(
const std::string& mgrs,
306 int& zone,
bool& northp,
real& x,
real& y,
307 int& prec,
bool centerp =
true);
332 static void Decode(
const std::string& mgrs,
333 std::string& gridzone, std::string& block,
334 std::string& easting, std::string& northing);
368 #endif // GEOGRAPHICLIB_MGRS_HPP
#define GEOGRAPHICLIB_EXPORT
static Math::real Flattening()
Header for GeographicLib::UTMUPS class.
Convert between geographic coordinates and UTM/UPS.
static Math::real EquatorialRadius()
Namespace for GeographicLib.
static Math::real EquatorialRadius()
GeographicLib::Math::real real
Header for GeographicLib::Constants class.
static Math::real Flattening()
Convert between UTM/UPS and MGRS.