StaticStacSearch

StaticStacSearch#

class eodag.plugins.search.static_stac_search.StaticStacSearch(provider, config)[source]#

Static STAC Catalog search plugin

This plugin first loads all STAC items found in the catalog (or item), and converts them to EOProducts using StacSearch. Then it uses crunchers to only keep products matching query parameters.

The plugin inherits the configuration parameters from PostJsonSearch (via the StacSearch inheritance) with the following particularities:

Parameters:
  • provider (str) – provider name

  • config (PluginConfig) –

    Search plugin configuration:

    • api_endpoint (str) (mandatory): path to the catalog or item; in contrast to the api_endpoint for other plugin types this can be a url or local system path.

    • max_connections (int): Maximum number of concurrent connections for HTTP requests; default: 100

    • timeout (int): Timeout in seconds for each internal HTTP request; default: 5

__init__(provider, config)[source]#
Parameters:

Methods

__init__(provider, config)

build_query_string(product_type, query_dict)

Build The query string using the search parameters

build_sort_by(sort_by_arg)

Build the sorting part of the query string or body by transforming the sort_by argument into a provider-specific string or dictionary

clear()

Clear search context

collect_search_urls([prep])

Adds pagination to query parameters, and auth to url

count_hits(count_url[, result_type])

Count the number of results satisfying some criteria

discover_product_types(**kwargs)

Fetch product types list from a static STAC Catalog provider using discover_product_types conf

discover_product_types_per_page(**kwargs)

Fetch product types list from provider using discover_product_types conf using paginated kwargs["fetch_url"]

discover_queryables(**kwargs)

Set static available queryables for StaticStacSearch search plugin

do_search([prep])

Perform the actual search request.

get_assets_from_mapping(provider_item)

Create assets based on the assets_mapping in the provider's config and an item returned by the provider

get_collections(prep, **kwargs)

Get the collection to which the product belongs

get_metadata_mapping([product_type])

Get the plugin metadata mapping configuration (product type specific if exists)

get_product_type_cfg_value(key[, default])

Get the value of a configuration option specific to the current product type.

get_product_type_def_params(product_type[, ...])

Get the provider product type definition parameters and specific settings

get_sort_by_arg(kwargs)

Extract the sort_by argument from the kwargs or the provider default sort configuration

list_queryables(filters, ...[, ...])

Get queryables

map_product_type(product_type, **kwargs)

Get the provider product type from eodag product type

normalize_results(results, **kwargs)

Build EOProducts from provider results

query([prep])

Perform a search on a static STAC Catalog

queryables_from_metadata_mapping([...])

Extract queryable parameters from product type metadata mapping.

validate(search_params, auth)

Validate a search request.

Attributes

extract_properties

plugins

auth

next_page_url

next_page_query_obj

total_items_nb

need_count