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

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

?? mitab_tabview.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 5 頁
字號:

    
    /*-----------------------------------------------------------------
     * __TODO__ OK, MapInfo does not like to see a .map and .id file
     * attached to the second table, even if they're empty.
     * We'll use a little hack to delete them now, but eventually we
     * should avoid creating them at all.
     *----------------------------------------------------------------*/
    if (m_eAccessMode == TABWrite && m_pszFname)
    {
        m_pszFname[strlen(m_pszFname)-4] = '\0';
        char *pszFile = CPLStrdup(CPLSPrintf("%s2.map", m_pszFname));
        TABAdjustFilenameExtension(pszFile);
        VSIUnlink(pszFile);

        sprintf(pszFile, "%s2.id", m_pszFname);
        TABAdjustFilenameExtension(pszFile);
        VSIUnlink(pszFile);

        CPLFree(pszFile);
    }
    // End of hack!


    CPLFree(m_pszFname);
    m_pszFname = NULL;

    CSLDestroy(m_papszTABFile);
    m_papszTABFile = NULL;

    CPLFree(m_pszVersion);
    m_pszVersion = NULL;
    CPLFree(m_pszCharset);
    m_pszCharset = NULL;

    CSLDestroy(m_papszTABFnames);
    m_papszTABFnames = NULL;

    CSLDestroy(m_papszFieldNames);
    m_papszFieldNames = NULL;
    CSLDestroy(m_papszWhereClause);
    m_papszWhereClause = NULL;

    m_nMainTableIndex = -1;

    if (m_poRelation)
        delete m_poRelation;
    m_poRelation = NULL;

    m_bRelFieldsCreated = FALSE;

    return 0;
}

/**********************************************************************
 *                   TABView::SetQuickSpatialIndexMode()
 *
 * Select "quick spatial index mode". 
 *
 * The default behavior of MITAB is to generate an optimized spatial index,
 * but this results in slower write speed. 
 *
 * Applications that want faster write speed and do not care
 * about the performance of spatial queries on the resulting file can
 * use SetQuickSpatialIndexMode() to require the creation of a non-optimal
 * spatial index (actually emulating the type of spatial index produced
 * by MITAB before version 1.6.0). In this mode writing files can be 
 * about 5 times faster, but spatial queries can be up to 30 times slower.
 *
 * Returns 0 on success, -1 on error.
 **********************************************************************/
int TABView::SetQuickSpatialIndexMode(GBool bQuickSpatialIndexMode/*=TRUE*/)
{
    if (m_eAccessMode != TABWrite || m_numTABFiles == 0)
    {
        CPLError(CE_Failure, CPLE_AssertionFailed,
                 "SetQuickSpatialIndexMode() failed: file not opened for write access.");
        return -1;
    }

    for (int iFile=0; iFile < m_numTABFiles; iFile++)
    {
        if ( m_papoTABFiles[iFile]->SetQuickSpatialIndexMode(bQuickSpatialIndexMode) != 0)
        {
            // An error has already been reported, just return.
            return -1;
        }
    }

    return 0;
}


/**********************************************************************
 *                   TABView::GetNextFeatureId()
 *
 * Returns feature id that follows nPrevId, or -1 if it is the
 * last feature id.  Pass nPrevId=-1 to fetch the first valid feature id.
 **********************************************************************/
int TABView::GetNextFeatureId(int nPrevId)
{
    if (m_nMainTableIndex != -1)
        return m_papoTABFiles[m_nMainTableIndex]->GetNextFeatureId(nPrevId);

    return -1;
}

/**********************************************************************
 *                   TABView::GetFeatureRef()
 *
 * Fill and return a TABFeature object for the specified feature id.
 *
 * The retruned pointer is a reference to an object owned and maintained
 * by this TABView object.  It should not be altered or freed by the 
 * caller and its contents is guaranteed to be valid only until the next
 * call to GetFeatureRef() or Close().
 *
 * Returns NULL if the specified feature id does not exist of if an
 * error happened.  In any case, CPLError() will have been called to
 * report the reason of the failure.
 **********************************************************************/
TABFeature *TABView::GetFeatureRef(int nFeatureId)
{
    
    /*-----------------------------------------------------------------
     * Make sure file is opened 
     *----------------------------------------------------------------*/
    if (m_poRelation == NULL)
    {
        CPLError(CE_Failure, CPLE_IllegalArg,
                 "GetFeatureRef() failed: file is not opened!");
        return NULL;
    }

    if(m_poCurFeature)
    {
        delete m_poCurFeature;
        m_poCurFeature = NULL;
    }

    m_poCurFeature = m_poRelation->GetFeature(nFeatureId);
    m_nCurFeatureId = nFeatureId;
    m_poCurFeature->SetFID(m_nCurFeatureId);
    return m_poCurFeature;
}


