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
Eigen::Forward
@ Forward
Definition: NumericalDiff.h:19
GeographicLib::UTMUPS::Flattening
static Math::real Flattening()
Definition: UTMUPS.hpp:414
GeographicLib::UTMUPS::zonespec
zonespec
Definition: UTMUPS.hpp:109
GeographicLib
Namespace for GeographicLib.
Definition: JacobiConformal.hpp:15
x
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
Definition: gnuplot_common_settings.hh:12
real
float real
Definition: datatypes.h:10
GEOGRAPHICLIB_EXPORT
#define GEOGRAPHICLIB_EXPORT
Definition: Constants.hpp:91
GeographicLib::UTMUPS::CentralMeridian
static real CentralMeridian(int zone)
Definition: UTMUPS.hpp:90
GeographicLib::UTMUPS::MajorRadius
static Math::real MajorRadius()
Definition: UTMUPS.hpp:405
GeographicLib::Math::real
double real
Definition: Math.hpp:129
GeographicLib::UTMUPS::Forward
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
gamma
#define gamma
Definition: mconf.h:85
Constants.hpp
Header for GeographicLib::Constants class.
y
Scalar * y
Definition: level1_cplx_impl.h:124
GeographicLib::Constants::WGS84_a
static T WGS84_a()
Definition: Constants.hpp:159
GeographicLib::UTMUPS
Convert between geographic coordinates and UTM/UPS.
Definition: UTMUPS.hpp:75
GeographicLib::UTMUPS::Reverse
static void Reverse(int zone, bool northp, real x, real y, real &lat, real &lon, bool mgrslimits=false)
Definition: UTMUPS.hpp:279
GeographicLib::Constants::WGS84_f
static T WGS84_f()
Definition: Constants.hpp:169
lon
static const double lon
Definition: testGeographicLib.cpp:34
INVALID
#define INVALID
Definition: gtsam/3rdparty/Eigen/blas/common.h:45
real
Definition: main.h:100
lat
static const double lat
Definition: testGeographicLib.cpp:34
GeographicLib::UTMUPS::real
Math::real real
Definition: UTMUPS.hpp:77
MATCH
#define MATCH(X, R)
Definition: indexed_view.cpp:63


gtsam
Author(s):
autogenerated on Tue Jun 25 2024 03:07:55