geodesic.boson.dataset.Dataset.from_elasticsearch_index#

static Dataset.from_elasticsearch_index(name, url, index_pattern, credential=None, storage_credential=None, datetime_field='properties.datetime', geometry_field='geometry', geometry_type='geo_shape', id_field='_id', data_api='features', item_type='other', feature_limit=2000, middleware={}, cache={}, tile_options={}, domain='*', category='*', type='*', max_get_pixels_features=10, **kwargs)[source]#

Create a new Dataset from an elasticsearch index.

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

  • url (str) – the DNS name or IP of the elasticsearch host to connect to.

  • index_pattern (str) – an elasticsearch index name or index pattern

  • credential (str | None) – name of the Credential object to use. Currently, this only supports basic auth (username/password).

  • storage_credential (str | None) – the name of the Credential object to use for storage if any of the data referenced in the index requires a credential to access (e.g. cloud storage for STAC)

  • datetime_field (str) – the field that is used to search by datetime in the elasticserach index.

  • geometry_field (str) – the name of the field that contains the geometry

  • geometry_type (str) – the type of the geometry field, either geo_shape or geo_point

  • id_field (str) – the name of the field to use as an ID field

  • data_api (str) – the data API, either ‘stac’ or ‘features’

  • item_type (str) – the type of item. If it’s a stac data_api, then it should describe what the data is

  • feature_limit (int) – the max number of features the service will return per page.

  • insecure – if True, will not verify SSL certificates

  • middleware (MiddlewareConfig) – 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 – other arguments that will be used to create the collection and provider config.

  • max_get_pixels_features (int) – max number of input rasters to mosaic in a get_pixels request

Returns:

A new Dataset. Must call .save() for it to be usable.

Return type:

Dataset

Example

>>> ds = geodesic.Dataset.from_elasticsearch_index(
...             url="http://elastic-search-instance:9200"
...             index_pattern="sentinel-1-insar-deformation",
...             datetime_field="properties.datetime",
...             geometry_field="geometry",
...             id_field="_id",
...             )
>>> ds.stage()
>>> # Staging is optional, but is a useful tool for validating configuration
>>> ds.save()