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

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

?? mitab_feature.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
 *
 * Return the values for the MBR corners for this feature.
 **********************************************************************/
void TABFeature::GetMBR(double &dXMin, double &dYMin, 
                        double &dXMax, double &dYMax)
{
    dXMin = m_dXMin;
    dYMin = m_dYMin;
    dXMax = m_dXMax;
    dYMax = m_dYMax;
}

/**********************************************************************
 *                   TABFeature::SetIntMBR()
 *
 * Set the integer coordinates values of the MBR of this feature.
 **********************************************************************/
void TABFeature::SetIntMBR(GInt32 nXMin, GInt32 nYMin, 
                           GInt32 nXMax, GInt32 nYMax)
{
    m_nXMin = nXMin;
    m_nYMin = nYMin;
    m_nXMax = nXMax;
    m_nYMax = nYMax;
}

/**********************************************************************
 *                   TABFeature::GetIntMBR()
 *
 * Return the integer coordinates values of the MBR of this feature.
 **********************************************************************/
void TABFeature::GetIntMBR(GInt32 &nXMin, GInt32 &nYMin, 
                           GInt32 &nXMax, GInt32 &nYMax)
{
    nXMin = m_nXMin;
    nYMin = m_nYMin;
    nXMax = m_nXMax;
    nYMax = m_nYMax;
}

/**********************************************************************
 *                   TABFeature::ReadRecordFromDATFile()
 *
 * Fill the fields part of the feature from the contents of the 
 * table record pointed to by poDATFile.
 *
 * It is assumed that poDATFile currently points to the beginning of
 * the table record and that this feature's OGRFeatureDefn has been 
 * properly initialized for this table.
 **********************************************************************/
int TABFeature::ReadRecordFromDATFile(TABDATFile *poDATFile)
{
    int         iField, numFields, nValue;
    double      dValue;
    const char *pszValue;

    CPLAssert(poDATFile);

    numFields = poDATFile->GetNumFields();

    for(iField=0; iField<numFields; iField++)
    {
        switch(poDATFile->GetFieldType(iField))
        {
          case TABFChar:
            pszValue = poDATFile->ReadCharField(poDATFile->
                                                GetFieldWidth(iField));
            SetField(iField, pszValue);
            break;
          case TABFDecimal:
            dValue = poDATFile->ReadDecimalField(poDATFile->
                                                 GetFieldWidth(iField));
            SetField(iField, dValue);
            break;
          case TABFInteger:
            nValue = poDATFile->ReadIntegerField(poDATFile->
                                                 GetFieldWidth(iField));
            SetField(iField, nValue);
            break;
          case TABFSmallInt:
            nValue = poDATFile->ReadSmallIntField(poDATFile->
                                                 GetFieldWidth(iField));
            SetField(iField, nValue);
            break;
          case TABFFloat:
            dValue = poDATFile->ReadFloatField(poDATFile->
                                                 GetFieldWidth(iField));
            SetField(iField, dValue);
            break;
          case TABFLogical:
            pszValue = poDATFile->ReadLogicalField(poDATFile->
                                                 GetFieldWidth(iField));
            SetField(iField, pszValue);
            break;
          case TABFDate:
            pszValue = poDATFile->ReadDateField(poDATFile->
                                                 GetFieldWidth(iField));
            SetField(iField, pszValue);
            break;
          case TABFTime:
            pszValue = poDATFile->ReadTimeField(poDATFile->
                                                GetFieldWidth(iField));
            SetField(iField, pszValue);
            break;
          case TABFDateTime:
            pszValue = poDATFile->ReadDateTimeField(poDATFile->
                                                    GetFieldWidth(iField));
            SetField(iField, pszValue);
            break;
          default:
            // Other type???  Impossible!
            CPLError(CE_Failure, CPLE_AssertionFailed,
                     "Unsupported field type!");
        }

    }

    return 0;
}

/**********************************************************************
 *                   TABFeature::WriteRecordToDATFile()
 *
 * Write the attribute part of the feature to the .DAT file.
 *
 * It is assumed that poDATFile currently points to the beginning of
 * the table record and that this feature's OGRFeatureDefn has been 
 * properly initialized for this table.
 *
 * Returns 0 on success, -1 on error.
 **********************************************************************/
