UTMUPS.hpp
Go to the documentation of this file.
1 
10 #if !defined(GEOGRAPHICLIB_UTMUPS_HPP)
11 #define GEOGRAPHICLIB_UTMUPS_HPP 1
12 
14 
15 namespace GeographicLib {
16 
76  private:
77  typedef Math::real real;
78  static const int falseeasting_[4];
79  static const int falsenorthing_[4];
80  static const int mineasting_[4];
81  static const int maxeasting_[4];
82  static const int minnorthing_[4];
83  static const int maxnorthing_[4];
84  static const int epsg01N = 32601; // EPSG code for UTM 01N
85  static const int epsg60N = 32660; // EPSG code for UTM 60N
86  static const int epsgN = 32661; // EPSG code for UPS N
87  static const int epsg01S = 32701; // EPSG code for UTM 01S
88  static const int epsg60S = 32760; // EPSG code for UTM 60S
89  static const int epsgS = 32761; // EPSG code for UPS S
90  static real CentralMeridian(int zone)
91  { return real(6 * zone - 183); }
92  // Throw an error if easting or northing are outside standard ranges. If
93  // throwp = false, return bool instead.
94  static bool CheckCoords(bool utmp, bool northp, real x, real y,
95  bool msgrlimits = false, bool throwp = true);
96  UTMUPS(); // Disable constructor
97 
98  public:
99 
109  enum zonespec {
113  MINPSEUDOZONE = -4,
117  INVALID = -4,
122  MATCH = -3,
129  UTM = -2,
138  STANDARD = -1,
142  MAXPSEUDOZONE = -1,
146  MINZONE = 0,
150  UPS = 0,
154  MINUTMZONE = 1,
158  MAXUTMZONE = 60,
162  MAXZONE = 60,
163  };
164 
179  static int StandardZone(real lat, real lon, int setzone = STANDARD);
180 
220  static void Forward(real lat, real lon,
221  int& zone, bool& northp, real& x, real& y,
222  real& gamma, real& k,
223  int setzone = STANDARD, bool mgrslimits = false);
224 
262  static void Reverse(int zone, bool northp, real x, real y,
263  real& lat, real& lon, real& gamma, real& k,
264  bool mgrslimits = false);
265 
269  static void Forward(real lat, real lon,
270  int& zone, bool& northp, real& x, real& y,
271  int setzone = STANDARD, bool mgrslimits = false) {
272  real gamma, k;
273  Forward(lat, lon, zone, northp, x, y, gamma, k, setzone, mgrslimits);
274  }
275 
279  static void Reverse(int zone, bool northp, real x, real y,
280  real& lat, real& lon, bool mgrslimits = false) {
281  real gamma, k;
282  Reverse(zone, northp, x, y, lat, lon, gamma, k, mgrslimits);
283  }
284 
318  static void Transfer(int zonein, bool northpin, real xin, real yin,
319  int zoneout, bool northpout, real& xout, real& yout,
320  int& zone);
321 
340  static void DecodeZone(const std::string& zonestr,
341  int& zone, bool& northp);
342 
360  static std::string EncodeZone(int zone, bool northp, bool abbrev = true);
361 
375  static void DecodeEPSG(int epsg, int& zone, bool& northp);
376 
388  static int EncodeEPSG(int zone, bool northp);
389 
394  static Math::real UTMShift();
395 
398 
406  { return Constants::WGS84_a(); }
407 
415  { return Constants::WGS84_f(); }
417 
418  };
419 
420 } // namespace GeographicLib
421 
422 #endif // GEOGRAPHICLIB_UTMUPS_HPP
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:91
float real
Definition: datatypes.h:10
Scalar * y
static const double lat
static Math::real Flattening()
Definition: UTMUPS.hpp:414
Math::real real
Definition: UTMUPS.hpp:77
static void Forward(real lat, real lon, int &zone, bool &northp, real &x, real &y, int setzone=STANDARD, bool mgrslimits=false)
Definition: UTMUPS.hpp:269
static Math::real MajorRadius()
Definition: UTMUPS.hpp:405
Convert between geographic coordinates and UTM/UPS.
Definition: UTMUPS.hpp:75
static real CentralMeridian(int zone)
Definition: UTMUPS.hpp:90
const mpreal gamma(const mpreal &x, mp_rnd_t r=mpreal::get_default_rnd())
Definition: mpreal.h:2262
Namespace for GeographicLib.
Header for GeographicLib::Constants class.
static void Reverse(int zone, bool northp, real x, real y, real &lat, real &lon, bool mgrslimits=false)
Definition: UTMUPS.hpp:279
static const double lon
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:23