亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mitab_feature.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
     *------------------------------------------------------------*/
    m_nComprOrgX = nComprOrgX;
    m_nComprOrgY = nComprOrgY;

    m_nMapInfoType = nMapInfoType;

    if (bCompr && ((m_nMapInfoType%3) == 2))
        m_nMapInfoType--;  // compr = 1, 4, 7, ...
    else if (!bCompr && ((m_nMapInfoType%3) == 1))
        m_nMapInfoType++;  // non-compr = 2, 5, 8, ...

    m_nXMin = nXMin;
    m_nYMin = nYMin;
    m_nXMax = nXMax;
    m_nYMax = nYMax;
}

/**********************************************************************
 *                   TABFeature::WriteGeometryToMAPFile()
 *
 *
 * In derived classes, this method should be reimplemented to
 * write the geometry and representation (color, etc...) part of the
 * feature to the .MAP object pointed to by poMAPFile.
 *
 * It is assumed that before calling WriteGeometryToMAPFile(), poMAPFile
 * currently points to a valid map object.
 *
 * bCoordBlockDataOnly=TRUE is used when this method is called to copy only
 * the CoordBlock data during splitting of object blocks. In this case we
 * need to process only the information related to the CoordBlock. One 
 * important thing to avoid is reading/writing pen/brush/symbol definitions
 * as that would screw up their ref counters.
 *
 * ppoCoordBlock is used by TABCollection and by index splitting code
 * to provide a CoordBlock to use instead of the one from the poMAPFile and
 * return the current pointer at the end of the call.
 *
 * The current implementation does nothing since instances of TABFeature
 * objects contain no geometry (i.e. TAB_GEOM_NONE).
 * 
 * Returns 0 on success, -1 on error, in which case CPLError() will have
 * been called.
 **********************************************************************/
int TABFeature::WriteGeometryToMAPFile(TABMAPFile * /* poMapFile*/,
                                       TABMAPObjHdr * /*poObjHdr*/,
                                       GBool /*bCoordBlockDataOnly=FALSE*/, 
                                       TABMAPCoordBlock ** /*ppoCoordBlock=NULL*/)
{
    /*-----------------------------------------------------------------
     * Nothing to do... instances of TABFeature objects contain no geometry.
     *----------------------------------------------------------------*/

    return 0;
}

/**********************************************************************
 *                   TABFeature::DumpMID()
 *
 * Dump feature attributes in a format similar to .MID data records.
 **********************************************************************/
void TABFeature::DumpMID(FILE *fpOut /*=NULL*/)
{
    OGRFeatureDefn      *poDefn = GetDefnRef();

    if (fpOut == NULL)
        fpOut = stdout;

    for( int iField = 0; iField < GetFieldCount(); iField++ )
    {
        OGRFieldDefn    *poFDefn = poDefn->GetFieldDefn(iField);
        
        fprintf( fpOut, "  %s (%s) = %s\n",
                 poFDefn->GetNameRef(),
                 OGRFieldDefn::GetFieldTypeName(poFDefn->GetType()),
                 GetFieldAsString( iField ) );
    }

    fflush(fpOut);
}

/**********************************************************************
 *                   TABFeature::DumpMIF()
 *
 * Dump feature geometry in a format similar to .MIF files.
 **********************************************************************/
void TABFeature::DumpMIF(FILE *fpOut /*=NULL*/)
{
    if (fpOut == NULL)
        fpOut = stdout;

    /*-----------------------------------------------------------------
     * Generate output... not much to do, feature contains no geometry.
     *----------------------------------------------------------------*/
    fprintf(fpOut, "NONE\n" );

    fflush(fpOut);
}


/*=====================================================================
 *                      class TABPoint
 *====================================================================*/


/**********************************************************************
 *                   TABPoint::TABPoint()
 *
 * Constructor.
 **********************************************************************/
TABPoint::TABPoint(OGRFeatureDefn *poDefnIn):
              TABFeature(poDefnIn)
{
}

/**********************************************************************
 *                   TABPoint::~TABPoint()
 *
 * Destructor.
 **********************************************************************/
TABPoint::~TABPoint()
{
}

/**********************************************************************
 *                     TABPoint::CloneTABFeature()
 *
 * Duplicate feature, including stuff specific to each TABFeature type.
 *
 * This method calls the generic TABFeature::CloneTABFeature() and 
 * then copies any members specific to its own type.
 **********************************************************************/
