[Gdal-dev] RFC 10: OGR Open Parameters

Daniel Morissette dmorissette at mapgears.com
Tue Mar 13 10:03:44 EDT 2007


Andrey Kiselev wrote:
> 
> I have prepared new proposal regarding changes in OGR Open() functions.
> Please, add your comments and criticism:
> 
>  http://www.gdal.org/rfc10_ogropen.html
> 

Do we have an idea of how many third party OGR drivers exist that would 
be impacted by that change? (i.e. not counting the drivers that are in 
the GDAL SVN repository).

Actually, could we not avoid any backwards compatibility issue by 
playing with the fact that the three Open() methods are virtual?

The base classes could define a default implementation for the new 
method that just maps the call to the old method without the 
papszOptions, e.g.

OGRDataSource *
OGRSFDriverRegistrar::Open( const char * pszName, int bUpdate,
                             OGRSFDriver ** ppoDriver,
			    char **papszOptions /*= NULL*/ )
{
     /* Map this call to the old/deprecated GDAL 1.4.0 Open() method
      * for drivers that do not implement the new Open() method added
      * in GDAL 1.5.0+
      */
     return Open( pszName, bUpdate, ppoDriver );
}


If I'm not mistaken, this way old drivers would continue to work even if 
they do not define the new Open() method... and upgraded drivers that 
override the new Open() method could take advantage of the new 
papszOptions feature.

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/



More information about the Gdal-dev mailing list