/**********************************************************************
 *                   TABView::SetFeature()
 *
 * Write a feature to this dataset.  
 *
 * For now only sequential writes are supported (i.e. with nFeatureId=-1)
 * but eventually we should be able to do random access by specifying
 * a value through nFeatureId.
 *
 * Returns the new featureId (> 0) on success, or -1 if an
 * error happened in which case, CPLError() will have been called to
 * report the reason of the failure.
 **********************************************************************/
int TABView::SetFeature(TABFeature *poFeature, int nFeatureId /*=-1*/)
{
    if (m_eAccessMode != TABWrite)
    {
        CPLError(CE_Failure, CPLE_NotSupported,
                 "SetFeature() can be used only with Write access.");
        return -1;
    }

    if (nFeatureId != -1)
    {
        CPLError(CE_Failure, CPLE_NotSupported,
                 "SetFeature(): random access not implemented yet.");
        return -1;
    }

    if (m_poRelation == NULL)
    {
        CPLError(CE_Failure, CPLE_IllegalArg,
                 "SetFeature() failed: file is not opened!");
        return -1;
    }

    /*-----------------------------------------------------------------
     * If we're about to write the first feature, then we must finish
     * the initialization of the view first by creating the MI_refnum fields
     *----------------------------------------------------------------*/
    if (!m_bRelFieldsCreated)
    {
        if (m_poRelation->CreateRelFields() != 0)
            return -1;
        m_bRelFieldsCreated = TRUE;
    }

    return m_poRelation->SetFeature(poFeature, nFeatureId);
}



/**********************************************************************
 *                   TABView::GetLayerDefn()
 *
 * Returns a reference to the OGRFeatureDefn that will be used to create
 * features in this dataset.
 *
 * Returns a reference to an object that is maintained by this TABView
 * object (and thus should not be modified or freed by the caller) or
 * NULL if the OGRFeatureDefn has not been initialized yet (i.e. no file
 * opened yet)
 **********************************************************************/
OGRFeatureDefn *TABView::GetLayerDefn()
{
    if (m_poRelation)
        return m_poRelation->GetFeatureDefn();

    return NULL;
}

/**********************************************************************
 *                   TABView::SetFeatureDefn()
 *
 * Set the FeatureDefn for this dataset.
 *
 * For now, fields passed through SetFeatureDefn will not be mapped
 * properly, so this function can be used only with an empty feature defn.
 **********************************************************************/
int TABView::SetFeatureDefn(OGRFeatureDefn *poFeatureDefn,
                         TABFieldType *paeMapInfoNativeFieldTypes /* =NULL */)
{
    if (m_poRelation)
        return m_poRelation->SetFeatureDefn(poFeatureDefn);

    return -1;
}


/**********************************************************************
 *                   TABView::GetNativeFieldType()
 *
 * Returns the native MapInfo field type for the specified field.
 *
 * Returns TABFUnknown if file is not opened, or if specified field index is
 * invalid.
 *
 * Note that field ids are positive and start at 0.
 **********************************************************************/
TABFieldType TABView::GetNativeFieldType(int nFieldId)
{
    if (m_poRelation)
        return m_poRelation->GetNativeFieldType(nFieldId);

    return TABFUnknown;
}


/**********************************************************************
 *                   TABView::AddFieldNative()
 *
 * Create a new field using a native mapinfo data type... this is an 
 * alternative to defining fields through the OGR interface.
 * This function should be called after creating a new dataset, but before 
 * writing the first feature.
 *
 * This function will build/update the OGRFeatureDefn that will have to be
 * used when writing features to this dataset.
 *
 * A reference to the OGRFeatureDefn can be obtained using GetLayerDefn().
 *
 * Returns 0 on success, -1 on error.
 **********************************************************************/
int TABView::AddFieldNative(const char *pszName, TABFieldType eMapInfoType,
                            int nWidth /*=0*/, int nPrecision /*=0*/,
                            GBool bIndexed /*=FALSE*/, GBool bUnique/*=FALSE*/)
{
    if (m_poRelation)
        return m_poRelation->AddFieldNative(pszName, eMapInfoType,
                                            nWidth, nPrecision,
                                            bIndexed, bUnique);

    return -1;
}

