dronewq.utils package

Submodules

dronewq.utils.data_types module

class dronewq.utils.data_types.Base_Compute_Method(save_images: bool = False)

Bases: object

Base class for all computation methods.

preprocess() None
class dronewq.utils.data_types.Image(file_name: str, file_path: str | Path, method: str, profile: Profile, data: np.ndarray, idx: int)

Bases: object

Image Class used to transfer GEOTIFF images.

data: np.ndarray
file_name: str
file_path: str | Path
classmethod from_image(src: Image, data: np.ndarray, method: str)

Creates new Image instance from another Image.

idx: int
method: str
profile: Profile

dronewq.utils.images module

dronewq.utils.metadata module

dronewq.utils.settings module

class dronewq.utils.settings.Settings

Bases: object

A singleton class for the whole workflow. If main_dir is given other dependent directories are automatically populated.

property config

Return a copy of the global config.

configure(**kwargs)

Update global config.

copy()
get(key, default=None)
load(path: str)
save(path: str)

dronewq.utils.utils module

class dronewq.utils.utils.dotdict

Bases: dict

dronewq.utils.utils.get_filepaths(dir_path: Path) list[Path]

Reads a directory and returns a list of tiff files.

dronewq.utils.utils.get_sorted_filepaths(dir_path: Path, start: int = 0, count: int = 10000) list[Path]

Reads a directory and returns a sorted list of tiff files.

dronewq.utils.utils.validate_folder(folder: Path | str) Path

Validate main_dir if it exists or not.