earthdaily.accessor package
Subpackages
Module contents
- class earthdaily.accessor.EarthDailyAccessorDataArray(xarray_obj)[source]
Bases:
object
- centroid(to_wkt: str = False, to_4326: bool = True)[source]
Return the geographic center point in 4326/WKT of this dataset.
- sel_nearest_dates(target: (<class 'xarray.core.dataset.Dataset'>, <class 'xarray.core.dataarray.DataArray'>), max_delta: int = 0, method: str = 'nearest', return_target: bool = False)[source]
- whittaker(beta: float = 10000.0, weights: (<class 'numpy.ndarray'>, <class 'list'>) = None, time='time')[source]
- zonal_stats(geometry, reducers: list = ['mean'], label: str = None, lazy_load=True, **kwargs)[source]
Zonal stats from dtacube
- Parameters:
geometry (str,gpd.GeoDataFrame) – A geometry (wkt, geopandas…)
stats (list, optional) – The default is [“mean”].
raise_missing_geometry (bool, optional) – DESCRIPTION. The default is False.
**kwargs (dict) – Any kwargs for xvec.zonal_stats.
- Returns:
With new dimension “zonal_statistics” and “geometry”.
- Return type:
xr.dataset
- class earthdaily.accessor.EarthDailyAccessorDataset(xarray_obj)[source]
Bases:
EarthDailyAccessorDataArray
- add_indices(indices: list[str | dict], **kwargs)[source]
Uses spyndex to compute and add index.
For list of indices, see https://github.com/awesome-spectral-indices/awesome-spectral-indices.
- Parameters:
indices (list[str|dict]) – [‘NDVI’,{‘NDVI2’:’(red-nir)/(red+nir)’}].
- Returns:
The input xr.Dataset with new data_vars of indices.
- Return type:
xr.Dataset