|
|
|
|
#pragma once
|
|
|
|
|
/* <20>Ƕ<EFBFBD>ת<EFBFBD><D7AA><EFBFBD>࣬<EFBFBD><E0A3AC><EFBFBD>ڲ<EFBFBD>ͬ<EFBFBD>Ƕȸ<C7B6>ʽ֮<CABD><D6AE><EFBFBD><EFBFBD><EFBFBD>ת<E0BBA5><D7AA> */
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <regex>
|
|
|
|
|
#include <locale>
|
|
|
|
|
#include <codecvt>
|
|
|
|
|
using namespace std;
|
|
|
|
|
class Angle
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
Angle(void);
|
|
|
|
|
~Angle(void);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
void DegtoDms(double deg,int& d,int& m,double& s);
|
|
|
|
|
void DegtoRad(double deg,double& rad);
|
|
|
|
|
void DegtodDeg(double deg,int& d,double& m);
|
|
|
|
|
|
|
|
|
|
void DmstoDeg(int d,int m,double s,double& deg);
|
|
|
|
|
void DmstodDeg(int d,int m,double s,int& dDeg,double& dm);
|
|
|
|
|
|
|
|
|
|
string DoubleToString(double num,int precision=7);
|
|
|
|
|
string IntToString(int num);
|
|
|
|
|
//<2F>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>ָ<D6B8><EEBAAF>
|
|
|
|
|
vector<string> split(string str, string pattern);
|
|
|
|
|
//vector<string> split(char* str,const char* d);
|
|
|
|
|
|
|
|
|
|
// convert string to wstring
|
|
|
|
|
std::wstring String2WString(const std::string &s);
|
|
|
|
|
// convert wstring to string
|
|
|
|
|
std::string WString2String(const std::wstring &ws);
|
|
|
|
|
// <20><>γ<EFBFBD><CEB3>ת<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>
|
|
|
|
|
void getDMSString(double lon,double lat,string &str_lon,string &str_lat);
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|