Metadata-Version: 2.4
Name: drb-driver-image
Version: 1.4.0
Summary: DRB Image driver
Author: GAEL Systems
Author-email: drb-python@gael.fr
License: LGPLv3
Project-URL: Documentation, http://drb-python.gitlab.io/impl/image
Project-URL: Source, https://gitlab.com/drb-python/impl/image
Classifier: Programming Language :: Python :: 3.11
Classifier: Environment :: Plugins
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENCE.txt
Requires-Dist: drb<3,>=2.3
Requires-Dist: numpy>=1.21.2
Requires-Dist: rasterio<1.5,>=1.3.5
Requires-Dist: rioxarray>=0.15
Requires-Dist: xarray>=0.19.0
Dynamic: license-file

# ImageNode Implementation
This drb-driver-image module implements images data formats to be accessed with DRB data model. It is able to navigates among the images contents and accessing the image data.

### Supported images formats
The current implementation is based on RasterIO module. It has been tested with Tiff/GeoTIFF, Jp2k and png formats.

There are no limitations to use other formats supported by rasterio, see
https://gdal.org/drivers/raster/index.html for details.

## Image Factory and Image Node
The module implements the basic factory model defined in DRB in its node resolver. Based on the python entry point mechanism, this module can be dynamically imported into applications.

The entry point group reference is `drb.drivers`.<br/>
The implementation name is `image`.<br/>
The factory class is encoded into `drb-drivers-image.base_node`.<br/>

The image factory creates an ImageNode from an existing image data. It uses a base node to access the content data with the streamed base node implementation.

The base node can be a FileNode (See drb-driver-file), HttpNode, ZipNode or any other node able to provide streamed (`BufferedIOBase`, `RawIOBase`, `IO`) image content.

### Native (partial) reads

When the source can be located on GDAL's virtual filesystem, the image is
opened **natively** instead of being copied into an in-memory `MemoryFile`, so
GDAL reads only the headers and tiles a request needs (windowed and overview
reads no longer download the whole image). This happens when:

- the base node is a **local file** (opened by its path), or
- the base node exposes a `gdal-vsi` locator implementation
  (`get_impl(str, 'gdal-vsi')`) — e.g. a zip member as
  `/vsizip{<archive>}/inner` (drb-driver-zip) or an S3 object as
  `/vsis3/bucket/key` (drb-driver-s3), which compose as
  `/vsizip{/vsis3/bucket/key.zip}/inner.jp2`.

Any other source falls back to the in-memory path. For a tiled JP2 in a zip on
S3, a 512×512 window reads in ~1–2 s instead of downloading the full ~50–100 MB
member.
## limitations
The current version does not manage child modification and insertion. ImageNode is currently read only.
## Using this module
To include this module into your project, the `drb-driver-image` module shall be referenced into `requirement.txt` file, or the following pip line can be run:
```commandline
pip install drb-driver-image
```
