geodesic.boson.dataset.Dataset.from_stac_collection#
- static Dataset.from_stac_collection(name, url, credential=None, storage_credential=None, item_type='raster', feature_limit=2000, insecure=False, use_get=False, middleware={}, cache={}, tile_options={}, domain='*', category='*', type='*', max_get_pixels_features=10, **kwargs)[source]#
Create a new Dataset from a STAC Collection.
- Parameters:
name (str) – name of the Dataset to create
url (str) – the url to the collection (either STAC API or OGC API: Features)
credential – name or uid of the credential to access the API
storage_credential – name or uid of the credential to access the storage the items are stored in.
item_type (str) – what type of items does this contain? “raster” for raster data, “features” for features, other types, such as point_cloud may be specified, but doesn’t alter current internal functionality.
feature_limit (int) – the max number of features to return in a single page from a search. Defaults to 2000
insecure (bool) – if True, will not verify SSL certificates. This is not recommended for production use.
use_get (bool) – use GET requests to STAC. This must be set if the STAC API does not support POST to /search
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
Objectmax_get_pixels_features (int) – max number of input rasters to mosaic in a get_pixels request
**kwargs – additional properties to set on the new
Dataset
- Returns:
a new Dataset.
- Return type:
Examples
>>> ds = Dataset.from_stac_collection( ... name="landsat-c2l2alb-sr-usgs", ... url="https://landsatlook.usgs.gov/stac-server/collections/landsat-c2l2alb-sr" ... ) >>> ds.stage() >>> # Staging is optional, but is a useful tool for validating configuration >>> ds.save()