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

📄 mitab.h

📁 支持各种栅格图像和矢量图像读取的库
💻 H
📖 第 1 页 / 共 5 页
字号:
{  public:             TABPoint(OGRFeatureDefn *poDefnIn);    virtual ~TABPoint();    virtual TABFeatureClass GetFeatureClass() { return TABFCPoint; };    virtual int             ValidateMapInfoType(TABMAPFile *poMapFile = NULL);    virtual TABFeature *CloneTABFeature(OGRFeatureDefn *poNewDefn = NULL );    double      GetX();    double      GetY();    virtual int ReadGeometryFromMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int WriteGeometryToMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int ReadGeometryFromMIFFile(MIDDATAFile *fp);    virtual int WriteGeometryToMIFFile(MIDDATAFile *fp);    virtual const char *GetStyleString();    virtual void DumpMIF(FILE *fpOut = NULL);};/*--------------------------------------------------------------------- *                      class TABFontPoint * * Feature class to handle MapInfo Font Point Symbol types: * *     TAB_GEOM_FONTSYMBOL_C    0x28  *     TAB_GEOM_FONTSYMBOL      0x29 * * Feature geometry will be a OGRPoint * * The symbol number refers to a character code in the specified Windows * Font (e.g. "Windings"). *--------------------------------------------------------------------*/class TABFontPoint: public TABPoint,                     public ITABFeatureFont{  protected:    double      m_dAngle;    GInt16      m_nFontStyle;           // Bold/shadow/halo/etc.  public:             TABFontPoint(OGRFeatureDefn *poDefnIn);    virtual ~TABFontPoint();    virtual TABFeatureClass GetFeatureClass() { return TABFCFontPoint; };    virtual TABFeature *CloneTABFeature(OGRFeatureDefn *poNewDefn = NULL );    virtual int ReadGeometryFromMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int WriteGeometryToMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int ReadGeometryFromMIFFile(MIDDATAFile *fp);    virtual int WriteGeometryToMIFFile(MIDDATAFile *fp);    virtual const char *GetStyleString();    GBool       QueryFontStyle(TABFontStyle eStyleToQuery);    void        ToggleFontStyle(TABFontStyle eStyleToToggle, GBool bStatus);    int         GetFontStyleMIFValue();    void        SetFontStyleMIFValue(int nStyle);    int         GetFontStyleTABValue()           {return m_nFontStyle;};    void        SetFontStyleTABValue(int nStyle){m_nFontStyle=(GInt16)nStyle;};    // GetSymbolAngle(): Return angle in degrees counterclockwise    double      GetSymbolAngle()        {return m_dAngle;};    void        SetSymbolAngle(double dAngle);};/*--------------------------------------------------------------------- *                      class TABCustomPoint * * Feature class to handle MapInfo Custom Point Symbol (Bitmap) types: * *     TAB_GEOM_CUSTOMSYMBOL_C  0x2b *     TAB_GEOM_CUSTOMSYMBOL    0x2c * * Feature geometry will be a OGRPoint * * The symbol name is the name of a BMP file stored in the "CustSymb" * directory (e.g. "arrow.BMP").  The symbol number has no meaning for  * this symbol type. *--------------------------------------------------------------------*/class TABCustomPoint: public TABPoint,                       public ITABFeatureFont{  protected:    GByte       m_nCustomStyle;         // Show BG/Apply Color                   public:    GByte       m_nUnknown_;  public:             TABCustomPoint(OGRFeatureDefn *poDefnIn);    virtual ~TABCustomPoint();    virtual TABFeatureClass GetFeatureClass() { return TABFCCustomPoint; };    virtual TABFeature *CloneTABFeature(OGRFeatureDefn *poNewDefn = NULL );    virtual int ReadGeometryFromMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int WriteGeometryToMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int ReadGeometryFromMIFFile(MIDDATAFile *fp);    virtual int WriteGeometryToMIFFile(MIDDATAFile *fp);    virtual const char *GetStyleString();    const char *GetSymbolNameRef()      { return GetFontNameRef(); };    void        SetSymbolName(const char *pszName) {SetFontName(pszName);};        GByte       GetCustomSymbolStyle()              {return m_nCustomStyle;}    void        SetCustomSymbolStyle(GByte nStyle)  {m_nCustomStyle = nStyle;}};/*--------------------------------------------------------------------- *                      class TABPolyline * * Feature class to handle the various MapInfo line types: * *     TAB_GEOM_LINE_C         0x04 *     TAB_GEOM_LINE           0x05 *     TAB_GEOM_PLINE_C        0x07 *     TAB_GEOM_PLINE          0x08 *     TAB_GEOM_MULTIPLINE_C   0x25 *     TAB_GEOM_MULTIPLINE     0x26 *     TAB_GEOM_V450_MULTIPLINE_C 0x31 *     TAB_GEOM_V450_MULTIPLINE   0x32 * * Feature geometry can be either a OGRLineString or a OGRMultiLineString *--------------------------------------------------------------------*/class TABPolyline: public TABFeature,                    public ITABFeaturePen{  private:    GBool       m_bCenterIsSet;    double      m_dCenterX, m_dCenterY;  public:             TABPolyline(OGRFeatureDefn *poDefnIn);    virtual ~TABPolyline();    virtual TABFeatureClass GetFeatureClass() { return TABFCPolyline; };    virtual int             ValidateMapInfoType(TABMAPFile *poMapFile = NULL);    virtual TABFeature *CloneTABFeature(OGRFeatureDefn *poNewDefn = NULL );    /* 2 methods to simplify access to rings in a multiple polyline     */    int                 GetNumParts();    OGRLineString      *GetPartRef(int nPartIndex);    int         ReadGeometryFromMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *,                                        TABMAPCoordBlock **ppoCoordBlock);    virtual int ReadGeometryFromMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int WriteGeometryToMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int ReadGeometryFromMIFFile(MIDDATAFile *fp);    virtual int WriteGeometryToMIFFile(MIDDATAFile *fp);    virtual const char *GetStyleString();    virtual void DumpMIF(FILE *fpOut = NULL);    int         GetCenter(double &dX, double &dY);    void        SetCenter(double dX, double dY);    // MapInfo-specific attributes... made available through public vars    // for now.    GBool       m_bSmooth;};/*--------------------------------------------------------------------- *                      class TABRegion * * Feature class to handle the MapInfo region types: * *     TAB_GEOM_REGION_C         0x0d *     TAB_GEOM_REGION           0x0e *     TAB_GEOM_V450_REGION_C    0x2e *     TAB_GEOM_V450_REGION      0x2f * * Feature geometry will be returned as OGRPolygon (with a single ring) * or OGRMultiPolygon (for multiple rings). * * REGIONs with multiple rings are returned as OGRMultiPolygon instead of * as OGRPolygons since OGRPolygons require that the first ring be the * outer ring, and the other all be inner rings, but this is not guaranteed * inside MapInfo files.  However, when writing features, OGRPolygons with * multiple rings will be accepted without problem. *--------------------------------------------------------------------*/class TABRegion: public TABFeature,                  public ITABFeaturePen,                  public ITABFeatureBrush{    GBool       m_bSmooth;  private:    GBool       m_bCenterIsSet;    double      m_dCenterX, m_dCenterY;    int     ComputeNumRings(TABMAPCoordSecHdr **ppasSecHdrs,                             TABMAPFile *poMAPFile);    int     AppendSecHdrs(OGRPolygon *poPolygon,                          TABMAPCoordSecHdr * &pasSecHdrs,                          TABMAPFile *poMAPFile,                          int &iLastRing);  public:             TABRegion(OGRFeatureDefn *poDefnIn);    virtual ~TABRegion();    virtual TABFeatureClass GetFeatureClass() { return TABFCRegion; };    virtual int             ValidateMapInfoType(TABMAPFile *poMapFile = NULL);    virtual TABFeature *CloneTABFeature(OGRFeatureDefn *poNewDefn = NULL );    /* 2 methods to make the REGION's geometry look like a single collection     * of OGRLinearRings      */    int                 GetNumRings();    OGRLinearRing      *GetRingRef(int nRequestedRingIndex);    GBool               IsInteriorRing(int nRequestedRingIndex);    int         ReadGeometryFromMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *,                                        TABMAPCoordBlock **ppoCoordBlock);    virtual int ReadGeometryFromMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int WriteGeometryToMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int ReadGeometryFromMIFFile(MIDDATAFile *fp);    virtual int WriteGeometryToMIFFile(MIDDATAFile *fp);    virtual const char *GetStyleString();    virtual void DumpMIF(FILE *fpOut = NULL);    int         GetCenter(double &dX, double &dY);    void        SetCenter(double dX, double dY);};/*--------------------------------------------------------------------- *                      class TABRectangle * * Feature class to handle the MapInfo rectangle types: * *     TAB_GEOM_RECT_C         0x13 *     TAB_GEOM_RECT           0x14 *     TAB_GEOM_ROUNDRECT_C    0x16 *     TAB_GEOM_ROUNDRECT      0x17 * * A rectangle is defined by the coords of its 2 opposite corners (the MBR) * Its corners can optionaly be rounded, in which case a X and Y rounding * radius will be defined. * * Feature geometry will be OGRPolygon *--------------------------------------------------------------------*/class TABRectangle: public TABFeature,                     public ITABFeaturePen,                     public ITABFeatureBrush{  public:             TABRectangle(OGRFeatureDefn *poDefnIn);    virtual ~TABRectangle();    virtual TABFeatureClass GetFeatureClass() { return TABFCRectangle; };    virtual int             ValidateMapInfoType(TABMAPFile *poMapFile = NULL);    virtual TABFeature *CloneTABFeature(OGRFeatureDefn *poNewDefn = NULL );    virtual int ReadGeometryFromMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int WriteGeometryToMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int ReadGeometryFromMIFFile(MIDDATAFile *fp);    virtual int WriteGeometryToMIFFile(MIDDATAFile *fp);    virtual const char *GetStyleString();    virtual void DumpMIF(FILE *fpOut = NULL);    // MapInfo-specific attributes... made available through public vars    // for now.    GBool       m_bRoundCorners;    double      m_dRoundXRadius;    double      m_dRoundYRadius;};/*--------------------------------------------------------------------- *                      class TABEllipse * * Feature class to handle the MapInfo ellipse types: * *     TAB_GEOM_ELLIPSE_C      0x19 *     TAB_GEOM_ELLIPSE        0x1a * * An ellipse is defined by the coords of its 2 opposite corners (the MBR) * * Feature geometry can be either an OGRPoint defining the center of the * ellipse, or an OGRPolygon defining the ellipse itself. * * When an ellipse is read, the returned geometry is a OGRPolygon representing * the ellipse with 2 degrees line segments. * * In the case of the OGRPoint, then the X/Y Radius MUST be set, but.   * However with an OGRPolygon, if the X/Y radius are not set (== 0) then * the MBR of the polygon will be used to define the ellipse parameters  * and the center of the MBR is used as the center of the ellipse...  * (i.e. the polygon vertices themselves will be ignored). *--------------------------------------------------------------------*/class TABEllipse: public TABFeature,                   public ITABFeaturePen,                   public ITABFeatureBrush{  public:             TABEllipse(OGRFeatureDefn *poDefnIn);    virtual ~TABEllipse();    virtual TABFeatureClass GetFeatureClass() { return TABFCEllipse; };    virtual int             ValidateMapInfoType(TABMAPFile *poMapFile = NULL);    virtual TABFeature *CloneTABFeature(OGRFeatureDefn *poNewDefn = NULL );    virtual int ReadGeometryFromMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int WriteGeometryToMAPFile(TABMAPFile *poMapFile, TABMAPObjHdr *);    virtual int ReadGeometryFromMIFFile(MIDDATAFile *fp);    virtual int WriteGeometryToMIFFile(MIDDATAFile *fp);    virtual const char *GetStyleString();    virtual void DumpMIF(FILE *fpOut = NULL);    // MapInfo-specific attributes... made available through public vars    // for now.    double      m_dCenterX;    double      m_dCenterY;    double      m_dXRadius;    double      m_dYRadius;};/*--------------------------------------------------------------------- *                      class TABArc * * Feature class to handle the MapInfo arc types: * *     TAB_GEOM_ARC_C      0x0a *     TAB_GEOM_ARC        0x0b

⌨️ 快捷键说明

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