int TABFeature::WriteRecordToDATFile(TABDATFile *poDATFile,
                                     TABINDFile *poINDFile, int *panIndexNo)
{
    int         iField, numFields, nStatus=0;

    CPLAssert(poDATFile);
    CPLAssert(panIndexNo || GetDefnRef()->GetFieldCount() == 0);

    numFields = poDATFile->GetNumFields();

    for(iField=0; nStatus == 0 && iField<numFields; iField++)
    {
        // Hack for "extra" introduced field.
        if( iField >= GetDefnRef()->GetFieldCount() )
        {
            CPLAssert( poDATFile->GetFieldType(iField) == TABFInteger 
                       && iField == 0 );
            nStatus = poDATFile->WriteIntegerField( GetFID(), poINDFile, 0 );
            continue;
        }

        switch(poDATFile->GetFieldType(iField))
        {
          case TABFChar:
            nStatus = poDATFile->WriteCharField(GetFieldAsString(iField),
                                      poDATFile->GetFieldWidth(iField),
                                                poINDFile, panIndexNo[iField]);
            break;
          case TABFDecimal:
            nStatus = poDATFile->WriteDecimalField(GetFieldAsDouble(iField),
                                      poDATFile->GetFieldWidth(iField),
                                      poDATFile->GetFieldPrecision(iField),
                                             poINDFile, panIndexNo[iField]);
            break;
          case TABFInteger:
            nStatus = poDATFile->WriteIntegerField(GetFieldAsInteger(iField),
                                                poINDFile, panIndexNo[iField]);
            break;
          case TABFSmallInt:
            nStatus = poDATFile->WriteSmallIntField(GetFieldAsInteger(iField),
                                                poINDFile, panIndexNo[iField]);
            break;
          case TABFFloat:
            nStatus = poDATFile->WriteFloatField(GetFieldAsDouble(iField),
                                                poINDFile, panIndexNo[iField]);
            break;
          case TABFLogical:
            nStatus = poDATFile->WriteLogicalField(GetFieldAsString(iField),
                                                poINDFile, panIndexNo[iField]);
            break;
          case TABFDate:
            nStatus = poDATFile->WriteDateField(GetFieldAsString(iField),
                                                poINDFile, panIndexNo[iField]);
            break;
          case TABFTime:
            nStatus = poDATFile->WriteTimeField(GetFieldAsString(iField),
                                                poINDFile, panIndexNo[iField]);
            break;
          case TABFDateTime:
            nStatus = poDATFile->WriteDateTimeField(GetFieldAsString(iField),
                                                poINDFile, panIndexNo[iField]);
            break;
          default:
            // Other type???  Impossible!
            CPLError(CE_Failure, CPLE_AssertionFailed,
                     "Unsupported field type!");
        }

    }

    if (poDATFile->CommitRecordToFile() != 0)
        return -1;

    return 0;
}

/**********************************************************************
 *                   TABFeature::ReadGeometryFromMAPFile()
 *
 * In derived classes, this method should be reimplemented to
 * 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 before calling ReadGeometryFromMAPFile(), poMAPFile
 * currently points to the beginning of a 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::ReadGeometryFromMAPFile(TABMAPFile * /*poMapFile*/,
                                        TABMAPObjHdr * /*poObjHdr*/,
                                        GBool /*bCoordBlockDataOnly=FALSE*/, 
                                        TABMAPCoordBlock ** /*ppoCoordBlock=NULL*/)
{
    /*-----------------------------------------------------------------
     * Nothing to do... instances of TABFeature objects contain no geometry.
     *----------------------------------------------------------------*/

    return 0;
}


/**********************************************************************
 *                   TABFeature::UpdateMBR()
 *
 * Fetch envelope of poGeom and update MBR.
 * Integer coord MBR is updated only if poMapFile is not NULL.
 *
 * Returns 0 on success, or -1 if there is no geometry in object
 **********************************************************************/
int TABFeature::UpdateMBR(TABMAPFile * poMapFile /*=NULL*/)
{
    OGRGeometry *poGeom;

    poGeom = GetGeometryRef();

    if (poGeom)
    {
        OGREnvelope oEnv;
        poGeom->getEnvelope(&oEnv);

        m_dXMin = oEnv.MinX;
        m_dYMin = oEnv.MinY;
        m_dXMax = oEnv.MaxX;
        m_dYMax = oEnv.MaxY;

        if (poMapFile)
        {
            poMapFile->Coordsys2Int(oEnv.MinX, oEnv.MinY, m_nXMin, m_nYMin);
            poMapFile->Coordsys2Int(oEnv.MaxX, oEnv.MaxY, m_nXMax, m_nYMax);
        }

        return 0;
    }

    return -1;
}

