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_;
85 static const char*
const alpha_;
87 static const int mineasting_[4];
88 static const int maxeasting_[4];
89 static const int minnorthing_[4];
90 static const int maxnorthing_[4];
104 static void CheckCoords(
bool utmp,
bool& northp, real& x, real& y);
105 static int UTMRow(
int iband,
int icol,
int irow);
110 static int LatitudeBand(real lat) {
112 int ilat = int(floor(lat));
113 return (std::max)(-10, (std::min)(9, (ilat + 80)/8 - 10));
119 static int ApproxLatitudeBand(
real y) {
121 using std::floor;
using std::fabs;
using std::fmin;
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);
342 static void Decode(
const std::string& mgrs,
343 std::string& gridzone, std::string& block,
344 std::string& easting, std::string& northing);
379# pragma warning (pop)
Header for GeographicLib::Constants class.
#define GEOGRAPHICLIB_EXPORT
GeographicLib::Math::real real
Header for GeographicLib::UTMUPS class.
Convert between UTM/UPS and MGRS.
static Math::real EquatorialRadius()
static Math::real Flattening()
Convert between geographic coordinates and UTM/UPS.
static Math::real Flattening()
static Math::real EquatorialRadius()
Namespace for GeographicLib.