TABFeature *TABPoint::CloneTABFeature(OGRFeatureDefn *poNewDefn /*=NULL*/)
{
    /*-----------------------------------------------------------------
     * Alloc new feature and copy the base stuff
     *----------------------------------------------------------------*/
    TABPoint *poNew = new TABPoint(poNewDefn ? poNewDefn : GetDefnRef());

    CopyTABFeatureBase(poNew);

    /*-----------------------------------------------------------------
     * And members specific to this class
     *----------------------------------------------------------------*/
    // ITABFeatureSymbol
    *(poNew->GetSymbolDefRef()) = *GetSymbolDefRef();

    return poNew;
}


/**********************************************************************
 *                   TABPoint::ValidateMapInfoType()
 *
 * Check the feature's geometry part and return the corresponding
 * mapinfo object type code.  The m_nMapInfoType member will also
 * be updated for further calls to GetMapInfoType();
 *
 * Returns TAB_GEOM_NONE if the geometry is not compatible with what
 * is expected for this object class.
 **********************************************************************/
int  TABPoint::ValidateMapInfoType(TABMAPFile *poMapFile /*=NULL*/)
{
    OGRGeometry *poGeom;

    /*-----------------------------------------------------------------
     * Fetch and validate geometry 
     * __TODO__ For now we always write in uncompressed format (until we 
     * find that this is not correct... note that at this point the
     * decision to use compressed/uncompressed will likely be based on
     * the distance between the point and the object block center in
     * integer coordinates being > 32767 or not... remains to be verified)
     *----------------------------------------------------------------*/
    poGeom = GetGeometryRef();
    if (poGeom && wkbFlatten(poGeom->getGeometryType()) == wkbPoint)
    {
        switch(GetFeatureClass())
        {
          case TABFCFontPoint:
            m_nMapInfoType = TAB_GEOM_FONTSYMBOL;
            break;
          case TABFCCustomPoint:
            m_nMapInfoType = TAB_GEOM_CUSTOMSYMBOL;
            break;
          case TABFCPoint:
          default:
            m_nMapInfoType = TAB_GEOM_SYMBOL;
            break;
        }
    }
    else
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
                 "TABPoint: Missing or Invalid Geometry!");
        m_nMapInfoType = TAB_GEOM_NONE;
    }

    UpdateMBR(poMapFile);

    return m_nMapInfoType;
}

/**********************************************************************
 *                   TABPoint::ReadGeometryFromMAPFile()
 *
 * Fill the geometry and representation (color, etc...) part of the
 * feature from the contents of the .MAP object pointed to by poMAPFile.
 *
 * It is assumed that poMAPFile currently points to the beginning of
 * a map object.
 *
 * Returns 0 on success, -1 on error, in which case CPLError() will have
 * been called.
 **********************************************************************/
int TABPoint::ReadGeometryFromMAPFile(TABMAPFile *poMapFile,
                                      TABMAPObjHdr *poObjHdr,
                                      GBool bCoordBlockDataOnly /*=FALSE*/, 
                                      TABMAPCoordBlock ** /*ppoCoordBlock=NULL*/)
{
    double              dX, dY;
    OGRGeometry         *poGeometry;

    /* Nothing to do for bCoordBlockDataOnly (used by index splitting) */
    if (bCoordBlockDataOnly)
        return 0;

    /*-----------------------------------------------------------------
     * Fetch and validate geometry type
     *----------------------------------------------------------------*/
    m_nMapInfoType = poObjHdr->m_nType;

    if (m_nMapInfoType != TAB_GEOM_SYMBOL &&
        m_nMapInfoType != TAB_GEOM_SYMBOL_C )
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
           "ReadGeometryFromMAPFile(): unsupported geometry type %d (0x%2.2x)",
                 m_nMapInfoType, m_nMapInfoType);
        return -1;
    }

    /*-----------------------------------------------------------------
     * Read object information
     *----------------------------------------------------------------*/
    TABMAPObjPoint *poPointHdr = (TABMAPObjPoint *)poObjHdr;

    m_nSymbolDefIndex = poPointHdr->m_nSymbolId;   // Symbol index

    poMapFile->ReadSymbolDef(m_nSymbolDefIndex, &m_sSymbolDef);
    
    /*-----------------------------------------------------------------
     * Create and fill geometry object
     *----------------------------------------------------------------*/
    poMapFile->Int2Coordsys(poPointHdr->m_nX, poPointHdr->m_nY, dX, dY);
    poGeometry = new OGRPoint(dX, dY);
    
    SetGeometryDirectly(poGeometry);

    SetMBR(dX, dY, dX, dY);
    SetIntMBR(poObjHdr->m_nMinX, poObjHdr->m_nMinY, 
              poObjHdr->m_nMaxX, poObjHdr->m_nMaxY);

    return 0;
}

