# Path: wradlib/util.py
# def import_optional(module):
#     """Allowing for lazy loading of optional wradlib modules or dependencies.
# 
#     This function removes the need to satisfy all dependencies of wradlib
#     before being able to work with it.
# 
#     Parameters
#     ----------
#     module : str
#              name of the module
# 
#     Returns
#     -------
#     mod : object
#           if module is present, returns the module object, on ImportError
#           returns an instance of `OptionalModuleStub` which will raise an
#           AttributeError as soon as any attribute is accessed.
# 
#     Examples
#     --------
#     Trying to import a module that exists makes the module available as normal.
#     You can even use an alias. You cannot use the '*' notation, or import only
#     select functions, but you can simulate most of the standard import syntax
#     behavior.
#     >>> m = import_optional('math')
#     >>> m.log10(100)
#     2.0
# 
#     Trying to import a module that does not exists, does not produce
#     any errors. Only when some function is used, the code triggers an error
#     >>> m = import_optional('nonexistentmodule')  # noqa
#     >>> m.log10(100)  #doctest: +ELLIPSIS
#     Traceback (most recent call last):
#     ...
#     AttributeError: Module 'nonexistentmodule' is not installed.
#     <BLANKLINE>
#     You tried to access function/module/attribute 'log10'
#     from module 'nonexistentmodule'.
#     This module is optional right now in wradlib.
#     You need to separately install this dependency.
#     Please refer to https://docs.wradlib.org/en/stable/installation.html#optional-dependencies
#     for further instructions.
#     """
#     try:
#         mod = importlib.import_module(module)
#     except ImportError:
#         mod = OptionalModuleStub(module)
# 
#     return mod


import numpy as np
from packaging.version import Version
from wradlib.util import import_optional
# Copyright (c) 2011-2020, wradlib developers.
# Distributed under the MIT License. See LICENSE.txt for more info.

"""
Projection Functions
^^^^^^^^^^^^^^^^^^^^

.. autosummary::
   :nosignatures:
   :toctree: generated/

   {}
"""
__all__ = [
    "reproject",
    "create_osr",
    "proj4_to_osr",
    "epsg_to_osr",
    "wkt_to_osr",
    "get_default_projection",
    "get_earth_radius",
    "get_radar_projection",
    "get_earth_projection",
    "get_extent",
]
__doc__ = __doc__.format("\n   ".join(__all__))



gdal = import_optional("osgeo.gdal")

# Path: wradlib/util.py
# def import_optional(module):
#     """Allowing for lazy loading of optional wradlib modules or dependencies.
# 
#     This function removes the need to satisfy all dependencies of wradlib
#     before being able to work with it.
# 
#     Parameters
#     ----------
#     module : str
#              name of the module
# 
#     Returns
#     -------
#     mod : object
#           if module is present, returns the module object, on ImportError
#           returns an instance of `OptionalModuleStub` which will raise an
#           AttributeError as soon as any attribute is accessed.
# 
#     Examples
#     --------
#     Trying to import a module that exists makes the module available as normal.
#     You can even use an alias. You cannot use the '*' notation, or import only
#     select functions, but you can simulate most of the standard import syntax
#     behavior.
#     >>> m = import_optional('math')
#     >>> m.log10(100)
#     2.0
# 
#     Trying to import a module that does not exists, does not produce
#     any errors. Only when some function is used, the code triggers an error
#     >>> m = import_optional('nonexistentmodule')  # noqa
#     >>> m.log10(100)  #doctest: +ELLIPSIS
#     Traceback (most recent call last):
#     ...
#     AttributeError: Module 'nonexistentmodule' is not installed.
#     <BLANKLINE>
#     You tried to access function/module/attribute 'log10'
#     from module 'nonexistentmodule'.
#     This module is optional right now in wradlib.
#     You need to separately install this dependency.
#     Please refer to https://docs.wradlib.org/en/stable/installation.html#optional-dependencies
#     for further instructions.
#     """
#     try:
#         mod = importlib.import_module(module)
#     except ImportError:
#         mod = OptionalModuleStub(module)
# 
#     return mod


# Path: wradlib/georef/projection.py
import numpy as np
from packaging.version import Version
from wradlib.util import import_optional

# Copyright (c) 2011-2020, wradlib developers.
# Distributed under the MIT License. See LICENSE.txt for more info.

"""
Projection Functions
^^^^^^^^^^^^^^^^^^^^

.. autosummary::
   :nosignatures:
   :toctree: generated/

   {}
"""
__all__ = [
    "reproject",
    "create_osr",
    "proj4_to_osr",
    "epsg_to_osr",
    "wkt_to_osr",
    "get_default_projection",
    "get_earth_radius",
    "get_radar_projection",
    "get_earth_projection",
    "get_extent",
]
__doc__ = __doc__.format("\n   ".join(__all__))



gdal = import_optional("osgeo.gdal")

ogr = import_optional("osgeo.ogr")