10 #if !defined(GEOGRAPHICLIB_MGRS_HPP) 11 #define GEOGRAPHICLIB_MGRS_HPP 1 18 # pragma warning (push) 19 # pragma warning (disable: 4251) 77 static const char*
const hemispheres_;
78 static const char*
const utmcols_[3];
79 static const char*
const utmrow_;
80 static const char*
const upscols_[4];
81 static const char*
const upsrows_[2];
82 static const char*
const latband_;
83 static const char*
const upsband_;
84 static const char*
const digits_;
86 static const int mineasting_[4];
87 static const int maxeasting_[4];
88 static const int minnorthing_[4];
89 static const int maxnorthing_[4];
103 static void CheckCoords(
bool utmp,
bool& northp, real& x, real& y);
104 static int UTMRow(
int iband,
int icol,
int irow);
109 static int LatitudeBand(real lat) {
111 int ilat = int(floor(lat));
112 return (std::max)(-10, (std::min)(9, (ilat + 80)/8 - 10));
118 static int ApproxLatitudeBand(real y) {
120 using std::floor;
using std::abs;
121 real ya = floor( (std::min)(
real(88), abs(y/tile_)) ) +
125 int b = int(floor( ((ya * 9 + 1) / 10) / 8 ));
138 return y >= 0 ? b : -(b + 1);
156 utmNshift_ = (maxutmSrow_ - minutmNrow_) * tile_
243 static void Forward(
int zone,
bool northp, real x, real y,
244 int prec, std::string& mgrs);
267 static void Forward(
int zone,
bool northp, real x, real y, real lat,
268 int prec, std::string& mgrs);
315 static void Reverse(
const std::string& mgrs,
316 int& zone,
bool& northp, real& x, real& y,
317 int& prec,
bool centerp =
true);
351 #if defined(_MSC_VER) 352 # pragma warning (pop) 355 #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.