10 #if !defined(GEOGRAPHICLIB_GEOCOORDS_HPP)
11 #define GEOGRAPHICLIB_GEOCOORDS_HPP 1
16 namespace GeographicLib {
52 real _lat, _long, _easting, _northing, _gamma, _k;
55 mutable real _alt_easting, _alt_northing, _alt_gamma, _alt_k;
56 mutable int _alt_zone;
58 void CopyToAlt()
const throw() {
59 _alt_easting = _easting;
60 _alt_northing = _northing;
65 static void UTMUPSString(
int zone,
bool northp, real easting, real northing,
66 int prec, std::string& utm);
174 bool centerp =
true,
bool swaplatlong =
false)
175 { Reset(s, centerp, swaplatlong); }
191 Reset(latitude, longitude, zone);
204 GeoCoords(
int zone,
bool northp, real easting, real northing) {
205 Reset(zone, northp, easting, northing);
219 void Reset(
const std::string& s,
220 bool centerp =
true,
bool swaplatlong =
false);
238 _zone, _northp, _easting, _northing, _gamma, _k,
242 if (_long >= 180) _long -= 360;
243 else if (_long < -180) _long += 360;
258 void Reset(
int zone,
bool northp, real easting, real northing) {
260 _lat, _long, _gamma, _k);
264 _northing = northing;
306 bool Northp()
const throw() {
return _northp; }
311 char Hemisphere()
const throw() {
return _northp ?
'N' :
'S'; }
316 int Zone()
const throw() {
return _zone; }
345 _alt_easting, _alt_northing, _alt_gamma, _alt_k,
353 int AltZone()
const throw() {
return _alt_zone; }
394 std::string GeoRepresentation(
int prec = 0,
bool swaplatlong =
false)
const;
417 std::string DMSRepresentation(
int prec = 0,
bool swaplatlong =
false,
418 char dmssep =
char(0))
442 std::string MGRSRepresentation(
int prec = 0)
const;
460 std::string UTMUPSRepresentation(
int prec = 0)
const;
473 std::string UTMUPSRepresentation(
bool northp,
int prec = 0)
const;
482 std::string AltMGRSRepresentation(
int prec = 0)
const;
493 std::string AltUTMUPSRepresentation(
int prec = 0)
const;
506 std::string AltUTMUPSRepresentation(
bool northp,
int prec = 0)
const;
535 {
return UTMUPS::InverseFlattening(); }
541 #endif // GEOGRAPHICLIB_GEOCOORDS_HPP
Math::real Latitude() const
#define GEOGRAPHICLIB_EXPORT
GeoCoords(int zone, bool northp, real easting, real northing)
static Math::real Flattening()
GeographicLib::Math::real real
Math::real AltNorthing() const
Header for GeographicLib::UTMUPS class.
Math::real MajorRadius() const
GeoCoords(real latitude, real longitude, int zone=UTMUPS::STANDARD)
Conversion between geographic coordinates.
Math::real Northing() const
GeoCoords(const std::string &s, bool centerp=true, bool swaplatlong=false)
static Math::real MajorRadius()
Math::real AltEasting() const
void Reset(real latitude, real longitude, int zone=UTMUPS::STANDARD)
static void Forward(real lat, real lon, int &zone, bool &northp, real &x, real &y, real &gamma, real &k, int setzone=STANDARD, bool mgrslimits=false)
Math::real Convergence() const
Math::real AltConvergence() const
static void Reverse(int zone, bool northp, real x, real y, real &lat, real &lon, real &gamma, real &k, bool mgrslimits=false)
Header for GeographicLib::Constants class.
Math::real AltScale() const
void Reset(int zone, bool northp, real easting, real northing)
Math::real Easting() const
void SetAltZone(int zone=UTMUPS::STANDARD) const
Math::real Flattening() const
static int StandardZone(real lat, real lon, int setzone=STANDARD)
Math::real Longitude() const