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.
108 lines
2.5 KiB
C++
108 lines
2.5 KiB
C++
//////////////////////////////////////////////////////////////////////////////
|
|
//文件: 格式转换类
|
|
//主要功能:
|
|
// 转换GeoMap的明码格式
|
|
//
|
|
//程序编写: 2008-3-04
|
|
//
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
#include ".\geomapbase.h"
|
|
#include "GeoMapGxfWriter.h"
|
|
|
|
namespace NFormatReader
|
|
{
|
|
|
|
namespace NGeoMapReader
|
|
{
|
|
|
|
class CGeoMapFile :
|
|
public COtherFormat
|
|
{
|
|
public:
|
|
CGeoMapFile(void);
|
|
virtual ~CGeoMapFile(void);
|
|
|
|
virtual BOOL Read(LPCTSTR lpszPathName);
|
|
BOOL IsGeoMapFile(LPCTSTR lpszFileName);
|
|
|
|
protected:
|
|
BOOL ReadBlock(CFile& fr);
|
|
BOOL ReadPoint(CFile& fr);
|
|
BOOL ReadText(CFile& fr);
|
|
BOOL ReadLine(CFile& fr);
|
|
BOOL ReadArea(CFile& fr);
|
|
BOOL ReadAll(CFile& fr);
|
|
BOOL ReadWell(CFile& fr);
|
|
BOOL ReadCity(CFile& fr);
|
|
BOOL ReadSeisLine(CFile& fr);
|
|
BOOL ReadSeisArea(CFile& fr);
|
|
BOOL ReadPetroArea(CFile& fr);
|
|
int ver; //1=v3.0, 2=v3.2
|
|
};
|
|
|
|
class CGeoMapGxf : public CGeoMapBase
|
|
{
|
|
public:
|
|
CGeoMapGxf(void);
|
|
virtual ~CGeoMapGxf(void);
|
|
|
|
virtual BOOL Read(LPCTSTR lpszPathName);
|
|
BOOL ReadGxf(CFile& fr);
|
|
BOOL WriteGxf(const char * const outFilePath);
|
|
|
|
public:
|
|
|
|
protected:
|
|
int ver;
|
|
CGeoMapGxfWriter m_write;
|
|
|
|
GxfMap m_map; //图件基础信息
|
|
|
|
CStringArray sa; //读取一行后的数据临时保存数组,根据空格分割的
|
|
BYTE nLayerView; //层位状态
|
|
|
|
int GXF_Paper(CFile& fr); //读纸张
|
|
int GXF_Map(CFile& fr); //读映射
|
|
int GXF_Layer(CFile& fr); //读层
|
|
int GXF_Projection(CFile& fr);//读投影
|
|
int GXF_Transform(CFile& fr);//读装换
|
|
|
|
int GXF_Text(CFile& fr); //读文本
|
|
int GXF_Polygon(CFile& fr); //读多边形
|
|
int GXF_Polyline(CFile& fr);//读折线
|
|
int GXF_Contour(CFile& fr); //读等值线
|
|
int GXF_Frame(CFile& fr); //读图框
|
|
int GXF_Legend(CFile& fr); //读图例框
|
|
int GXF_Scale(CFile& fr); //读刻度尺
|
|
int GXF_Town(CFile& fr); //读地名
|
|
int GXF_Pie(CFile& fr); //读饼图
|
|
int GXF_Well(CFile& fr); //读井位
|
|
int GXF_SeisLine(CFile& fr);//读测线
|
|
int GXF_Fault(CFile& fr); //读断层
|
|
int GXF_Rect(CFile& fr); //读矩形
|
|
int GXF_RoundRect(CFile& fr);//读圆角矩形
|
|
int GXF_Ellipse(CFile& fr); //读椭圆
|
|
int GXF_Mark(CFile& fr); //读符号
|
|
int GXF_Bitmap(CFile& fr); //读位图
|
|
int GXF_MetaFile(CFile & fr);//读元文件
|
|
int GXF_Log(CFile &fr); //读测井曲线
|
|
int GXF_SeisSection(CFile & fr);//读地震剖面
|
|
|
|
//old
|
|
int ReadFault(CFile& fr);
|
|
|
|
protected:
|
|
CString RemoveComma(CString str);
|
|
CString GetMarkName(CString strName, bool bWithSY = true);
|
|
long GetMarkID(CString strName);
|
|
bool toGColor(LPCTSTR lpColorStr, GColor& col);
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
using namespace NGeoMapReader;
|