Reference
MCCN
__init__(endpoint=None, collection=None, items=None, shape=None, resolution=None, bbox=None, anchor='default', crs=4326, geobox=None, start_ts=None, end_ts=None, bands=None, mask_only=False, use_all_vectors=True, x_dim='x', y_dim='y', t_dim='time', mask_name='__MASK__', combine_mask=False, rename_bands=None, process_bands=None, nodata=0, nodata_fallback=0, time_groupby='time', merge_method=None, merge_method_fallback='replace', dtype=None, dtype_fallback='float64', num_workers=4)
Constructor for the mccn engine
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str | Path | tuple[str, str] | None
|
discover project by endpoint. Endpoint can be a tuple of string, which specifies the STAC API URL, and stac collection ID. Endpoint can also be a string or a Path object to a |
None
|
collection
|
pystac.Collection | None
|
discover project by a pystac Collection object. Defaults to None. |
None
|
items
|
Sequence[pystac.Item] | None
|
discover project by a sequence of pystac Items. Defaults to None. |
None
|
shape
|
Shape_T | None
|
define the shape of geobox. Defaults to None. |
None
|
resolution
|
Resolution_T | None
|
define the resolution of the geobox. Defaults to None. |
None
|
bbox
|
BBox_T | None
|
define the bounding box of the geobox. Defaults to None. |
None
|
anchor
|
AnchorPos_T
|
additional geobox parameter. Defaults to "default". |
'default'
|
crs
|
CRS_T
|
geobox's crs. Defaults to 4326. |
4326
|
geobox
|
GeoBox | None
|
geobox object. Defaults to None. |
None
|
start_ts
|
str | pd.Timestamp | datetime.datetime | None
|
date filtering - start. Defaults to None. |
None
|
end_ts
|
str | pd.Timestamp | datetime.datetime | None
|
date filtering - end. Defaults to None. |
None
|
bands
|
set[str] | None
|
set of requested bands. Defaults to None. |
None
|
mask_only
|
bool
|
whether to load only masks for vector assets. Defaults to False. |
False
|
use_all_vectors
|
bool
|
when bands are requested, should all vectors be loaded or only vectors with matching bands be loaded. Non-matching vectors will have their geometry layers loaded to the datacube if True. Defaults to True. |
True
|
x_dim
|
str
|
x dimension name of the datacube. Defaults to "x". |
'x'
|
y_dim
|
str
|
y dimension name of the datacube. Defaults to "y". |
'y'
|
t_dim
|
str
|
t dimension name of the datacube. Defaults to "time". |
'time'
|
mask_name
|
str
|
name of the combined mask layer, if combine_mask is True. Defaults to "MASK". |
'__MASK__'
|
combine_mask
|
bool
|
whether to combine all geometry layers of all vector assets into a single layer. By default, each geometry layer will be loaded as an independent geometry layer. Defaults to False. |
False
|
nodata
|
Nodata_Map_T
|
fill value for nodata. If a single value is provided, the value will be used for all layers. If a dictionary is provided, each nodata value will apply for matching key layers. Defaults to 0. |
0
|
nodata_fallback
|
Nodata_T
|
fill value fall back for nodata. If a dictionary is provided for nodata, the nodata_fallback value will be used for layers that are not in the nodata dict. Defaults to 0. |
0
|
time_groupby
|
TimeGroupby
|
how datetimes are groupped. Acceptable values are year, month, day, hour, minute or time. If time is provided, no time round up is performed. If time is a value, will round up to the nearest matching date. Defaults to "time". |
'time'
|
merge_method
|
MergeMethod_Map_T
|
how overlapping values are merged. Acceptable values are min, max, mean, sum, and replace and None. If None is provided, will use the replace strategy. Also accepts a dictionary if fine-grain control over a specific layer is required. Defaults to None. |
None
|
merge_method_fallback
|
MergeMethod_T
|
merge value fallback, applies when a layer name is not in merge_method dictionary. Defaults to "replace". |
'replace'
|
dtype
|
DType_Map_T
|
set dtype for a layer. Also accepts a dictionary for fine-grained control. Defaults to None. |
None
|
dtype_fallback
|
Dtype_T
|
dtype fallback, when a layer's name is not in dtype dictionary. Defaults to "float64". |
'float64'
|
get_collection(endpoint, collection=None)
staticmethod
Try to load collection from endpoint.
Raises EndpointType if endpoint is not an acceptable type, or EndpointException if
endpoint is not reachable