Ejemplo n.º 1
0
def window_shape(*args, **kwargs):
    from rasterio.windows import shape
    warnings.warn("Deprecated; Use rasterio.windows instead", FutureWarning)
    return shape(*args, **kwargs)


def window_index(*args, **kwargs):
    from rasterio.windows import window_index
    warnings.warn("Deprecated; Use rasterio.windows instead", FutureWarning)
    return window_index(*args, **kwargs)


__all__ = [
    'band', 'open', 'copy', 'pad']
__version__ = "1.0a10"
__gdal_version__ = gdal_version()

# Rasterio attaches NullHandler to the 'rasterio' logger and its
# descendents. See
# https://docs.python.org/2/howto/logging.html#configuring-logging-for-a-library
# Applications must attach their own handlers in order to see messages.
# See rasterio/rio/main.py for an example.
log = logging.getLogger(__name__)
log.addHandler(NullHandler())


def open(fp, mode='r', driver=None, width=None, height=None, count=None,
         crs=None, transform=None, dtype=None, nodata=None, **kwargs):
    """Open a dataset for reading or writing.

    The dataset may be located in a local file, in a resource located
    DatasetReader, get_writer_for_path, get_writer_for_driver, MemoryFile)
from rasterio.profiles import default_gtiff_profile
from rasterio.transform import Affine, guard_transform
from rasterio.path import parse_path

# These modules are imported from the Cython extensions, but are also import
# here to help tools like cx_Freeze find them automatically
import rasterio._err
import rasterio.coords
import rasterio.enums
import rasterio.path


__all__ = ['band', 'open', 'pad', 'Env']
__version__ = "1.0.24"
__gdal_version__ = gdal_version()

# Rasterio attaches NullHandler to the 'rasterio' logger and its
# descendents. See
# https://docs.python.org/2/howto/logging.html#configuring-logging-for-a-library
# Applications must attach their own handlers in order to see messages.
# See rasterio/rio/main.py for an example.
log = logging.getLogger(__name__)
log.addHandler(NullHandler())


@ensure_env_with_credentials
def open(fp, mode='r', driver=None, width=None, height=None, count=None,
         crs=None, transform=None, dtype=None, nodata=None, sharing=True,
         **kwargs):
    """Open a dataset for reading or writing.
Ejemplo n.º 3
0
 def runtime(cls):
     """Return GDALVersion of current GDAL runtime"""
     from rasterio._base import gdal_version  # to avoid circular import
     return cls.parse(gdal_version())
Ejemplo n.º 4
0
 def runtime(cls):
     """Return GDALVersion of current GDAL runtime"""
     from rasterio._base import gdal_version  # to avoid circular import
     return cls.parse(gdal_version())