[gdal-dev] CPLFreeConfig() in port/cpl_conv.cpp

Even Rouault even.rouault at mines-paris.org
Wed Dec 19 02:19:34 PST 2012


Selon Roger Bivand <Roger.Bivand at nhh.no>:

> Hi,
>
> I can get and set ConfigOptions using functions in port/cpl_conv.cpp, but I
> have not found a way of unsetting a ConfigOption, only CPLFreeConfig() which
> NULLs them all. I can also not see how to query which keys are set, so that
> I could store their values, and re-instate them after blowing away all
> options. In the long-running setting of rgdal in R, when GDAL/OGR may be
> running for a whole session, it would be useful to have better control of
> the ConfigOptions on the GDAL side. Am I missing something?

Yes, to clear a config option, just CPLSetConfigOption(key, NULL). See
http://www.gdal.org/cpl__conv_8h.html#aa0cd1a68fe4f2fc7874cd2da605c36ce

However, there's no public way of getting which config options are defined
though, partly because config option can be either defined with
CPLSetConfigOption() or just obtained from the environmenet through getenv().

>
> Grateful for pointers,
>
> Roger
>
>
>
> -----
> Roger Bivand
> NHH Norwegian School of Economics, Bergen, Norway
> --
> View this message in context:
>
http://osgeo-org.1560.n6.nabble.com/CPLFreeConfig-in-port-cpl-conv-cpp-tp5023867.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list