Changes between Initial Version and Version 1 of ConfigOptions


Ignore:
Timestamp:
Feb 18, 2010, 11:01:39 AM (14 years ago)
Author:
warmerdam
Comment:

preliminary

Legend:

Unmodified
Added
Removed
Modified
  • ConfigOptions

    v1 v1  
     1= Configuration Options =
     2
     3This page discussed runtime configuration options for GDAL, and is distinct from options to the build-time configure script.  Runtime configuration options apply on all platforms, and are evaluated at runtime.  They can be set programmatically, by commandline switches or in the environment by the user.
     4
     5!ConfigOptions are normally used to alter the default behavior of GDAL and OGR drivers and in some cases the GDAL and OGR core.  They are essentially global variables the user can set. 
     6
     7== Setting !ConfigOptions ==
     8
     9One example of a config option is the GDAL_CACHEMAX option.  It controls the size of the GDAL block cache, in megabytes.  It can be set in the environment on unix (bash/bourne) shell like this:
     10{{{
     11export GDAL_CACHEMAX=64
     12}}}
     13
     14In a DOS/Windows command shell it is done like this:
     15
     16{{{
     17set GDAL_CACHEMAX=64
     18}}}
     19
     20It can also be set on the commandline for most GDAL and OGR utilities with the --config switch, though in a few cases these switches are not evaluated in time to affect behavior.
     21
     22{{{
     23gdal_translate --config GDAL_CACHEMAX 64 in.tif out.tif
     24}}}
     25
     26In C/C++ configuration switches can be set programmaticly like this:
     27
     28{{{
     29#include "cpl_conv.h"
     30...
     31    GDALSetConfigOption( "GDAL_CACHEMAX", "64" );
     32}}}
     33
     34Normally a configuration option applies to all threads active in a program, but they can be limited to only the current thread this way:
     35
     36{{{
     37    GDALSetThreadLocalConfigOption( "GDAL_CACHEMAX", "64" );
     38}}}
     39
     40== What Configuration Options Exist? ==
     41
     42Traditionally there hasn't been a good registry of configuration options, and they are often added adhoc to drivers to provide particular workarounds.  Below are some of the software wide configuration options. In some cases particular format drivers will document their configuration options, if any, in the user documentation - as is done for the [http://www.gdal.org/frmt_jp2kak.html JP2KAK] driver.
     43
     44== Generic Options ==
     45
     46=== CPL_DEBUG ===
     47
     48This may be set to ON, OFF or specific prefixes.  If it is ON, all debug messages are reported to stdout.  If it is OFF or unset no debug messages are reported.  If it is set to a particular value, then only debug messages with that "type" value will be reported.  For instance debug messages from the HFA driver are normally reported with type "HFA" (seen in the message).
     49
     50At the commandline this can also be set with --debug <value> as well as with --config CPL_DEBUG <value>.
     51
     52=== CPL_LOG ===
     53
     54=== CPL_LOG_ERRORS ===
     55
     56=== CPL_TIMESTAMP ===
     57
     58=== CPL_MAX_ERROR_REPORTS ===
     59
     60=== CPL_ACCUM_ERROR_MSG ===
     61
     62=== CPL_TMPDIR ===
     63
     64=== GDAL_DATA ===
     65
     66=== GEOTIFF_CSV ===
     67
     68
     69== GDAL Options ==
     70
     71=== GDAL_CACHEMAX ===
     72
     73This option controls the default GDAL raster block cache size.  If it's value is small (less than 10000 in 1.7 and earlier, 100000 in 1.8 and later) it is assumed to be measured in megabytes, otherwise in bytes.   Note that this value is only consulted the first time the cache size is requested overriding the initial default (40MB in GDAL 1.7, but often changing for each release).  To change this value programmatically during operation of the pgoram it is better to use GDALSetCacheMax(int nNewSize) (always in bytes).
     74
     75=== GDAL_SKIP ===
     76
     77=== GDAL_DRIVER_PATH ===
     78
     79=== GDAL_FORCE_CACHING ===
     80
     81=== GDAL_VALIDATE_CREATION_OPTIONS ===
     82
     83=== GDAL_IGNORE_AXIS_ORIENTATION ===
     84
     85=== GMLJP2OVERRIDE ===
     86
     87=== GDAL_PAM_MODE ===
     88
     89=== GDAL_PAM_PROXY_DIR ===
     90
     91=== GDAL_MAX_DATASET_POOL_SIZE ===
     92
     93=== GDAL_SWATH_SIZE ===
     94
     95== OGR Options ==
     96
     97=== PROJSO ===
     98
     99The name of the PROJ.4 DLL or shared library to try and load at runtime.
     100
     101=== CENTER_LONG ===
     102
     103=== CHECK_WITH_INVERT_PROJ ===
     104
     105=== THRESHOLD ===
     106
     107=== OGR_DEBUG_ORGANIZE_POLYGONS ===
     108
     109=== OGR_ARC_STEPSIZE ===
     110
     111=== OGR_FORCE_ASCII ===
     112
     113