本文整理汇总了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;
}
示例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 );
}
}
示例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;
}
示例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);
}