⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 enghelper.h

📁 vc 和mapobjects地理信息系统组件开发 很有启发意义和参考价值
💻 H
字号:
#include "_legend.h"
#include "_scalebar.h"

class	CMoPolyArray : public CTypedPtrArray<CPtrArray, CMoPolygon*> {};

struct SMpfHeader	//.epf
{
	SMpfHeader()
	{
		memset(this,0,sizeof(SMpfHeader));
		mpf=20030618;
	};

	char		szAuthor[64];		//作者
	char		szCompany[128];		//公司
	char		szText[256];		//附加文本
	char		szCreateTime[64];	//建立时间
	char		szModifyTime[64];	//最后修改时间
	char		szA[256];			//预留
	long		mpf;				//=20030618
};

//EPF文件中地图的公共信息
struct SMpfMapInfo
{
	SMpfMapInfo()
	{
		memset(this,0,sizeof(SMpfMapInfo));
		crBack=RGB(255,255,255);
	};
	short		iLayers;		//图层数量
	short		iPoints;
	short		iLines;
	short		iRects;
	short		iCircles;
	short		iEllipses;
	short		iPolys;
	short		iTexts;
	COLORREF	crBack;			//地图背景颜色
	char		szB[256];		//预留
};

//EPF文件中的图层信息
struct SMpfLayerInfo
{
	short		iLayer;				//图层序号
	char		szType[4];			//0=不确定,1=map,2=image,3=cad,4=arc
	short		iStyle; 
	short		iSize;
	COLORREF	crColor;
	COLORREF	crOutlinColor;		//ImageLayer时候,当做透明
	BOOL		bOutline;		
	char		szPathFile[256];	//文件
	char		szC[16];			//预留
};

struct SMapperPoint
{
	double x;
	double y;
};

struct SEngLayerFields
{
	SEngLayerFields()
	{
		memset(this,0,sizeof(SEngLayerFields));
	};
	char szLayer[32];
	char szField[32];
	char szDataType[32];	//数据类型
	char szShapeType[16];	//moPoint,moLine,moPolygon
	double min,max,sum,mean,dev;
	long count;
};

class CLayerFieldArray : public CArray<SEngLayerFields,SEngLayerFields> {};

struct SMapperSeisInfo
{
	SMapperSeisInfo()
	{
		memset(this,0,sizeof(SMapperSeisInfo));
		point=CPoint(-1,-1);
		bDown=TRUE;
		bView=TRUE;
	};
	COleDateTime dt;
	float	lon,lat,mag,depth;
	BOOL	bView;			//根据挑选条件确定是否绘制
	BOOL	bDown;			//箭头向下
	CPoint  point;			//相对绘图区域的左上角的位置
	char	szPlace[40];
};

void Eng_AddLayerMap(CMap1 &map,const CString& path,COLORREF color);
void Eng_AddLayerCad(CMap1 &map,const CString& path,COLORREF color);
void Eng_AddLayerImage(CMap1 &map,const CString& path,COLORREF color);
void Eng_AddLayerArc(CMap1 &map,const CString& path,COLORREF color);
void Eng_AddLayerSde(CMap1 &map,const CString& path,COLORREF color);
void Eng_GetRunPath(CString &sPath);
void Eng_GetRandInt(int n0,int n1,int &r,int &g,int &b);
void Eng_GetPathOfPathFile(CString sPathFile,CString &sPath);
void Eng_GetDirOfPathFile(CString sPathFile,CString &sDir);
void Eng_GetFileOfPathFile(CString sPathFile,CString &sFile);
void Eng_GetFileExtOfPathFile(CString sPathFile,CString &sExt);
void Eng_GetLayerDataPara(CMap1 &map,short iLayer, CStringArray &saPara);
void Eng_GetLayerField(CMap1 &map,short iLayer, CLayerFieldArray &taLayerFields);
void Eng_SetLegend(CMap1 &map,C_legend &legend);
void Eng_GetRsStatistic(CMoRecordset &rs,CLayerFieldArray &taLayerFields);
void Eng_SetLegend(CMap1 &map,C_ScaleBar &scaleBar);
BOOL Eng_RoatePoly(CMoPolygon &poly,double dAngle);
void Eng_GetLayers(CMap1 &map,CStringArray &saLayer);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -