Exemplo n.º 1
0
def drivers(**kwargs):
    """Returns a gdal environment with registered drivers."""
    if driver_count() == 0:
        log.debug("Creating a chief GDALEnv in drivers()")
        return GDALEnv(True, **kwargs)
    else:
        log.debug("Creating a not-responsible GDALEnv in drivers()")
        return GDALEnv(False, **kwargs)
Exemplo n.º 2
0
def defenv():
    """Create a default environment if necessary."""
    global _env
    if _env:
        log.debug("Environment %r exists", _env)
    else:
        _env = GDALEnv()
        _env.update_config_options(**default_options)
        log.debug("New GDAL environment %r created", _env)
Exemplo n.º 3
0
def defenv():
    """Create a default environment if necessary."""
    global _env
    if _env:
        log.debug("Environment %r exists", _env)
    else:
        _env = GDALEnv()
        log.debug("New GDAL environment %r created", _env)