Skip to main content

DRB Image driver

Project description

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.
The implementation name is image.
The factory class is encoded into drb-drivers-image.base_node.

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:

pip install drb-driver-image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drb_driver_image-1.4.1.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drb_driver_image-1.4.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file drb_driver_image-1.4.1.tar.gz.

File metadata

  • Download URL: drb_driver_image-1.4.1.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/9.0.0 pkginfo/1.12.1.2 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.68.3 CPython/3.11.15

File hashes

Hashes for drb_driver_image-1.4.1.tar.gz
Algorithm Hash digest
SHA256 01631c3e3881faf3f86e466a718efebd78942c224b98084c9896b77968e4c851
MD5 abe3c693e6b6c700f610384d6f09e07e
BLAKE2b-256 4a4771bfd51d4b658bca830d2e7fa5de600f93b32bf120a3703b1efb8147099d

See more details on using hashes here.

File details

Details for the file drb_driver_image-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: drb_driver_image-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/9.0.0 pkginfo/1.12.1.2 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.68.3 CPython/3.11.15

File hashes

Hashes for drb_driver_image-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e483c745afd79b63380c370526b3ccee536552cf35731165611497ecbc380e2
MD5 003bb7d8b3f36227601eb06cf5626d2e
BLAKE2b-256 3b17860d9527195a7617a376212e8e870e5a7f29b3f140f23b08b3f3b27cf57a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page