|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "GeoMapBase.h"
|
|
|
|
|
|
#include "GeoMapSymbolLib.h"
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
|
|
|
|
typedef unsigned char BYTE;
|
|
|
|
|
|
typedef unsigned short WORD;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NFormatReader
|
|
|
|
|
|
{
|
|
|
|
|
|
namespace NGeoMapReader
|
|
|
|
|
|
{
|
|
|
|
|
|
class GdbEleCollection;
|
|
|
|
|
|
class CGeoMapGdbWriter : public CGeoMapBase
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CGeoMapGdbWriter(void);
|
|
|
|
|
|
~CGeoMapGdbWriter(void);
|
|
|
|
|
|
public:
|
|
|
|
|
|
FILE * m_writefile;
|
|
|
|
|
|
CFile *m_cfile;
|
|
|
|
|
|
public:
|
|
|
|
|
|
list<GdbEleCollection> eleList;
|
|
|
|
|
|
public:
|
|
|
|
|
|
int OpenFile(const char * fname); // <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
|
int CloseFile(); // <20>ر<EFBFBD><D8B1>ļ<EFBFBD>
|
|
|
|
|
|
int Write(const void * buff,int size,int count,FILE * file); // д<><D0B4><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteFileHead(GMFileHead * head); // <20>ļ<EFBFBD>ͷ
|
|
|
|
|
|
int WriteLayer(GMLayerHead * layer); // <20><>ͷ
|
|
|
|
|
|
int WriteElement(GMLayerTotal * total); // ͼԪ
|
|
|
|
|
|
int WriteElementMap(map<int,list<GdbEleCollection> > map,GMLayerHead *headLayer); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д
|
|
|
|
|
|
int WritePolygon(GMPolygon * polygon,IPoint* pt); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WritePolyline(GMPolyline * polyline,IPoint * pt); // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteSymbol(GMSymbol * symbol); // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteRichText(GMRichText * richText); // <20>ı<EFBFBD>
|
|
|
|
|
|
int WriteTextStr(GMRichTextStr textstr,int isTrue); // <20>ı<EFBFBD><C4B1><EFBFBD>
|
|
|
|
|
|
int WriteLegend(GMLegend * legend); // ͼ<><CDBC><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteScale(GMScale * scale); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteAxis(GMAxis * axis); // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteCompass(GMCompass * compass); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteWell(GMWell * well); // <20><>λ
|
|
|
|
|
|
int WriteReside(GMReside * reside); // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteFrame(GMMapFrame * frame); // ͼ<><CDBC>
|
|
|
|
|
|
int WriteGrid(GMGrid * grid); // ֱ<><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteRectangle(GMRectangle * retangle); // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WritePie(GMPie * pie); // <20><>/<2F><>Բ
|
|
|
|
|
|
int WriteIsoline(GMIsoline * isoline,IPoint * pt); // <20><>ֵ<EFBFBD><D6B5>
|
|
|
|
|
|
int WriteFault(GMFault * fault,IPoint * pt); // <20>ϲ<EFBFBD>
|
|
|
|
|
|
int WriteSeisLine(GMSeisLine * seisline,DPoint * dPoints); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteSeisSection(GMSeisSection * section); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteSeisArea(GMSeisArea * seisarea,IPoint * pt); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteLithology(GMLithSection * lithology); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteLog(GMLog * log); // <20>⾮<EFBFBD><E2BEAE><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteWellText(GMWellText * welltext); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteWellLog(GMWellLog * welllog); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteWellMarker(GMWellMarker * wellmarker); // <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>
|
|
|
|
|
|
int WriteCompound(GMBase * base); // ͼԪ<CDBC><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
|
|
|
|
|
|
int WriteCustom(GMCustom * custom); // <20>Զ<EFBFBD><D4B6><EFBFBD>ͼԪ
|
|
|
|
|
|
int WriterGraphy(GMGraphy * graphy); // ͳ<><CDB3>ͼ
|
|
|
|
|
|
int WriteTriagonal(GMTriangle * triangle); // <20><><EFBFBD><EFBFBD>ͼ
|
|
|
|
|
|
int WriteBmp(GMBmp * bmp); // λͼ
|
|
|
|
|
|
int WriteMetafile(GMMetafile * metafile); // WMF/EMFԪ<46>ļ<EFBFBD>
|
|
|
|
|
|
int WriteOiWaterCol(GMOilWaterCol * oilwatercol); // <20><>ˮ<EFBFBD><CBAE><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteDataCross(GMDataCross * datacross); // <20><><EFBFBD><EFBFBD>ʮ<EFBFBD><CAAE>
|
|
|
|
|
|
int WriteString(GMText * text); // <20>ı<EFBFBD>
|
|
|
|
|
|
int WriteIRect(IRect rect); // <20><><EFBFBD>ο<EFBFBD>
|
|
|
|
|
|
int WriteRichTextLine(GMRichTextLine textline); // <20><><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
|
|
|
|
|
//<2F><>д<EFBFBD><D0B4><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA>
|
|
|
|
|
|
int WriteSymbolLib(GMSymbolLib * symbolLib); // <20><><EFBFBD>ſ<EFBFBD>
|
|
|
|
|
|
int WriteShapeSymbol(GMShapeSymbol * symbol); // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteSymbolElement(GMShapeSymElement *elems, int nElem); // <20><><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA>
|
|
|
|
|
|
|
|
|
|
|
|
int WriteShapeSymText(GMShapeSymText * shapeSymText);
|
|
|
|
|
|
int WriteShapeSymPoly(GMShapeSymPoly * symSoly);
|
|
|
|
|
|
int WriteShapeSymArc(GMShapeSymArc * symArc);
|
|
|
|
|
|
int WriteShapeSymRext(GMShapeSymRect * symRect);
|
|
|
|
|
|
int WriteShapeSymGroup(GMShapeSymGroup * shapeSymGroup);
|
|
|
|
|
|
int WriteShapeSymElement(GMShapeSymElement * symElement);
|
|
|
|
|
|
|
|
|
|
|
|
int WriteIntElem(int elem,int i); // дINT
|
|
|
|
|
|
int WriteDoubleElem(double elem,int i); // дDOUBLE
|
|
|
|
|
|
int WriteChar(char * buf,int i); // дCHAR
|
|
|
|
|
|
int WriteIPoint(IPoint * pt,int i); // д<><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int WriteWord(WORD s,int i); // дWORD
|
|
|
|
|
|
|
|
|
|
|
|
//int AddFileHead(GMFileHead * head); // <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>ͷ
|
|
|
|
|
|
int AddPolygonElement(GMPolygon * polygon,IPoint *praPt); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddPolyLineElement(GMPolyline * polyline,IPoint *praPt); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddLegendElement(GMLegend * legend); // <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
|
|
|
|
|
int AddScaleElement(GMScale * scale); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddAxisElement(GMAxis * axis); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddCompassElement(GMCompass * compass); // <20><><EFBFBD>䷽<EFBFBD><E4B7BD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddWellElement(GMWell * well); // <20><><EFBFBD>侮λ
|
|
|
|
|
|
int AddResideElement(GMReside * reside); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddFrameElement(GMMapFrame * frame); // <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
|
|
|
|
|
int AddGridElement(GMGrid * grid); // <20><><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddRectangleElement(GMRectangle * retangle); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddPieElement(GMPie * pie); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><>Բ
|
|
|
|
|
|
int AddIsolineElement(GMIsoline * isoline,IPoint * pt); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5>
|
|
|
|
|
|
int AddFaultElement(GMFault * fault,IPoint * pt); // <20><><EFBFBD><EFBFBD><EFBFBD>ϲ<EFBFBD>
|
|
|
|
|
|
int AddSeisLineElement(GMSeisLine * seisline,DPoint * dPoints); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddSeisSectionElement(GMSeisSection * section); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddSeisAreaElement(GMSeisArea * seisarea,IPoint * pt); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddLithSectionElement(GMLithSection * lithology); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddWellLogElement(GMWellLog * welllog,DPoint * dPoint); // <20><><EFBFBD>侮<EFBFBD><E4BEAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddLogElement(GMLog * log); // <20><><EFBFBD><EFBFBD><EFBFBD>⾮<EFBFBD><E2BEAE><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddWellTextElement(GMWellText * welltext); // <20><><EFBFBD>侮<EFBFBD><E4BEAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddWellMarkerElement(GMWellMarker * wellmarker); // <20><><EFBFBD>侮<EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>
|
|
|
|
|
|
//int AddBaseElement(GMBase * base); // <20><><EFBFBD><EFBFBD>ͼԪ<CDBC><D4AA><EFBFBD><EFBFBD><EFBFBD>ṹ
|
|
|
|
|
|
int AddCustomElement(GMCustom * custom); // <20><><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
|
int AddGraphyElement(GMGraphy * graphy); // <20><><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>ͼ
|
|
|
|
|
|
int AddTriangleElement(GMTriangle * triangle); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddOilWaterElement(GMOilWaterCol * oilwatercol); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddDataCrossElement(GMDataCross * datacross); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʮ<EFBFBD><CAAE>
|
|
|
|
|
|
//int AddIRectElement(IRect * rect); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ο<EFBFBD>
|
|
|
|
|
|
int AddRichTextElement(GMRichText * richtext); // <20><><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD>
|
|
|
|
|
|
int AddStringElement(GMText * text); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddSymbolElement(GMSymbol * symbol); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int AddBmpElement(GMBmp * bmp); // <20><><EFBFBD><EFBFBD>BMP
|
|
|
|
|
|
int AddMetafileElement(GMMetafile * metafile); // <20><><EFBFBD><EFBFBD>Ԫ<EFBFBD>ļ<EFBFBD>
|
|
|
|
|
|
};
|
|
|
|
|
|
// ͼԪ<CDBC><D4AA><EFBFBD><EFBFBD> + ͼԪ<CDBC><D4AA><EFBFBD><EFBFBD> + <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
class GdbEleCollection
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
int type = 0; // ͼԪ<CDBC><D4AA><EFBFBD><EFBFBD>
|
|
|
|
|
|
int length = 0; // ͼԪ<CDBC><D4AA><EFBFBD><EFBFBD>
|
|
|
|
|
|
void * pEleBody = nullptr; // ͼԪ<CDBC><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
IPoint * pt = nullptr; // ͼԪ<CDBC><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
DPoint * dt = nullptr;
|
|
|
|
|
|
double * labelData = nullptr; // ͼԪ<CDBC><D4AA>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|