datacube.utils.geometry.gbox.GeoboxTiles#

class datacube.utils.geometry.gbox.GeoboxTiles(box, tile_shape)[source]#

Partition GeoBox into sub geoboxes

Construct from a GeoBox

Parameters
__init__(box, tile_shape)[source]#

Construct from a GeoBox

Parameters

Methods

__init__(box, tile_shape)

Construct from a GeoBox

chunk_shape(idx)

Chunk shape for a given chunk index.

range_from_bbox(bbox)

Compute rows and columns overlapping with a given BoundingBox

tiles(polygon)

Return tile indexes overlapping with a given geometry.

Attributes

base

GeoBox

shape

Number of tiles along each dimension

Methods:

chunk_shape(idx)

Chunk shape for a given chunk index.

range_from_bbox(bbox)

Compute rows and columns overlapping with a given BoundingBox

tiles(polygon)

Return tile indexes overlapping with a given geometry.

Attributes:

shape

Number of tiles along each dimension

chunk_shape(idx)[source]#

Chunk shape for a given chunk index.

Parameters

idx (Tuple[int, int]) – (row, col) index

Return type

Tuple[int, int]

Returns

(nrow, ncols) shape of a tile (edge tiles might be smaller)

Raises

IndexError when index is outside of [(0,0) -> .shape)

range_from_bbox(bbox)[source]#

Compute rows and columns overlapping with a given BoundingBox

Return type

Tuple[range, range]

property shape#

Number of tiles along each dimension

tiles(polygon)[source]#

Return tile indexes overlapping with a given geometry.

Return type

Iterable[Tuple[int, int]]