/**********************************************************************
 *                   TABFeature::ValidateCoordType()
 *
 * Checks the feature envelope to establish if the feature should be
 * written using Compressed coordinates or not and adjust m_nMapInfoType
 * accordingly. Calling this method also sets (initializes) m_nXMin, m_nYMin, 
 * m_nXMax, m_nYMax
 *
 * This function should be used only by the ValidateMapInfoType() 
 * implementations.
 *
 * Returns TRUE if coord. should be compressed, FALSE otherwise
 **********************************************************************/
GBool TABFeature::ValidateCoordType(TABMAPFile * poMapFile)
{
    GBool bCompr = FALSE;

    /*-------------------------------------------------------------
     * Decide if coordinates should be compressed or not.
     *------------------------------------------------------------*/
    if (UpdateMBR(poMapFile) == 0)
    {
        /* Test for max range < 65535 here instead of < 65536 to avoid
         * compressed coordinate overflows in some boundary situations
         */
        if ((m_nXMax - m_nXMin) < 65535 && (m_nYMax-m_nYMin) < 65535)
        {
            bCompr = TRUE;
        }
        m_nComprOrgX = (m_nXMin + m_nXMax) / 2;
        m_nComprOrgY = (m_nYMin + m_nYMax) / 2;
    }

    /*-------------------------------------------------------------
     * Adjust native type
     *------------------------------------------------------------*/
    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, ...

    return bCompr;
}

/**********************************************************************
 *                   TABFeature::ForceCoordTypeAndOrigin()
 *
 * This function is used by TABCollection::ValidateMapInfoType() to force 
 * the coord type and compressed origin of all members of a collection 
 * to be the same. (A replacement for ValidateCoordType() for this 
 * specific case)
 **********************************************************************/
