skmap.tiled_data.TiledDataLoader#

class TiledDataLoader(catalog, mask_template_path, spatial_aggregation=None, resampling_strategy='GRA_NearestNeighbour', gdal_opts={'CPL_VSIL_CURL_ALLOWED_EXTENSIONS': '.tif', 'GDAL_HTTP_VERSION': '1.0'}, n_threads=4, verbose=True, n_threads_read=None)[source]#

Bases: TiledData

Loads tiled data in parallel based on a catalog file

Parameters:
  • catalog (DataCatalog) – scikit-map DataCatalog

  • mask_template_path (str) – str with a {tile_id} placeholder

  • spatial_aggregation (bool) – Whether to use spatial aggregation Should be powers of 2?, defaults to None

  • resampling_strategy (str) – _description_, defaults to “GRA_NearestNeighbour”

  • gdal_opts (Dict[str, str]) – _description_, defaults to { “GDAL_HTTP_VERSION”: “1.0”, “CPL_VSIL_CURL_ALLOWED_EXTENSIONS”: “.tif”, }

  • n_threads (int) – The number of threads to use for whales, defaults to os.cpu_count()

  • verbose (bool) – Whether to print output, defaults to True

  • n_threads_read (int, optional) – Number of threads for GDAL, defaults to n_threads

_summary_

Parameters:
  • catalog (DataCatalog) – _description_

  • mask_template_path (str) – _description_

Methods

convert_nan_to_median

convert_nan_to_value

expand_valid_pixels

fill_otf_constant

filter_valid_pixels

get_pixels_valid_idx

load_tile_data