geodesic.boson.dataset.Dataset.from_remote_provider#

static Dataset.from_remote_provider(name, url, data_api='features', transport_protocol='http', insecure=False, additional_properties={}, feature_limit=2000, credential=None, middleware={}, cache={}, tile_options={}, domain='*', category='*', type='*', **kwargs)[source]#

Creates a dataset from a server implementing the Boson remote provider interface.

The Boson Remote Provider interface may be implemented using the Boson Python SDK (https://pypi.org/project/boson-sdk/). The provider must be hosted somewhere and this connects Boson to a remote provider.

Remote Providers may either implement the Search or the Pixels endpoint (or both).

Parameters:
  • name (str) – name of the Dataset to create

  • url (str) – URL of the server implementing the interface

  • data_api (str) – either ‘features’ or ‘raster’.

  • transport_protocol (str) – either ‘http’ or ‘grpc’

  • insecure (bool) – if True, will not verify the server’s certificate

  • additional_properties (dict) – additional properties to set on the dataset

  • feature_limit (int) – the max number of features that this provider will allow returned in a single page.

  • credential (str | None) – the name of the credential to access the api.

  • 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 Dataset

  • category (str) – category of the resulting Dataset

  • type (str) – the type of the resulting Dataset

  • **kwargs – additional arguments that will be used to create the STAC collection, Dataset description Alias, etc.

Returns:

a new Dataset.

Return type:

Dataset

Example

>>> # Create a dataset from a remote provider
>>> remote_provider = geodesic.boson.dataset.from_remote_provider(
...     url="https://lightning-simulator-azwzjbkrwq-uc.a.run.app",
...     name="Lightning Simulator",
...     description="Simulates lightning strikes.",
...     )
>>> remote_provider.stage()
>>> # Staging is optional, but is a useful tool for validating configuration
>>> remote_provider.save()