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.0.tar.gz (34.7 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.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: drb_driver_image-1.4.0.tar.gz
  • Upload date:
  • Size: 34.7 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.0.tar.gz
Algorithm Hash digest
SHA256 c9698361aac2b2f906bb557a44403375a0f8e77ae8066520bde4fc33e483a5c0
MD5 1337e6b2d1d6b66fd0dcbb842fa20c54
BLAKE2b-256 f2bfa6a6d0eb032acfe62f770cd785dd0e3de86a7eb070b6786ce9e8aa169c10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drb_driver_image-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fb322d80f0f60c3d7df9ba7c1e7defbf92a61b0a9a1b66a4e7f66e880b428e4
MD5 8e83e103fec9955703ecc6adb05b47c4
BLAKE2b-256 74093712787a6dc8b0b0a4a127c82c2d1025031daa5718ddcb8b4befa70ea2c4

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