Open tik65536 opened 6 months ago
Reference for API implementation : https://api.stacspec.org/v1.0.0-rc.1/item-search/#tag/Item-Search
During the implementation, it was found that for items with pystac generated with catalog type = "Relative Path", the pystac validator in qgis plug-in will complain abt the item's collection link is in relative path format without "self" defined, which cause error after clicking search in the STAC api browser.
When click on the item from the QGIS , it cause the following error :
After checking the plugin, it was found that the item had 2 assets attached, but from the original STAC json , only one is found ( the image) , the following screen cap from QGIS log shows the additional asset is with type=None .
Going back to the hateoas.py, the additional "default" element is add by the function _modify_content_for_display.
SInce it is for html display and to maintain consistency, the changes is suggested to be done in api.py to change if the heard application is HTML , if not , will remove it from the asset.
api.py - get_stac_path
Update - It is not necessary to modify either api.py or hateoas.py , as the search api is a separated function, we can modify the assets return inside the search api without touching the original design.
intermediate Result on Search API
Error while clicking add to layer :
The last mile .......
Possible to change the QGIS STAC API assets_diaglog.py to visgs ?
After changing the stac plugin , those geotiff is able to download to QGIS .
Currently when using QGIS , the search function is missing from the pygeoapi as following screen cap.