1.. _rfc-36: 2 3================================================================================ 4RFC 36: Allow specification of intended driver on GDALOpen 5================================================================================ 6 7Authors: Ivan Lucena 8 9Contact: ivan.lucena@pmldnet.com 10 11Status: Proposed 12 13Summary 14------- 15 16This document proposes a mechanism to explicitly tell GDAL what driver 17should open a particular dataset. 18 19Justification 20------------- 21 22By selecting the driver, users can optimize processing time and avoid 23incorrect or undesirable driver selection due to the driver probing 24mechanism. 25 26Concept 27------- 28 29The idea is to pass to GDALOpen a string containing the token "driver=" 30followed by the driver name and a comma separating it from the 31file-name. 32 33[driver=driver-name,]file-name 34 35Examples: 36 37$ gdalinfo driver=nitf:imagefile01.ntf 38 39In that case no probing is necessary, since the user has indicated to 40use the specific driver. If for some reason that process fails the 41function returns NULL and no other attempt is made to open the file by 42another driver. 43 44Implementation 45-------------- 46 47The amount of code is minimal and there is already a proposed patch on 48ticket #3043. 49 50Utilization 51----------- 52 53Any application that uses GDAL API or any GDAL command line tool's user 54that, at one point, wants to force the use of a particular driver to 55open a datasets. 56 57Backward Compatibility Issues 58----------------------------- 59 60That optional entry on GDALOpen process should not affect the current 61logic. 62 63Testing 64------- 65 66- Extra tests would be added to the test script 67 68Issues 69------ 70 71For gdalbuildvrt and gdaltindex it will not be possible to use the 72driver selection with wildcard, as in "driver=gtiff,*.tif". 73