new_union_dataset#
- geodesic.boson.dataset.new_union_dataset(name, datasets, feature_limit=None, project=None, ignore_duplicate_fields=False, band_map=None, middleware={}, cache={}, tile_options={}, domain='*', category='*', type='*', **kwargs)[source]#
Creates a new
unionofDatasetsthat provides data from all input Datasets.Creates a new
Datasetby combining multipleDatasetswith theunionoperation. This means that a query to this provider will return the combination of results from all inputDatasets. This can be filtered down by the way of thecollectionsparameter onqueryand theasset_bandsparameter in the case of aget_pixelsrequest. All image datasets must have either all the same assets/bands or all different.- Parameters:
name (str) – the name of the new
Datasetfeature_limit (int | None) – the max size of a results page from a query/search
project (Project | str | None) – the name of the project this will be assigned to
ignore_duplicate_fields (bool) – if True, duplicate fields across providers will be ignored
band_map (Dict[str, List[Dict]] | None) – a dictionary of new band names to the ‘image’ asset that will be mapped to existing asset/band combinations. See example for more details
middleware (MiddlewareConfig | list) – configure any boson middleware to be applied to the new dataset.
cache (CacheConfig) – configure caching for this dataset
tile_options (TileOptions) – configure tile options for this dataset
domain (str) – domain of the resulting
Objectcategory (str) – category of the resulting
Objecttype (str) – the type of the resulting
Object**kwargs (dict) – additional properties to set on the new
Dataset
- Returns:
a new
Datasetthat is the union of the inputDatasets- Return type:
Examples
>>> # create a union of two datasets, but map the "image/b01" and "B1/0" >>> asset/bands to "red" >>> ds1 = ... >>> ds2 = ... >>> ds_union = new_union_dataset( ... name="red-union", ... datasets=[ds2], ... band_map={ ... "red": [ ... {"asset": "image", "band": 'b01'}, ... {"asset": "B1", "band": 0} ... ]})