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);
175 bool centerp =
true,
bool swaplatlong =
false)
176 { Reset(s, centerp, swaplatlong); }
192 Reset(latitude, longitude, zone);
205 GeoCoords(
int zone,
bool northp, real easting, real northing) {
206 Reset(zone, northp, easting, northing);
220 void Reset(
const std::string& s,
221 bool centerp =
true,
bool swaplatlong =
false);
239 _zone, _northp, _easting, _northing, _gamma, _k,
243 if (_long >= 180) _long -= 360;
244 else if (_long < -180) _long += 360;
259 void Reset(
int zone,
bool northp, real easting, real northing) {
261 _lat, _long, _gamma, _k);
265 _northing = northing;
317 int Zone()
const {
return _zone; }
346 _alt_easting, _alt_northing, _alt_gamma, _alt_k,
395 std::string GeoRepresentation(
int prec = 0,
bool swaplatlong =
false)
const;
418 std::string DMSRepresentation(
int prec = 0,
bool swaplatlong =
false,
419 char dmssep =
char(0))
443 std::string MGRSRepresentation(
int prec = 0)
const;
463 std::string UTMUPSRepresentation(
int prec = 0,
bool abbrev =
true)
const;
478 std::string UTMUPSRepresentation(
bool northp,
int prec = 0,
479 bool abbrev =
true)
const;
488 std::string AltMGRSRepresentation(
int prec = 0)
const;
501 std::string AltUTMUPSRepresentation(
int prec = 0,
bool abbrev =
true)
const;
516 std::string AltUTMUPSRepresentation(
bool northp,
int prec = 0,
517 bool abbrev =
true)
const;
546 {
return UTMUPS::InverseFlattening(); }