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
135 136 137 138 139 140 141 142 | |
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
52 53 54 55 56 57 | |
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
60 61 62 63 64 65 | |
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
43 44 45 46 47 48 49 | |
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
68 69 70 71 72 73 | |
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
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
stac_to_odata(stac_params)
Convert a parameter directory from STAC keys to OData keys. Return the new directory.
Source code in docs/rs-server/services/prip/rs_server_prip/prip_utils.py
76 77 78 | |