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

📄 tabmapcoordblock.h

📁 linux下一款GIS程序源码
💻 H
字号:
// tabmapcoordblock.h: interface for the TABMAPCoordBlock class.///*--------------------------------------------------------------------- *                      class TABMAPCoordBlock * * Class to handle Read/Write operation on .MAP Coordinate Blocks (Type 03) *--------------------------------------------------------------------*/#ifndef  TABMAPCoordBlock_H#define  TABMAPCoordBlock_H#include "tabrawbinblock.h"#include "tabbinblockmanager.h"class TABMAPCoordBlock: public TABRawBinBlock  {protected:    int         m_numDataBytes; /* Excluding first 8 bytes header */    UGKInt32      m_nNextCoordBlock;    int         m_numBlocksInChain;    UGKInt32      m_nComprOrgX;    UGKInt32      m_nComprOrgY;    // In order to compute block center, we need to keep track of MBR    UGKInt32      m_nMinX;    UGKInt32      m_nMinY;    UGKInt32      m_nMaxX;    UGKInt32      m_nMaxY;    TABBinBlockManager *m_poBlockManagerRef;    int         m_nTotalDataSize;       // Num bytes in whole chain of blocks    int         m_nFeatureDataSize;     // Num bytes for current feature coords    UGKInt32      m_nFeatureXMin;         // Used to keep track of current     UGKInt32      m_nFeatureYMin;         // feature MBR.    UGKInt32      m_nFeatureXMax;    UGKInt32      m_nFeatureYMax;public:	TABMAPCoordBlock(TABAccess eAccessMode = TABRead);	virtual ~TABMAPCoordBlock();    virtual int InitBlockFromData(UGKByte *pabyBuf, int nSize,                               UGKBool bMakeCopy = TRUE,                              FILE *fpSrc = NULL, int nOffset = 0);	virtual int InitNewBlock(FILE *fpSrc, int nBlockSize, int nFileOffset=0);	virtual int CommitToFile();	virtual int GetBlockClass() { return TABMAP_COORD_BLOCK; };    void        SetMAPBlockManagerRef(TABBinBlockManager *poBlockManager);    virtual int ReadBytes(int numBytes, UGKByte *pabyDstBuf);    virtual int WriteBytes(int nBytesToWrite, UGKByte *pBuf);    void        SetComprCoordOrigin(UGKInt32 nX, UGKInt32 nY);    int         ReadIntCoord(UGKBool bCompressed, UGKInt32 &nX, UGKInt32 &nY);    int         ReadIntCoords(UGKBool bCompressed, int numCoords, UGKInt32 *panXY);    int         ReadCoordSecHdrs(UGKBool bCompressed, UGKBool bV450Hdr,                                 int numSections, TABMAPCoordSecHdr *pasHdrs,                                 UGKInt32    &numVerticesTotal);    int         WriteCoordSecHdrs(UGKBool bV450Hdr, int numSections,                                  TABMAPCoordSecHdr *pasHdrs,                                  UGKBool bCompressed);    void        SetNextCoordBlock(UGKInt32 nNextCoordBlockAddress);    int         WriteIntCoord(UGKInt32 nX, UGKInt32 nY, UGKBool bCompressed);    int         GetNumBlocksInChain() { return m_numBlocksInChain; };    void        ResetTotalDataSize() {m_nTotalDataSize = 0;};    int         GetTotalDataSize() {return m_nTotalDataSize;};    void        StartNewFeature();    int         GetFeatureDataSize() {return m_nFeatureDataSize;};  //__TODO__ Can we flush GetFeatureMBR() and all MBR tracking in this class???    void        GetFeatureMBR(UGKInt32 &nXMin, UGKInt32 &nYMin,                               UGKInt32 &nXMax, UGKInt32 &nYMax);    virtual void Dump(FILE *fpOut = NULL);};#endif 

⌨️ 快捷键说明

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