[gdal-dev] Resquest for comments (RFC 36)

Frank Warmerdam warmerdam at pobox.com
Tue Oct 4 14:52:36 EDT 2011


On Tue, Oct 4, 2011 at 11:42 AM, Even Rouault
<even.rouault at mines-paris.org> wrote:
> That's exactly my understanding of what the latest patch
> http://trac.osgeo.org/gdal/attachment/ticket/3043/open_by_drivername_v3.patch
> does.

Even,

Good, but I didn't understand what Ivan was suggesting/proposing.

>> The main advantage of the @ approach is that it is intended to be
>> easier to specify multiple open options.
>
> Even if it is not in the scope of current RFC, do you have an idea of what the
> syntax would be for open options so as we can pick up something that could be
> later extended ?
>
> Something like :
>
> @[driver=drivername,]option1=value1,options2=value2,filename ?

This was my rough intention with, hopefully, well defined quoting or
escaping rules to take into account the case where the regular filename
contains commas.  One of the thing that held me back from pushing
this was coming up with good rules on quoting/escaping.  The use of
quotes in subdataset names in stuff like the HDF driver is a great headache.
In the gdalinfo report on a HDF driver we try to report the subdataset names
with clear quoting, but if folks cut and paste that into a shell the quotes
get eaten by the shell which makes it very hard for users to know what
they need to do unless they are quite shell-savvy.  I'd like to avoid that
if possible.


>> Particularly on the OGR side
>> there has long been a desire to control how some DB opens are done
>> with extra open options but now the only way we can provide these is
>> via config options.
>
> Actually on OGR side, apart from the configuration options, you also have the
> notion of connection strings, like for the PG driver, to provide the driver
> name, database name, host, port, etc etc...

Yes, my intention was to regularize how connection strings are done.
So if applied to the postgres driver we would have stuff like:

  @driver=pg,host=localhost,password=tiger,dbname=ottawa

What I don't like now is that the connection string parsing,
quoting, etc is handled differently in the different DB drivers.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer


More information about the gdal-dev mailing list