Module stac_fastapi.types.links¶
Link helpers.
Variables¶
INFERRED_LINK_RELS
Functions¶
filter_links¶
def filter_links(
links: List[Dict]
) -> List[Dict]
Remove inferred links.
resolve_links¶
def resolve_links(
links: list,
base_url: str
) -> List[Dict]
Convert relative links to absolute links.
Classes¶
BaseLinks¶
class BaseLinks(
collection_id: str,
base_url: str
)
Create inferred links common to collections and items.
Descendants¶
- stac_fastapi.types.links.CollectionLinks
- stac_fastapi.types.links.ItemLinks
Methods¶
root¶
def root(
self
) -> Dict[str, Any]
Return the catalog root.
CollectionLinks¶
class CollectionLinks(
collection_id: str,
base_url: str
)
Create inferred links specific to collections.
Ancestors (in MRO)¶
- stac_fastapi.types.links.BaseLinks
Methods¶
create_links¶
def create_links(
self
) -> List[Dict[str, Any]]
Return all inferred links.
items¶
def items(
self
) -> Dict[str, Any]
Create the items
link.
parent¶
def parent(
self
) -> Dict[str, Any]
Create the parent
link.
root¶
def root(
self
) -> Dict[str, Any]
Return the catalog root.
self¶
def self(
self
) -> Dict[str, Any]
Create the self
link.
ItemLinks¶
class ItemLinks(
collection_id: str,
base_url: str,
item_id: str
)
Create inferred links specific to items.
Ancestors (in MRO)¶
- stac_fastapi.types.links.BaseLinks
Methods¶
collection¶
def collection(
self
) -> Dict[str, Any]
Create the collection
link.
create_links¶
def create_links(
self
) -> List[Dict[str, Any]]
Return all inferred links.
parent¶
def parent(
self
) -> Dict[str, Any]
Create the parent
link.
root¶
def root(
self
) -> Dict[str, Any]
Return the catalog root.
self¶
def self(
self
) -> Dict[str, Any]
Create the self
link.