当前位置: 首页>>代码示例>>C++>>正文


C++ GDALDriver::Delete方法代码示例

本文整理汇总了C++中GDALDriver::Delete方法的典型用法代码示例。如果您正苦于以下问题:C++ GDALDriver::Delete方法的具体用法?C++ GDALDriver::Delete怎么用?C++ GDALDriver::Delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GDALDriver的用法示例。


在下文中一共展示了GDALDriver::Delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CleanOverviews

CPLErr GDALDefaultOverviews::CleanOverviews()

{
    // Anything to do?
    if( poODS == NULL )
        return CE_None;

    // Delete the overview file(s).
    GDALDriver *poOvrDriver = poODS->GetDriver();
    GDALClose( poODS );
    poODS = NULL;

    const CPLErr eErr = poOvrDriver != NULL ?
        poOvrDriver->Delete( osOvrFilename ) : CE_None;

    // Reset the saved overview filename.
    if( !EQUAL(poDS->GetDescription(),":::VIRTUAL:::") )
    {
        const bool bUseRRD = CPLTestBool(CPLGetConfigOption("USE_RRD","NO"));

        if( bUseRRD )
            osOvrFilename = CPLResetExtension( poDS->GetDescription(), "aux" );
        else
            osOvrFilename.Printf( "%s.ovr", poDS->GetDescription() );
    }
    else
    {
        osOvrFilename = "";
    }

    return eErr;
}
开发者ID:ryandavid,项目名称:rotobox,代码行数:32,代码来源:gdaldefaultoverviews.cpp

示例2: FlushCache

BIGGIFDataset::~BIGGIFDataset()

{
    FlushCache();
    if( hGifFile )
        DGifCloseFile( hGifFile );
    if( fp != NULL )
        VSIFCloseL( fp );

    if( poWorkDS != NULL )
    {
        CPLString osTempFilename = poWorkDS->GetDescription();

        GDALClose( (GDALDatasetH) poWorkDS );
        poWorkDS = NULL;

        GDALDriver *poGTiff = (GDALDriver *) GDALGetDriverByName( "GTiff" );
        poGTiff->Delete( osTempFilename );
    }
}
开发者ID:469447793,项目名称:World-Wind-Java,代码行数:20,代码来源:biggifdataset.cpp

示例3: CloseDependentDatasets

int BIGGIFDataset::CloseDependentDatasets()
{
    int bHasDroppedRef = GDALPamDataset::CloseDependentDatasets();

    if( poWorkDS != NULL )
    {
        bHasDroppedRef = TRUE;

        CPLString osTempFilename = poWorkDS->GetDescription();

        GDALClose( (GDALDatasetH) poWorkDS );
        poWorkDS = NULL;

        GDALDriver *poGTiff = (GDALDriver *) GDALGetDriverByName( "GTiff" );
        poGTiff->Delete( osTempFilename );

        poWorkDS = NULL;
    }

    return bHasDroppedRef;
}
开发者ID:afarnham,项目名称:gdal,代码行数:21,代码来源:biggifdataset.cpp

示例4: ogrDeleteDataSource

SEXP ogrDeleteDataSource (SEXP ogrSource, SEXP ogrDriver) {
#ifdef GDALV2
    GDALDriver *poDriver;
#else
    OGRSFDriver *poDriver;
#endif

    installErrorHandler();
#ifdef GDALV2
    poDriver = GetGDALDriverManager()->GetDriverByName(CHAR(STRING_ELT(ogrDriver, 0)));
#else
    poDriver = OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(
                   CHAR(STRING_ELT(ogrDriver, 0)) );
#endif
    uninstallErrorHandlerAndTriggerError();
    if (poDriver == NULL) {
        error("Driver not available");
    }
    installErrorHandler();
#ifdef GDALV2
    poDriver->Delete(CHAR(STRING_ELT(ogrSource, 0)));
#else
    if (poDriver->TestCapability(ODrCDeleteDataSource)) {
        if (poDriver->DeleteDataSource(CHAR(STRING_ELT(ogrSource, 0)))
                != OGRERR_NONE) {
            uninstallErrorHandlerAndTriggerError();
            error("Data source could not be deleted");
        }
    } else {
        uninstallErrorHandlerAndTriggerError();
        error("This driver is not capable of data source deletion");
    }
#endif
    uninstallErrorHandlerAndTriggerError();
    return(R_NilValue);
}
开发者ID:rforge,项目名称:rgdal,代码行数:36,代码来源:ogrsource.cpp


注:本文中的GDALDriver::Delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。