Go to the documentation of this file.
   10 #if !defined(GEOGRAPHICLIB_DMS_HPP) 
   11 #define GEOGRAPHICLIB_DMS_HPP 1 
   18 #  pragma warning (push) 
   19 #  pragma warning (disable: 4251 4127) 
   94     static void replace(std::string& 
s, 
const std::string& pat, 
char c) {
 
   95       std::string::size_type 
p = 0;
 
   98         if (
p == std::string::npos)
 
  100         s.replace(
p, pat.length(), 1, 
c);
 
  107     static const char* 
const components_[3];
 
  224     { 
return d + (
m + 
s / 60) / 60; }
 
  249     static void DecodeLatLon(
const std::string& dmsa, 
const std::string& dmsb,
 
  251                              bool longfirst = 
false);
 
  264     static Math::real DecodeAngle(
const std::string& angstr);
 
  278     static Math::real DecodeAzimuth(
const std::string& azistr);
 
  308     static std::string Encode(
real angle, component trailing, 
unsigned prec,
 
  309                               flag 
ind = NONE, 
char dmssep = 
char(0));
 
  330                               char dmssep = 
char(0)) {
 
  333                prec < 2 ? DEGREE : (prec < 4 ? MINUTE : SECOND),
 
  334                prec < 2 ? prec : (prec < 4 ? prec - 2 : prec - 4),
 
  346       d = 
int(ang); 
m = 60 * (ang - 
d);
 
  358       d = 
int(ang); ang = 60 * (ang - 
d);
 
  359       m = 
int(ang); 
s = 60 * (ang - 
m);
 
  366 #if defined(_MSC_VER) 
  367 #  pragma warning (pop) 
  370 #endif  // GEOGRAPHICLIB_DMS_HPP 
  
static const char *const digits_
static void replace(std::string &s, const std::string &pat, char c)
static const double d[K][N]
static std::string str(T x, int p=-1)
Namespace for GeographicLib.
static std::string Encode(real angle, unsigned prec, flag ind=NONE, char dmssep=char(0))
static const char *const signs_
Convert between degrees and the DMS representation.
#define GEOGRAPHICLIB_EXPORT
static const char *const dmsindicators_
static const char *const hemispheres_
Header for GeographicLib::Utility class.
static Math::real Decode(real d, real m=0, real s=0)
static void Encode(real ang, real &d, real &m, real &s)
Header for GeographicLib::Constants class.
static void Encode(real ang, real &d, real &m)
gtsam
Author(s): 
autogenerated on Wed May 28 2025 03:01:13