/**********************************************************************
 *                   TABView::SetFieldIndexed()
 *
 * Request that a field be indexed.  This will create the .IND file if
 * necessary, etc.
 *
 * Note that field ids are positive and start at 0.
 *
 * Returns 0 on success, -1 on error.
 **********************************************************************/
int TABView::SetFieldIndexed(int nFieldId)
{
    if (m_poRelation)
        return m_poRelation->SetFieldIndexed(nFieldId);

    return -1;
}

/**********************************************************************
 *                   TABView::IsFieldIndexed()
 *
 * Returns TRUE if field is indexed, or FALSE otherwise.
 **********************************************************************/
GBool TABView::IsFieldIndexed(int nFieldId)
{
    if (m_poRelation)
        return m_poRelation->IsFieldIndexed(nFieldId);

    return FALSE;
}

/**********************************************************************
 *                   TABView::IsFieldUnique()
 *
 * Returns TRUE if field is in the Unique table, or FALSE otherwise.
 **********************************************************************/
GBool TABView::IsFieldUnique(int nFieldId)
{
    if (m_poRelation)
        return m_poRelation->IsFieldUnique(nFieldId);

    return FALSE;
}


/**********************************************************************
 *                   TABView::GetBounds()
 *
 * Fetch projection coordinates bounds of a dataset.
 *
 * The bForce flag has no effect on TAB files since the bounds are
 * always in the header.
 *
 * Returns 0 on success, -1 on error.
 **********************************************************************/
int TABView::GetBounds(double &dXMin, double &dYMin, 
                       double &dXMax, double &dYMax,
                       GBool bForce /*= TRUE*/)
{
    if (m_nMainTableIndex == -1)
    {
        CPLError(CE_Failure, CPLE_AppDefined,
             "GetBounds() can be called only after dataset has been opened.");
        return -1;
    }

    return m_papoTABFiles[m_nMainTableIndex]->GetBounds(dXMin, dYMin,
                                                        dXMax, dYMax,
                                                        bForce);
}

/**********************************************************************
 *                   TABView::GetExtent()
 *
 * Fetch extent of the data currently stored in the dataset.
 *
 * The bForce flag has no effect on TAB files since that value is
 * always in the header.
 *
 * Returns OGRERR_NONE/OGRRERR_FAILURE.
 **********************************************************************/
