skmap.overlay.SpaceTimeOverlay#

class SpaceTimeOverlay(points, col_date, catalog, raster_tiles, tile_id_col='tile_id', n_threads=4, verbose=False)[source]#

Bases: object

Overlay a set of points over multiple raster considering the year information. The retrieved pixel values are organized in columns according to the filenames.

Parameters:
  • points (GeoDataFrame | DataFrame | str) – The path for vector file or geopandas.GeoDataFrame with the points.

  • col_date (str) – Date column to retrieve the year information.

:param catalog. :type n_threads: int :param n_threads: Number of CPU cores to be used in parallel. By default all cores

are used.

Parameters:

verbose (bool) – Use True to print the overlay progress.

Examples

>>> from skmap.overlay import SpaceTimeOverlay
>>>

Methods

run

Execute the spacetime overlay.

run(max_ram_mb, out_file_name, gdal_opts={'CPL_VSIL_CURL_ALLOWED_EXTENSIONS': '.tif', 'GDAL_HTTP_VERSION': '1.0'})[source]#

Execute the spacetime overlay. It removes the year part from the column names. For example, the raster raster_20101202..20110320.tif results in the column name raster_1202..0320.

Returns:

Data frame with the original columns plus the overlay result (one new column per raster).

Return type:

Optional[DataFrame]