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.

87 lines
2.0 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//////////////////////////////////////////////////////////////////////////////
//文件 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);
public:
BOOL m_bCurve;
BOOL m_bPoint;
BOOL m_bText;
BOOL m_bImage;
BOOL m_bWithSubLayer;
double m_dScale; //大小缩放比例不缩放时缺省为1
protected:
CString Convert(CString str, int sourceCodepage, int targetCodepage);
CMessageInfo m_messageInfo;
int uint = 0;
CProgressCtrl* m_pProgress;
CWnd* m_pInfoWnd;
CFile* m_pFile;
private:
int m_nUnicodeNum;
int m_nTargetNum;
BYTE* m_pTargetData;
wchar_t* m_pUnicodeData;
};
};//namespace
using namespace NFormatWriter;