Inside GDALAllRegister之四: 跳过driver
这个函数很短小:
/**
* \brief This method unload undesirable drivers.
*
* All drivers specified in the space delimited list in the GDAL_SKIP
* environmentvariable) will be deregistered and destroyed. This method
* should normally be called after registration of standard drivers to allow
* the user a way of unloading undesired drivers. The GDALAllRegister()
* function already invokes AutoSkipDrivers() at the end, so if that functions
* is called, it should not be necessary to call this method from application
* code.
*/ void GDALDriverManager::AutoSkipDrivers() {
if( CPLGetConfigOption( "GDAL_SKIP", NULL ) == NULL )
return; char **papszList = CSLTokenizeString( CPLGetConfigOption("GDAL_SKIP","") ); for( int i = 0; i < CSLCount(papszList); i++ )
{
GDALDriver *poDriver = GetDriverByName( papszList[i] ); if( poDriver == NULL )
CPLError( CE_Warning, CPLE_AppDefined,
"Unable to find driver %s to unload from GDAL_SKIP environment variable.",
papszList[i] );
else
{
CPLDebug( "GDAL", "AutoSkipDriver(%s)", papszList[i] );
DeregisterDriver( poDriver );
delete poDriver;
}
} CSLDestroy( papszList );
}
如果在环境变量GDAL_SKIP中指定某些driver,可以在运行时将该driver从GDALDriverManger中注销掉。这提供了一个基于配置的解决方案,比起前面通过编译时添加宏多了一个选择。考虑的还是比较周到的。
Inside GDALAllRegister之四: 跳过driver的更多相关文章
- Inside GDALAllRegister之一: 五大部分
基本信息 在GDAL的Tutorial中开篇即提到GDALAllRegister函数,它会注册所有已知的驱动,包括动态库自动加载的驱动.最关键是这句话: If for some application ...
- Inside GDALAllRegister之二: 自动加载驱动
代码 GetGDALDriverManager()->AutoLoadDrivers(); 包含了两部分: 首先获得GDALDriverManager的singleton对象的指针,这点之 ...
- Inside GDALAllRegister之三: 注册指定驱动
现在来仔细分析如何注册一个驱动的代码,看下面代码: #ifdef FRMT_vrt GDALRegister_VRT(); #endif 编译时指定或者取消FRMT_vrt,可以控制这条语句是否编译到 ...
- oracle的oci和thin区别(数据源)
我是今天看到tomcat数据源的配置时,想起来这个问题,刚开始还不晓得thin是什么东西! database.url=jdbc:oracle:thin:angel/oracle@192.168.55. ...
- Appium + Python 测试 QQ 音乐 APP的一段简单脚本
1. 大致流程 + 程序(Python):打开 QQ 音乐,点击一系列接收按键,进入搜索音乐界面,输入『Paradise』,播放第一首音乐. 2. Python 脚本如下 from appium im ...
- python命名空间、作用域、闭包与传值传引用
(以下内容,均基于python3) 最近在看python函数部分,讲到了python的作用域问题,然后又讲了Python的闭包问题. 在做作业的时候,我遇到了几个问题,下面先来看作业. 一. 作业1: ...
- 驱动程序分层分离概念_总线驱动设备模型_P
分层概念: 驱动程序向上注册的原理: 比如:输入子程序一个input.c作为一层,下层为Dev.c和Dir.c,分别编写Dev.c和Dir.c向上Input.c注册:如图所示 分离概念: 分离概念主要 ...
- Selenium2.0+TestNG+Ant+Jenkins自动化测试浅尝
当前常用自动化测试工具 Web自动化测试工具:QTP .selenium等 性能自动化测试工具:loadrunner.jmeter等 接口自动化测试工具:SoapUI.postman等 手机自动化测试 ...
- selenium请求豆瓣网
#请求豆瓣网 from selenium import webdriverimport timedriver = webdriver.Chrome() driver.get("http:// ...
随机推荐
- ZOJ 3235 Prototype
Prototype Time Limit: 1 Second Memory Limit: 32768 KB Prototype is a 3D game which allow you to ...
- JetBrains 系列软件汉化包
原文地址:https://blog.csdn.net/pingfangx/article/details/78826145 JetBrains 系列软件汉化包 关键字: Android Studio ...
- SILICA Xynergy-M4 Board -- STM32F417 meets XILINX Spartan-6
The SILICA Xynergy-M4 Board combines an ARM Cortex-M4 based STMicroelectronics STM32F417 controller ...
- ASP.NET Web API教程 分页查询
首先增加支持分页的API方法 public IEnumerable<UserInfo> GetUserInfos(int pageindex, int size) { ...
- 解决uploadify在Firefox下丢失session的问题
今天在用uploadify上传插件时遇到了一个问题,由于我后台做了权限管理,每个请求都有去读session判断权限,但用这个插件时发现登录后上传不了,原因是在读session时认为没有权限而被拦截了, ...
- superobject
GITHUB: https://github.com/hgourvest/superobject # SuperObject ## What is JSON ? - JSON (JavaScript ...
- Mac 安装 brew
安装方法:命令行输入 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/ma ...
- CATransform3D的m34值动画
CATransform3D的m34值动画 效果 源码 https://github.com/YouXianMing/Animations // // CATransform3DM34Controlle ...
- 如何停止一个正在运行的java线程
与此问题相关的内容主要涉及三部分:已废弃的Thread.stop().迷惑的thread.interrupt系列.最佳实践Shared Variable. 已废弃的Thread.stop() @Dep ...
- 内存控制篇calloc free getpagesize malloc mmap munmap
calloc(配置内存空间) 相关函数 malloc,free,realloc,brk 表头文件 #include <stdlib.h> 定义函数 void *calloc(size_t ...