OrthomosaicTiles

Qualified name: crop_row_detector.orthomosaic_tiler.OrthomosaicTiles

class OrthomosaicTiles(*, orthomosaic, tile_size, overlap=0, run_specific_tile=None, run_specific_tileset=None)[source]

Bases: object

Convert orthomosaic into tiles.

Parameters:
  • orthomosaic (pathlib.Path)

  • tile_size (int | tuple[int, int]) – tile size in pixels. Either a tuple with (width, height) or integer for square tiles.

  • overlap (float) – How much the tiles should overlap as a fraction of the tile size.

  • run_specific_tile (list[int] | None) – List of tiles to run e.g. [15, 65] runs tiles 15 and 65.

  • run_specific_tileset (list[int] | None) – List of ranges of tiles to run e.g. [15, 65] runs all tiles between 15 and 65.

Methods

divide_orthomosaic_into_tiles

Divide orthomosaic into tiles and select specific tiles if desired.

get_list_of_specified_tiles

From a list of all tiles select only specified tiles.

get_orthomosaic_size

Read size from orthomosaic.

get_tiles

Given a path to an orthomosaic, create a list of tiles which covers the orthomosaic with a specified overlap, height and width.

Attributes

tiles

List of tiles

divide_orthomosaic_into_tiles()[source]

Divide orthomosaic into tiles and select specific tiles if desired.

Return type:

list[Tile]

get_list_of_specified_tiles(tile_list)[source]

From a list of all tiles select only specified tiles.

Parameters:

tile_list (list[Tile])

Return type:

list[Tile]

get_orthomosaic_size()[source]

Read size from orthomosaic.

Returns:

  • columns (int)

  • rows (int)

Return type:

tuple[int, int]

get_tiles()[source]

Given a path to an orthomosaic, create a list of tiles which covers the orthomosaic with a specified overlap, height and width.

Returns:

list of tiles

Return type:

list[Tile]

tiles: list[Tile]

List of tiles