eumap.gapfiller.TMWM2

class TMWM2(fn_files=None, data=None, season_size=None, time_win_size=9, precomputed_flags=None, max_same_season_win=None, max_neib_season_win=None, max_annual_win=None, time_win_direction='both', outlier_remover=None, std_win=3, std_env=2, perc_env=[2, 98], n_jobs_io=4, verbose=True)[source]

Bases: eumap.gapfiller.ImageGapfill

Methods

run

Execute the gapfilling approach.

save_rasters

Save the result in raster files maintaining the same filenames of the read rasters.

run()

Execute the gapfilling approach.

save_rasters(out_dir, dtype=None, out_mantain_subdirs=True, root_dir_name='eumap_data', fn_files=None, nodata=None, spatial_win=None, save_flag=True)

Save the result in raster files maintaining the same filenames of the read rasters.

Parameters
  • out_dir – Folder path to save the files.

  • dtype (Optional[str]) – Convert the rasters for the specified Numpy dtype before save. This argument overwrite the values retrieved of fn_files

  • out_mantain_subdirs (bool) – Keep the full folder hierarchy of the read raster in the out_dir.

  • root_dir_name (str) – Keep the relative folder hierarchy of the read raster in the out_dir considering of the sub folders of root_dir_name.

  • fn_files (Optional[List]) – Raster file paths to retrieve the filenames and folders. Use this parameter in situations where the data parameter is informed in the class constructor. The pixel size, crs, extent, image size and nodata for the gapfilled rasters are retrieved from the first valid raster of fn_files

  • nodataNodata value used for the the gapfilled rasters. This argument overwrite the values retrieved of fn_files. This argument doesn’t affect the flag rasters (gapfill summary), which have nodata=0.

  • spatial_win (Optional[Window]) – Save the gapfilled rasters considering the specified spatial window.

  • save_flag – Save the flag rasters (gapfill summary).