gws.base.grabber.tile

Base grabber for tiled sources.

Source code: gws.base.grabber.tile

Module Contents

class gws.base.grabber.tile.Object

Bases: gws.base.grabber.core.Object

Base grabber for sources addressed as tile pyramids.

Composes boxes and tiles from source tiles, mosaicked and warped into the target grid. Provides subclasses with the composition and the caching of source tiles.

Subclasses set sourceTms and implement fetch_tile_as_bytes.

sourceTms: gws.TileMatrixSet

Source tile matrix set.

compose_box_as_image(extent, w, h, params=None)
abstractmethod fetch_tile_as_bytes(tm: gws.TileMatrix, col: int, row: int) → bytes

Fetch a source tile with exactly one request, as encoded bytes.

Subclasses must implement this.

Parameters:
  • tm – Source tile matrix.

  • col – Tile column.

  • row – Tile row.

Returns:

The encoded tile image.

Raises:

NotImplementedError – In the base class.