/**********************************************************************
 *                   TABPoint::WriteGeometryToMAPFile()
 *
 * Write the geometry and representation (color, etc...) part of the
 * feature to the .MAP object pointed to by poMAPFile.
 *
 * It is assumed that poMAPFile currently points to a valid map object.
 *
 * Returns 0 on success, -1 on error, in which case CPLError() will have
 * been called.
 **********************************************************************/
int TABPoint::WriteGeometryToMAPFile(TABMAPFile *poMapFile,
                                     TABMAPObjHdr *poObjHdr,
                                     GBool bCoordBlockDataOnly /*=FALSE*/, 
                                     TABMAPCoordBlock ** /*ppoCoordBlock=NULL*/)
{
    GInt32              nX, nY;
    OGRGeometry         *poGeom;
    OGRPoint            *poPoint;

    /* Nothing to do for bCoordBlockDataOnly (used by index splitting) */
    if (bCoordBlockDataOnly)
        return 0;

    /*-----------------------------------------------------------------
     * We assume that ValidateMapInfoType() was called already and that
     * the type in poObjHdr->m_nType is valid.
     *----------------------------------------------------------------*/
    CPLAssert(m_nMapInfoType == poObjHdr->m_nType);

    /*-----------------------------------------------------------------
     * Fetch and validate geometry
     *----------------------------------------------------------------*/
    poGeom = GetGeometryRef();
    if (poGeom && wkbFlatten(poGeom->getGeometryType()) == wkbPoint)
        poPoint = (OGRPoint*)poGeom;
    else
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
                 "TABPoint: Missing or Invalid Geometry!");
        return -1;
    }

    poMapFile->Coordsys2Int(poPoint->getX(), poPoint->getY(), nX, nY);

    /*-----------------------------------------------------------------
     * Copy object information
     *----------------------------------------------------------------*/
    TABMAPObjPoint *poPointHdr = (TABMAPObjPoint *)poObjHdr;

    poPointHdr->m_nX = nX;
    poPointHdr->m_nY = nY;
    poPointHdr->SetMBR(nX, nY, nX, nY);

    m_nSymbolDefIndex = poMapFile->WriteSymbolDef(&m_sSymbolDef);
    poPointHdr->m_nSymbolId = m_nSymbolDefIndex;      // Symbol index

    if (CPLGetLastErrorNo() != 0)
        return -1;

    return 0;
}


/**********************************************************************
 *                   TABPoint::GetX()
 *
 * Return this point's X coordinate.
 **********************************************************************/
