pystac.serialization.identify#
- class pystac.serialization.identify.STACVersionRange(min_version: str | STACVersionID = '0.8.0', max_version: str | STACVersionID | None = None)[source]
Defines a range of STAC versions.
- contains(v: str | STACVersionID) bool [source]
- is_earlier_than(v: str | STACVersionID) bool [source]
- is_later_than(v: str | STACVersionID) bool [source]
- is_single_version() bool [source]
- latest_valid_version() STACVersionID [source]
- property max_version: STACVersionID
- property min_version: STACVersionID
- set_max(v: str | STACVersionID) None [source]
- set_min(v: str | STACVersionID) None [source]
- set_to_single(v: str | STACVersionID) None [source]
- pystac.serialization.identify.identify_stac_object(json_dict: dict[str, Any]) STACJSONDescription [source]
Determines the STACJSONDescription of the provided JSON dict.
- Parameters:
json_dict – The dict of STAC JSON to identify.
- Returns:
The description of the STAC object serialized in the given dict.
- Return type:
- pystac.serialization.identify.identify_stac_object_type(json_dict: dict[str, Any]) STACObjectType | None [source]
Determines the STACObjectType of the provided JSON dict. If the JSON dict does not represent a STAC object, returns
None
.Will first try to identify the object using
"type"
field as described in the guidelines in How to Differentiate STAC Files. If this fails, will fall back to using the pre-1.0 heuristic described in this issue- Parameters:
json_dict – The dict of JSON to identify.
- class pystac.serialization.identify.STACVersionRange(min_version: str | STACVersionID = '0.8.0', max_version: str | STACVersionID | None = None)[source]
Defines a range of STAC versions.
- contains(v: str | STACVersionID) bool [source]
- is_earlier_than(v: str | STACVersionID) bool [source]
- is_later_than(v: str | STACVersionID) bool [source]
- is_single_version() bool [source]
- latest_valid_version() STACVersionID [source]
- property max_version: STACVersionID
- property min_version: STACVersionID
- set_max(v: str | STACVersionID) None [source]
- set_min(v: str | STACVersionID) None [source]
- set_to_single(v: str | STACVersionID) None [source]
- class pystac.serialization.identify.OldExtensionShortIDs(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Enumerates the IDs of common extensions.
- CHECKSUM = 'checksum'#
- COLLECTION_ASSETS = 'collection-assets'#
- DATACUBE = 'datacube'#
- EO = 'eo'#
- FILE = 'file'#
- ITEM_ASSETS = 'item-assets'#
- LABEL = 'label'#
- POINTCLOUD = 'pointcloud'#
- PROJECTION = 'projection'#
- SAR = 'sar'#
- SAT = 'sat'#
- SCIENTIFIC = 'scientific'#
- SINGLE_FILE_STAC = 'single-file-stac'#
- TILED_ASSETS = 'tiled-assets'#
- TIMESTAMPS = 'timestamps'#
- VERSION = 'version'#
- VIEW = 'view'#
- class pystac.serialization.identify.STACJSONDescription(object_type: STACObjectType, version_range: STACVersionRange, extensions: list[str])[source]#
Describes the STAC object information for a STAC object represented in JSON
- Parameters:
object_type – Describes the STAC object type. One of
STACObjectType
.version_range – The STAC version range that describes what has been identified as potential valid versions of the stac object.
extensions – List of extension schema URIs for extensions this object implements
- extensions: list[str]#
List of extension schema URIs for extensions this object implements
- object_type: STACObjectType#
Describes the STAC object type. One of
STACObjectType
.
- version_range: STACVersionRange#
The STAC version range that describes what has been identified as potential valid versions of the
STACObject
.