pystac.summariesΒΆ

class pystac.summaries.RangeSummary(minimum: T, maximum: T)[source]
classmethod from_dict(d: Dict[str, Any]) RangeSummary[T][source]
maximum: T
minimum: T
to_dict() Dict[str, Any][source]
update_with_value(v: T) None[source]
class pystac.summaries.Summaries(summaries: Dict[str, Any], maxcount: int = 25)[source]
add(prop_key: str, summary: Union[List[Any], RangeSummary[Any], Dict[str, Any]]) None[source]
clone() Summaries[source]

Clones this object.

Returns:

The clone of this object

Return type:

Summaries

combine(summaries: Summaries) None[source]
classmethod empty() Summaries[source]
get_list(prop: str) Optional[List[Any]][source]
get_range(prop: str) Optional[RangeSummary[Any]][source]
get_schema(prop: str) Optional[Dict[str, Any]][source]
is_empty() bool[source]
lists: Dict[str, List[Any]]
maxcount: int
other: Dict[str, Any]
ranges: Dict[str, RangeSummary[Any]]
remove(prop_key: str) None[source]
schemas: Dict[str, Dict[str, Any]]
to_dict() Dict[str, Any][source]
update(summaries: Summaries) None[source]
class pystac.summaries.Summarizer(fields: Optional[str] = None)[source]

The Summarizer computes summaries from values, following the definition of fields to summarize provided in a json file.

For more information about the structure of the fields json file, see:

https://github.com/stac-utils/stac-fields

Parameters:
  • fields (str) – the path to the json file with field descriptions.

  • passed (If no file is) –

  • used. (a default one will be) –

summarize(source: Union[Collection, Iterable[Item]]) Summaries[source]

Creates summaries from items

summaryfields: Dict[str, SummaryStrategy]
class pystac.summaries.SummaryStrategy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
ARRAY = 'v'
DEFAULT = True
DONT_SUMMARIZE = False
RANGE = 'r'
SCHEMA = 's'