earthdaily.earthdatastore.cube_utils package

Subpackages

Submodules

Module contents

class earthdaily.earthdatastore.cube_utils.GeometryManager(geometry)[source]

Bases: object

buffer_in_meter(distance: int, crs_meters: str = 'EPSG:3857', **kwargs)[source]
to_bbox(crs='EPSG:4326')[source]
to_geopandas()[source]
to_intersects(crs='EPSG:4326')[source]
to_json(crs='EPSG:4326')[source]
to_wkt(crs='EPSG:4326')[source]
earthdaily.earthdatastore.cube_utils.zonal_stats(dataset: Dataset, geoms, method: str = 'numpy', smart_load: bool = False, memory: int = None, reducers: list = ['mean'], all_touched=True, label=None, buffer_meters: int | float | None = None, **kwargs)[source]

Xr Zonal stats using np.nan functions.

Parameters:
  • dataset (xr.Dataset) – DESCRIPTION.

  • geoms (TYPE) – DESCRIPTION.

  • method (str) – “xvec” or “numpy”. The default is “numpy”.

  • smart_load (bool) – Will load in memory the maximum of time and loop on it for “numpy” method. The default is False.

  • memory (int, optional) – Only for the “numpy” method, by default it will take the maximum memory available. But in some cases it can be too much or too little. The default is None.

  • reducers (list, optional) – Any np.nan function (“mean” is “np.nanmean”). The default is [‘mean’].

Yields:

zs (TYPE) – DESCRIPTION.