void TABFeature::ForceCoordTypeAndOrigin(int nMapInfoType, GBool bCompr,
                                         GInt32 nComprOrgX, GInt32 nComprOrgY,
                                         GInt32 nXMin, GInt32 nYMin, 
                                         GInt32 nXMax, GInt32 nYMax)
{
    /*-------------------------------------------------------------
     * Set Compressed Origin and adjust native type

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
777午夜精品免费视频| 欧美疯狂做受xxxx富婆| 欧美巨大另类极品videosbest| 国产色一区二区| 狠狠色丁香久久婷婷综| 制服丝袜激情欧洲亚洲| 婷婷综合在线观看| 欧美日韩在线亚洲一区蜜芽| 国产三级欧美三级| 国产在线视视频有精品| 久久欧美一区二区| 亚洲激情第一区| 99久久久久免费精品国产| 久久精品视频在线看| 国产麻豆精品在线| 日本一区二区免费在线观看视频| 久久av资源站| 久久免费精品国产久精品久久久久| 日韩中文字幕不卡| 欧美tickling挠脚心丨vk| 免费国产亚洲视频| 国产精品美女视频| 91美女片黄在线| 亚洲午夜久久久久久久久电影院 | 成人激情小说乱人伦| 欧美一区二区三区四区高清| 视频一区在线视频| 欧美国产激情一区二区三区蜜月| 欧美中文字幕久久| 国产综合久久久久久久久久久久| 一区二区三区在线影院| 中文一区二区完整视频在线观看| 欧美三级一区二区| 色综合天天做天天爱| 国产99精品国产| 日韩精品一卡二卡三卡四卡无卡| 国产精品国产三级国产有无不卡| 日韩欧美一区在线| 在线成人av网站| 色先锋aa成人| 91日韩一区二区三区| av色综合久久天堂av综合| 国产高清不卡二三区| 精品亚洲国产成人av制服丝袜| 日韩国产精品久久久| 亚洲国产va精品久久久不卡综合| 一区二区三区免费| 亚洲高清免费观看高清完整版在线观看| 中文幕一区二区三区久久蜜桃| 久久女同精品一区二区| 久久免费电影网| 久久中文字幕电影| 国产精品久久毛片a| 中文字幕一区二区在线播放| 中文字幕亚洲一区二区va在线| 国产日韩欧美激情| 一区在线播放视频| 亚洲福利电影网| 九九视频精品免费| 激情六月婷婷综合| kk眼镜猥琐国模调教系列一区二区| 国产伦精品一区二区三区免费迷| 国产盗摄视频一区二区三区| 国产精品18久久久久久vr| 99久久99久久综合| 欧美日韩一级二级三级| 久久久久久久久伊人| 亚洲欧美激情一区二区| 日韩vs国产vs欧美| 99久久精品费精品国产一区二区| 91麻豆精品国产91久久久使用方法| 久久夜色精品一区| 奇米一区二区三区| 99久久国产综合精品色伊| 欧美特级限制片免费在线观看| 久久综合九色综合欧美98| 亚洲专区一二三| 波多野结衣精品在线| 日韩一区二区三区在线视频| 日韩不卡免费视频| 成人黄色小视频| 欧美精品久久99久久在免费线 | 日韩毛片精品高清免费| 亚洲444eee在线观看| 国产一区二区日韩精品| 日韩一本二本av| 亚洲综合免费观看高清完整版在线| 美国欧美日韩国产在线播放| 欧美午夜片在线看| 亚洲国产成人一区二区三区| 久久国产精品72免费观看| 欧美在线色视频| 最新久久zyz资源站| 国产成人精品亚洲午夜麻豆| 欧美精品久久天天躁| 亚洲午夜视频在线| 欧美激情在线看| 亚洲视频一区二区在线| 日本强好片久久久久久aaa| 久久99国产精品久久| 色综合久久中文字幕综合网| 91麻豆精品国产| 蜜桃视频一区二区三区 | 在线不卡的av| 日本视频一区二区三区| 91精品国产综合久久久久久漫画 | 日韩在线a电影| 91麻豆精品国产自产在线观看一区| 亚洲欧美激情插| 欧美亚洲综合另类| 免费久久99精品国产| 久久综合九色综合97婷婷| 国产sm精品调教视频网站| www国产成人| 99re亚洲国产精品| 亚洲精品国产一区二区精华液| 欧美色精品天天在线观看视频| 亚洲欧美偷拍卡通变态| 欧美三级视频在线观看| 青青草国产成人av片免费| 精品国一区二区三区| 国产999精品久久| 一区二区三区中文在线| 精品va天堂亚洲国产| 欧美在线观看视频在线| 精品一区二区三区视频| 国产精品白丝在线| 欧美一区午夜视频在线观看| 国产乱人伦偷精品视频不卡| 亚洲欧美国产毛片在线| 精品国内二区三区| 欧美日韩视频在线观看一区二区三区| 国产尤物一区二区在线| 亚洲观看高清完整版在线观看| 国产性色一区二区| 欧美一区二区二区| 欧洲av在线精品| 97aⅴ精品视频一二三区| 欧美视频在线一区二区三区 | 不卡免费追剧大全电视剧网站| 亚洲高清免费在线| 一区二区三区四区高清精品免费观看| 精品欧美一区二区久久| 99久久精品费精品国产一区二区| 久久91精品久久久久久秒播| 亚洲综合色成人| 一二三四社区欧美黄| 成人免费一区二区三区在线观看| 日本一区二区三区久久久久久久久不 | 青青草精品视频| 日韩avvvv在线播放| 亚洲精品美腿丝袜| 亚洲激情图片一区| 五月婷婷久久丁香| 亚洲123区在线观看| 日韩激情中文字幕| 青椒成人免费视频| 国内国产精品久久| 国产精品一区二区在线播放 | 欧美综合色免费| 在线播放国产精品二区一二区四区| 色菇凉天天综合网| 欧美色成人综合| 日韩精品一区二| 国产色综合一区| 亚洲午夜国产一区99re久久| 久久99久久精品| 在线免费视频一区二区| 日韩你懂的电影在线观看| 国产精品久久久久影院| 亚洲.国产.中文慕字在线| 美日韩黄色大片| 91麻豆高清视频| 久久综合色婷婷| 午夜精品免费在线| av激情综合网| 国产三级精品三级在线专区| 五月激情六月综合| 91蜜桃传媒精品久久久一区二区| 337p日本欧洲亚洲大胆色噜噜| 亚洲久草在线视频| 国产美女精品人人做人人爽 | 26uuu精品一区二区| 亚洲成年人网站在线观看| 成人aaaa免费全部观看| 国产亚洲午夜高清国产拍精品| 欧美aaaaaa午夜精品| av网站免费线看精品| 中文字幕一区二区不卡 | 日韩电影免费在线| 欧美在线你懂得| 一区二区三区成人在线视频| 99视频一区二区| 中文字幕在线观看不卡| 一本色道久久综合狠狠躁的推荐| 欧美精品一区二区三区很污很色的| 亚洲丰满少妇videoshd| 欧美精品18+| 极品少妇xxxx精品少妇| 欧美成人猛片aaaaaaa|