double TABPoint::GetX()
{
    OGRGeometry *poGeom;
    OGRPoint    *poPoint=NULL;

    /*-----------------------------------------------------------------
     * Fetch and validate geometry
     *----------------------------------------------------------------*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久先锋影音av鲁色资源| 中文字幕亚洲精品在线观看| 国产色婷婷亚洲99精品小说| 亚洲免费观看高清| 九九精品一区二区| 欧美主播一区二区三区美女| 国产亚洲短视频| 奇米综合一区二区三区精品视频 | 视频一区中文字幕| 成人激情文学综合网| 日韩欧美视频在线| 亚洲综合视频在线观看| 99视频精品在线| 日本一二三不卡| 国产精品亚洲第一 | 欧美日韩一区小说| 亚洲欧美日韩系列| 91在线视频官网| 中文子幕无线码一区tr| 国产一区二区精品久久99| 欧美日韩视频第一区| 亚洲一卡二卡三卡四卡无卡久久 | 欧美在线观看一二区| 国产精品素人视频| 国产精品亚洲а∨天堂免在线| 欧美一级片在线| 日韩电影在线一区二区| 欧美性猛交xxxx黑人交| 一区二区三区中文字幕电影| 成人午夜在线免费| 国产日韩av一区| www.av精品| 欧美国产精品一区二区三区| 国产一区亚洲一区| 久久人人爽人人爽| 国产成人精品综合在线观看| 久久精品夜色噜噜亚洲a∨| 久久国产精品露脸对白| 日韩欧美亚洲另类制服综合在线| 日本不卡一区二区| 欧美成人vr18sexvr| 久久电影网电视剧免费观看| www欧美成人18+| 成人免费看黄yyy456| 亚洲女同ⅹxx女同tv| 欧洲av一区二区嗯嗯嗯啊| 午夜精品一区二区三区三上悠亚| 欧美二区三区91| 国内精品在线播放| 国产精品萝li| 欧美视频第二页| 久久精品国产免费看久久精品| 精品国产免费一区二区三区四区 | 色综合色综合色综合| 亚洲一区二区三区四区不卡 | 91国内精品野花午夜精品| 石原莉奈在线亚洲二区| 亚洲精品一区二区三区在线观看| 大桥未久av一区二区三区中文| 亚洲日本在线视频观看| 欧美精品在线视频| 久久精品国产一区二区三| 中文字幕一区二区三区在线播放| 91久久精品日日躁夜夜躁欧美| 日韩av在线发布| 国产精品你懂的在线| 欧美另类一区二区三区| 国产一区二区精品久久99| 亚洲小说欧美激情另类| 久久久久国产免费免费| 在线观看av一区二区| 国产精品一区免费在线观看| 亚洲一卡二卡三卡四卡五卡| 久久久久久久网| 欧美人伦禁忌dvd放荡欲情| 国产做a爰片久久毛片| 樱花草国产18久久久久| 久久亚洲捆绑美女| 欧美体内she精高潮| 国产成人亚洲综合a∨猫咪| 亚洲国产欧美在线| 欧美极品美女视频| 日韩一级成人av| 欧美综合色免费| 成人毛片在线观看| 精品在线免费观看| 午夜av一区二区| 中文字幕综合网| 国产欧美日产一区| 欧美电影免费观看完整版| 日本韩国一区二区三区| 国产成人在线视频网址| 蜜臀av性久久久久蜜臀aⅴ流畅| 日韩理论片中文av| 国产精品女同一区二区三区| 精品电影一区二区| 日韩欧美一区二区免费| 91传媒视频在线播放| 成人免费视频一区| 国产在线一区观看| 久久精品99久久久| 日韩av一区二| 日韩精品午夜视频| 亚洲成人av在线电影| 夜夜嗨av一区二区三区网页| 最新国产精品久久精品| 国产精品久久久久9999吃药| 久久久综合激的五月天| 久久亚洲捆绑美女| 久久久久久久久久电影| 精品国产百合女同互慰| 久久久久久99久久久精品网站| 欧美成人免费网站| 久久久久亚洲综合| 久久久一区二区三区捆绑**| 久久久久久久久久电影| 国产欧美精品一区二区色综合| 久久久久国产成人精品亚洲午夜| 欧美成人video| 精品99999| 亚洲国产成人一区二区三区| 亚洲国产岛国毛片在线| 国产精品传媒视频| 亚洲精品日日夜夜| 午夜精品久久久久久久蜜桃app| 亚洲第一在线综合网站| 日韩电影免费在线| 国模少妇一区二区三区| 懂色av一区二区三区免费观看| 97成人超碰视| 91黄色在线观看| 欧美日韩高清在线| 欧美xingq一区二区| 久久理论电影网| 欧美国产日产图区| 一区二区高清视频在线观看| 五月天网站亚洲| 久久国产三级精品| 成人国产精品免费观看动漫| 色综合天天综合色综合av | 久久久夜色精品亚洲| 中文字幕一区二区三中文字幕| 亚洲综合自拍偷拍| 麻豆精品视频在线观看| 国产成a人无v码亚洲福利| 日本久久一区二区| 日韩一区二区影院| 一区免费观看视频| 日本91福利区| 99久久免费精品| 日韩欧美一区在线观看| 国产精品久久午夜夜伦鲁鲁| 亚洲图片有声小说| 高清成人在线观看| 欧美高清视频在线高清观看mv色露露十八 | 欧美亚洲动漫精品| 欧美一二三区精品| 综合久久给合久久狠狠狠97色| 日韩精品久久久久久| 粉嫩一区二区三区在线看| 欧美日韩国产欧美日美国产精品| 久久综合久色欧美综合狠狠| 亚洲精品高清在线| 国产自产高清不卡| 欧美日韩激情一区二区三区| 国产精品麻豆久久久| 麻豆成人免费电影| 日本道精品一区二区三区 | 一区二区三区精品视频| 精品在线一区二区三区| 欧美久久久一区| 亚洲欧美另类小说视频| 国产 欧美在线| 精品国产一二三区| 日本怡春院一区二区| 91福利在线导航| **网站欧美大片在线观看| 国产精品一区一区三区| 欧美成va人片在线观看| 日韩电影网1区2区| 欧美日韩精品欧美日韩精品| 亚洲视频 欧洲视频| 成人激情文学综合网| 久久久久久久综合狠狠综合| 麻豆精品一区二区| 欧美精品 国产精品| 午夜成人免费电影| 欧美日本免费一区二区三区| 亚洲欧美日韩成人高清在线一区| 成人v精品蜜桃久久一区| 久久精品一区二区三区不卡牛牛 | 同产精品九九九| 色婷婷综合久久久中文字幕| 亚洲少妇30p| 91在线免费看| 一区二区三区欧美亚洲| 91麻豆蜜桃一区二区三区| 亚洲人成影院在线观看| 91性感美女视频| 一区二区三区欧美日韩|