eogrow.utils.filter

Utilities for filtering eopatch lists

eogrow.utils.filter.check_if_features_exist(filesystem, eopatch_path, features, *, check_bbox=True, check_timestamps)[source]

Checks whether an EOPatch in the given location has all specified features saved

Parameters:
  • filesystem (FS) –

  • eopatch_path (str) –

  • features (Sequence[Tuple[FeatureType, str]]) –

  • check_bbox (bool) –

  • check_timestamps (bool) –

Return type:

bool

eogrow.utils.filter.get_patches_with_missing_features(filesystem, patches_folder, patch_list, features, *, check_bbox=True, check_timestamps)[source]

Filters out names of those EOPatches that are missing some given features.

Parameters:
  • filesystem (FS) – A filesystem object.

  • patches_folder (str) – A path to folder with EOPatches, relative to filesystem object.

  • patch_list (List[Tuple[str, BBox]]) – A list of EOPatch names.

  • features (Sequence[Tuple[FeatureType, str]]) – A list of EOPatch features.

  • check_bbox (bool) – Make sure that the bbox is present.

  • check_timestamps (bool) – Make sure that the timestamps are present.

Returns:

A sublist of patch_list with only EOPatch names that are missing some features.

Return type:

List[Tuple[str, BBox]]