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);
79 , _easting(
Math::NaN())
80 , _northing(
Math::NaN())
180 bool centerp =
true,
bool swaplatlong =
false)
181 { Reset(s, centerp, swaplatlong); }
197 Reset(latitude, longitude, zone);
210 GeoCoords(
int zone,
bool northp, real easting, real northing) {
211 Reset(zone, northp, easting, northing);
225 void Reset(
const std::string& s,
226 bool centerp =
true,
bool swaplatlong =
false);
244 _zone, _northp, _easting, _northing, _gamma, _k,
248 if (_long >= 180) _long -= 360;
249 else if (_long < -180) _long += 360;
264 void Reset(
int zone,
bool northp, real easting, real northing) {
266 _lat, _long, _gamma, _k);
270 _northing = northing;
322 int Zone()
const {
return _zone; }
351 _alt_easting, _alt_northing, _alt_gamma, _alt_k,
400 std::string GeoRepresentation(
int prec = 0,
bool swaplatlong =
false)
const;
423 std::string DMSRepresentation(
int prec = 0,
bool swaplatlong =
false,
424 char dmssep =
char(0))
448 std::string MGRSRepresentation(
int prec = 0)
const;
468 std::string UTMUPSRepresentation(
int prec = 0,
bool abbrev =
true)
const;
483 std::string UTMUPSRepresentation(
bool northp,
int prec = 0,
484 bool abbrev =
true)
const;
493 std::string AltMGRSRepresentation(
int prec = 0)
const;
506 std::string AltUTMUPSRepresentation(
int prec = 0,
bool abbrev =
true)
const;
521 std::string AltUTMUPSRepresentation(
bool northp,
int prec = 0,
522 bool abbrev =
true)
const;
551 {
return UTMUPS::InverseFlattening(); }
557 #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)
Mathematical functions needed by GeographicLib.
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)
Convert between geographic coordinates and UTM/UPS.
Math::real Convergence() const
Namespace for 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