Example #1
0
def defenv():
    """Create a default environment if necessary."""
    global _env
    if _env:
        log.debug("GDAL environment exists: %r", _env)
    else:
        log.debug("No GDAL environment exists")
        _env = GDALEnv()
        _env.update_config_options(**default_options)
        log.debug(
            "New GDAL environment %r created", _env)
    _env.start()
Example #2
0
def defenv(**options):
    """Create a default environment if necessary."""
    if local._env:
        log.debug("GDAL environment exists: %r", local._env)
    else:
        log.debug("No GDAL environment exists")
        local._env = GDALEnv()
        local._env.update_config_options(**options)
        log.debug("New GDAL environment %r created", local._env)
    local._env.start()
Example #3
0
def defenv(**options):
    """Create a default environment if necessary."""
    if local._env:
        log.debug("GDAL environment exists: %r", local._env)
    else:
        log.debug("No GDAL environment exists")
        local._env = GDALEnv()
        # first set default options, then add user options
        set_options = {}
        for d in (default_options, options):
            for (k, v) in d.items():
                set_options[k] = v
        local._env.update_config_options(**set_options)
        log.debug("New GDAL environment %r created", local._env)
    local._env.start()
Example #4
0
def defenv():
    """Create a default environment if necessary."""
    global _env
    if _env:
        log.debug("GDAL environment exists: %r", _env)
    else:
        log.debug("No GDAL environment exists")
        _env = GDALEnv()
        _env.update_config_options(**default_options)
        log.debug("New GDAL environment %r created", _env)
    _env.start()