///////////////////////////////////////////////////////////////////////////// //文件: Projection.cpp //主要功能: // 投影转换 // //程序编写: 2008-11-09 // // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_PROJECTIONPARAMETER_H__AC3971D1_56C4_4165_95D0_3BAB0126DFD5__INCLUDED_) #define AFX_PROJECTIONPARAMETER_H__AC3971D1_56C4_4165_95D0_3BAB0126DFD5__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define _XY_BL_DMS 0 //度分秒 #define _XY_XY_M 1 //米 #define _XY_BL_DEGREE 2 //度 #define _XY_XY_KM 3 //公里 #define _XY_BL_BL 0 //经度,纬度 #define _XY_XY_XY 1 //横坐标X,纵坐标Y #define _XY_BL_LB 2 //纬度,经度 #define _XY_XY_YX 3 //横坐标Y,纵坐标X #define _XY_MODE_CUSTOM 0x0001 //自动定义中央经线 #define _XY_MODE_WITH_ZONE 0x0002 //有带号 #define _PROJECTION_GAUSS 0 #define _PROJECTION_UTM 1 #define _PROJECTION_LAMBERT 2 #define _PROJECTION_MERCATOR 3 #define _PROJECTION_ALBERS 4 #define _PROJECTION_GAUSS_TITLE "Gauss" #define _PROJECTION_UTM_TITLE "UTM" #define _PROJECTION_LAMBERT_TITLE "Lambert" #define _PROJECTION_MERCATOR_TITLE "Mercator" #define _PROJECTION_ALBERS_TITLE "Albers" class AFX_EXT_CLASS CProjectionParameter { public: CProjectionParameter(); virtual ~CProjectionParameter(); virtual void Serialize(CArchive& ar, short ver); CString GetArgv(); int SetArgv(const CString Argv); CProjectionParameter& operator =(CProjectionParameter &pp); //for conformal conic projection double conic_OriginLongitude; //原点经度 double conic_OriginLatitude; //原点纬度 double conic_b1,conic_b2; //标准纬度 //for gauss and utm int w; //带宽(6或者3) int zone; double m_dCustomCenterLongitude; //自定义的中央经线 double m_dScaleFactor; //比例系数 int projection; //投影系统 int coordinate_unit,coordinate_type; //坐标参数 CString ellipsoid; //椭球体 public: BOOL IsCustomCenterLongitude(void); BOOL IsWithZone(void); void EnableCustomCenterLongitude(BOOL bEnable); void EnableWithZone(BOOL bEnable); //东经\西经, 北纬/南纬 void SetEarch(int longitudeSel, int latitudeSel); void GetEarch(int &longitudeSel, int &latitudeSel); CString GetPrjectionType(void); int SetPrjectionType(CString strType); int m_latitude; //北纬、南纬 int m_longitude; //东经、西经 protected: UINT m_nFlags; //是否是自定义中央经线,是否带有带号等参数 }; #endif // !defined(AFX_PROJECTIONPARAMETER_H__AC3971D1_56C4_4165_95D0_3BAB0126DFD5__INCLUDED_)