OGRErr TABView::GetExtent (OGREnvelope *psExtent, int bForce)
{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产无人区一区二区三区| 91精品婷婷国产综合久久| 在线观看亚洲精品| 欧美mv日韩mv国产网站| 亚洲色图一区二区三区| 九九九久久久精品| 91久久精品一区二区三区| 久久婷婷久久一区二区三区| 亚洲国产成人91porn| 国产剧情一区二区三区| 欧美挠脚心视频网站| 日韩毛片一二三区| 国产精品一级二级三级| 在线91免费看| 香蕉成人伊视频在线观看| av中文字幕在线不卡| 久久综合九色欧美综合狠狠 | 97超碰欧美中文字幕| 精品少妇一区二区三区在线视频| 一区二区三区国产豹纹内裤在线| 国产v日产∨综合v精品视频| 欧美精品在欧美一区二区少妇| 亚洲欧美成人一区二区三区| a在线播放不卡| 亚洲国产成人在线| 国产成人精品一区二| 久久久久久久久久久99999| 免费精品视频最新在线| 欧美一卡二卡在线| 日本vs亚洲vs韩国一区三区二区| 欧美日韩亚洲综合一区二区三区 | 99精品久久只有精品| 国产精品久久99| 风间由美性色一区二区三区| 国产午夜一区二区三区| 国产一区二区视频在线| 精品国内片67194| 麻豆国产欧美日韩综合精品二区 | 日韩欧美亚洲国产另类| 日韩精品三区四区| 国产精品久久久久久福利一牛影视 | 日本欧美加勒比视频| 4438x成人网最大色成网站| 亚洲国产wwwccc36天堂| 91精品国产色综合久久| 免费日本视频一区| 久久亚洲免费视频| 成人免费视频视频在线观看免费| 国产精品灌醉下药二区| 91丝袜高跟美女视频| 亚洲一线二线三线视频| 欧美一级在线观看| 国产一区久久久| 国产精品视频你懂的| 成人app在线观看| 亚洲国产视频在线| 欧美电影免费观看高清完整版在线观看| 激情五月婷婷综合| 国产精品国产三级国产专播品爱网| 91麻豆免费观看| 全国精品久久少妇| 国产精品沙发午睡系列990531| 色噜噜狠狠色综合中国| 首页国产丝袜综合| 国产精品嫩草影院com| 欧美亚洲免费在线一区| 激情图区综合网| 亚洲天堂久久久久久久| 91精品国模一区二区三区| 国产成人免费9x9x人网站视频| 亚洲精品免费视频| 欧美大肚乱孕交hd孕妇| 91色|porny| 久久 天天综合| 夜夜嗨av一区二区三区网页 | 欧美日韩国产不卡| 国产乱码精品一区二区三区五月婷| 国产在线视频一区二区| 亚洲欧洲日韩在线| 日韩欧美激情一区| 色婷婷综合五月| 国模冰冰炮一区二区| 一区二区三区成人| 欧美国产乱子伦 | 国产亚洲欧美一级| 欧美日韩另类一区| aaa国产一区| 国产中文一区二区三区| 亚洲成人av在线电影| 国产精品久久久久久久久免费丝袜 | 91丨九色porny丨蝌蚪| 日韩在线a电影| 亚洲欧美日韩国产成人精品影院| 精品嫩草影院久久| 欧美性色欧美a在线播放| 在线免费观看日韩欧美| 曰韩精品一区二区| 欧美日韩午夜在线| 99精品欧美一区二区三区小说| 久久国产欧美日韩精品| 亚洲国产精品久久久久婷婷884 | 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲另类春色国产| 国产女人18水真多18精品一级做 | 日本高清不卡视频| 99久久精品国产麻豆演员表| 国产精品18久久久久久久久 | 亚洲成人av资源| 一区二区三区在线视频观看 | 欧美亚洲丝袜传媒另类| 97精品久久久午夜一区二区三区| 成人精品小蝌蚪| 成人午夜视频在线| 国产黄色精品视频| 丁香天五香天堂综合| 国产精品一区二区三区乱码| 韩国在线一区二区| 国产一区二区在线影院| 国产成人无遮挡在线视频| 国产激情一区二区三区四区 | 欧美一二三四区在线| 91精品一区二区三区久久久久久 | 欧美三级蜜桃2在线观看| 99国产精品久久| 91网站最新地址| 91视频观看视频| 在线免费av一区| 欧美三级日韩三级| 91精品国产高清一区二区三区蜜臀| 欧美日韩一二区| 日韩欧美亚洲一区二区| 欧美videofree性高清杂交| 精品区一区二区| 国产亲近乱来精品视频| 国产精品久线在线观看| 亚洲精品午夜久久久| 亚洲国产va精品久久久不卡综合| 日韩二区在线观看| 黑人巨大精品欧美黑白配亚洲| 成人免费毛片a| 日本久久一区二区三区| 欧美肥妇free| 国产欧美一区二区精品久导航| 亚洲视频小说图片| 亚欧色一区w666天堂| 国产一区二区三区在线观看精品| 波多野结衣在线aⅴ中文字幕不卡| 91精品1区2区| 精品播放一区二区| 1区2区3区欧美| 人人狠狠综合久久亚洲| 激情六月婷婷久久| 色综合色综合色综合色综合色综合 | 欧日韩精品视频| 精品久久五月天| 亚洲欧美一区二区三区极速播放| 日韩精品国产精品| 国产成人在线看| 欧美色图免费看| 中文子幕无线码一区tr| 日欧美一区二区| 99久久精品免费看国产| 91精品国产色综合久久不卡电影| 国产精品久久久久久久岛一牛影视| 日韩精品国产精品| 一本一道久久a久久精品 | 亚洲愉拍自拍另类高清精品| 国产在线一区二区| 欧美日韩国产一级片| 国产精品国产三级国产普通话99| 日日夜夜免费精品视频| 色综合天天综合| 久久精品一区二区三区av| 日韩激情一二三区| 91久久精品一区二区三| 中国色在线观看另类| 老司机精品视频线观看86| 在线视频中文字幕一区二区| 亚洲国产成人午夜在线一区| 久久精品国产澳门| 欧美午夜片在线看| 综合久久久久久| 粉嫩aⅴ一区二区三区四区五区| 欧美一级精品大片| 图片区小说区区亚洲影院| 97国产一区二区| 国产精品欧美一区二区三区| 国产一区在线观看麻豆| 日韩欧美另类在线| 麻豆91精品视频| 日韩视频不卡中文| 日韩va欧美va亚洲va久久| 欧美日韩国产大片| 香蕉av福利精品导航| 欧美性猛片xxxx免费看久爱| 亚洲最快最全在线视频| 一道本成人在线| 亚洲一区在线观看视频| 91国偷自产一区二区使用方法| ...中文天堂在线一区|