10 #if !defined(GEOGRAPHICLIB_MGRS_HPP)
11 #define GEOGRAPHICLIB_MGRS_HPP 1
18 # pragma warning (push)
19 # pragma warning (disable: 4251)
73 static inline real eps() {
81 static inline real angeps() {
87 static const std::string hemispheres_;
88 static const std::string utmcols_[3];
89 static const std::string utmrow_;
90 static const std::string upscols_[4];
91 static const std::string upsrows_[2];
92 static const std::string latband_;
93 static const std::string upsband_;
94 static const std::string digits_;
96 static const int mineasting_[4];
97 static const int maxeasting_[4];
98 static const int minnorthing_[4];
99 static const int maxnorthing_[4];
107 utmevenrowshift_ = 5,
111 static void CheckCoords(
bool utmp,
bool& northp, real& x, real& y);
112 static int UTMRow(
int iband,
int icol,
int irow);
117 static int LatitudeBand(real lat) {
119 int ilat = int(floor(lat));
120 return (std::max)(-10, (std::min)(9, (ilat + 80)/8 - 10));
126 static int ApproxLatitudeBand(real y) {
128 using std::floor;
using std::abs;
129 real ya = floor( (std::min)(
real(88), abs(y/tile_)) ) +
133 int b = int(floor( ((ya * 9 + 1) / 10) / 8 ));
146 return y >= 0 ? b : -(b + 1);
164 utmNshift_ = (maxutmSrow_ - minutmNrow_) * tile_
250 static void Forward(
int zone,
bool northp, real x, real y,
251 int prec, std::string& mgrs);
274 static void Forward(
int zone,
bool northp, real x, real y, real lat,
275 int prec, std::string& mgrs);
321 static void Reverse(
const std::string& mgrs,
322 int& zone,
bool& northp, real& x, real& y,
323 int& prec,
bool centerp =
true);
351 {
return UTMUPS::InverseFlattening(); }
357 #if defined(_MSC_VER)
358 # pragma warning (pop)
361 #endif // GEOGRAPHICLIB_MGRS_HPP
#define GEOGRAPHICLIB_EXPORT
static Math::real Flattening()
static Math::real MajorRadius()
GeographicLib::Math::real real
Header for GeographicLib::UTMUPS class.
static Math::real MajorRadius()
Convert between geographic coordinates and UTM/UPS.
Namespace for GeographicLib.
Header for GeographicLib::Constants class.
static Math::real Flattening()
Convert between UTM/UPS and MGRS.