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 {
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