rs_server_prip/prip_utils.md¶
Module for interacting with PRIP system through a FastAPI APIRouter.
prepare_collection(collection)
¶
Used to create a more complex mapping on platform/constallation from odata to stac.
Source code in docs/rs-server/services/prip/rs_server_prip/prip_utils.py
prip_odata_to_stac_template()
cached
¶
Used each time to read the ODataToSTAC_template json template.
Source code in docs/rs-server/services/prip/rs_server_prip/prip_utils.py
prip_stac_mapper()
cached
¶
Used each time to read the prip_stac_mapper config yaml.
Source code in docs/rs-server/services/prip/rs_server_prip/prip_utils.py
read_conf()
cached
¶
Used each time to read RSPY_PRIP_SEARCH_CONFIG config yaml.
Source code in docs/rs-server/services/prip/rs_server_prip/prip_utils.py
select_config(configuration_id)
¶
Used to select a specific configuration from yaml file, returns None if not found.
Source code in docs/rs-server/services/prip/rs_server_prip/prip_utils.py
serialize_prip_asset(feature_collection, products)
¶
Finalize assets for each STAC feature based on OData product metadata.
- Set href to the download link of the matched OData product (Products({Id})/$value).
- Rename default "file" asset to the item id (without extension).
- Ensure roles ["data","metadata"] as per STAC-PRIP-ITEM-REQ-0090.
Source code in docs/rs-server/services/prip/rs_server_prip/prip_utils.py
stac_to_odata(stac_params)
¶
Convert a parameter directory from STAC keys to OData keys. Return the new directory.