10 #if !defined(GEOGRAPHICLIB_GEOCOORDS_HPP)
11 #define GEOGRAPHICLIB_GEOCOORDS_HPP 1
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 {
59 _alt_easting = _easting;
60 _alt_northing = _northing;
65 static void UTMUPSString(
int zone,
bool northp, real easting, real northing,
66 int prec,
bool abbrev, std::string& utm);
177 bool centerp =
true,
bool swaplatlong =
false)
178 { Reset(s, centerp, swaplatlong); }
194 Reset(latitude, longitude, zone);
207 GeoCoords(
int zone,
bool northp, real easting, real northing) {
208 Reset(zone, northp, easting, northing);
222 void Reset(
const std::string& s,
223 bool centerp =
true,
bool swaplatlong =
false);
241 _zone, _northp, _easting, _northing, _gamma, _k,
245 if (_long >= 180) _long -= 360;
246 else if (_long < -180) _long += 360;
261 void Reset(
int zone,
bool northp, real easting, real northing) {
263 _lat, _long, _gamma, _k);
267 _northing = northing;
319 int Zone()
const {
return _zone; }
348 _alt_easting, _alt_northing, _alt_gamma, _alt_k,
397 std::string GeoRepresentation(
int prec = 0,
bool swaplatlong =
false)
const;
420 std::string DMSRepresentation(
int prec = 0,
bool swaplatlong =
false,
421 char dmssep =
char(0))
445 std::string MGRSRepresentation(
int prec = 0)
const;
465 std::string UTMUPSRepresentation(
int prec = 0,
bool abbrev =
true)
const;
480 std::string UTMUPSRepresentation(
bool northp,
int prec = 0,
481 bool abbrev =
true)
const;
490 std::string AltMGRSRepresentation(
int prec = 0)
const;
503 std::string AltUTMUPSRepresentation(
int prec = 0,
bool abbrev =
true)
const;
518 std::string AltUTMUPSRepresentation(
bool northp,
int prec = 0,
519 bool abbrev =
true)
const;
548 {
return UTMUPS::InverseFlattening(); }
554 #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
Namespace for GeographicLib.
Constants needed by GeographicLib
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