You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
1.9 KiB
C++
83 lines
1.9 KiB
C++
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//文件 ToGoogleKML.h
|
|
//主要功能:
|
|
//
|
|
//程序编写: 2005-12-07
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
#include "MessageInfo.h"
|
|
|
|
class CXy;
|
|
class COne;
|
|
class CHowToViewPoint;
|
|
|
|
namespace NFormatWriter
|
|
{
|
|
|
|
class AFX_EXT_CLASS CToGoogleKML
|
|
{
|
|
public:
|
|
CToGoogleKML(void);
|
|
virtual ~CToGoogleKML(void);
|
|
|
|
void SetMessageFile(LPCTSTR lpszFileName);
|
|
void SetProgress(CProgressCtrl* pProgress);
|
|
void SetInfoWnd(CWnd* pWnd);
|
|
|
|
int Play(CXy* pxy, LPCTSTR lpszOutput, LPCTSTR lpszLayerName);
|
|
int Play(CXy* pxy, CFile* pFileWrite, LPCTSTR lpszLayerName);
|
|
|
|
int ChangeXY2LB(CXy* pxy); //直接将平面坐标转换为经纬度,必须提前设置投影参数,内部不自动调用
|
|
|
|
protected:
|
|
void ChangeToKML(CXy* pxy, LPCTSTR lpszLayerName);
|
|
|
|
void PlayPoint(CXy* pxy, CPositionList& list, int nType, int& count);
|
|
void PlayCurve(CXy* pxy, CPositionList& list, int& count);
|
|
|
|
void WritePointHead(CString lpszLayer, COLORREF color, CHowToViewPoint* php=NULL);
|
|
void PlayPoint(COne* pOne);
|
|
|
|
void WriteTextHead(CString lpszLayer, COLORREF color);
|
|
void PlayText(COne* pOne);
|
|
|
|
void PlayCurve(COne* pOne);
|
|
void PlayCurveSolidHead(CString lpszLayer, COLORREF color, int nSolid);
|
|
|
|
void PlayImage(CXy* pxy, CPositionList& list, int& count);
|
|
void PlayImage(COne* pOne);
|
|
|
|
int FindMessageInfo(CString strLayerName, CString strElementName);
|
|
void WriteMessageInfo(CString strLayerName, CString strElementName);
|
|
|
|
void WriteString(LPCTSTR lpString);
|
|
|
|
CString Convert(CString str, int sourceCodepage, int targetCodepage);
|
|
|
|
public:
|
|
double m_dScale;
|
|
|
|
CProgressCtrl* m_pProgress;
|
|
CFile* m_pFile;
|
|
BYTE* m_pTargetData;
|
|
wchar_t* m_pUnicodeData;
|
|
|
|
int unit = 0;
|
|
int m_nUnicodeNum;
|
|
int m_nTargetNum;
|
|
|
|
BOOL m_bCurve;
|
|
BOOL m_bPoint;
|
|
BOOL m_bText;
|
|
BOOL m_bImage;
|
|
BOOL m_bWithSubLayer;
|
|
|
|
// 复杂结构体
|
|
CMessageInfo *m_messageInfo;
|
|
};
|
|
|
|
};//namespace
|
|
using namespace NFormatWriter;
|