-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
normalise_hrefs causing unwanted Item asset href changes. #801
Comments
Thanks for the report and the excellent reproducible example @MitchellPaff ! I was able to reproduce this using your example and I'll try to have a fix in the 1.5.0 release that we're putting out soon. |
So, in this case the root cause is an invalid {
"rel": "self",
"href": "feature.json",
"type": "application/json"
} Per the STAC spec docs on Relation Types The Item has a To be honest, I'll need to think a bit more about what the right course of action is. On the one hand, PySTAC is correctly handling that Item's |
In order to fix pystac issue stac-utils/pystac#801 Multi-line description of commit, feel free to be detailed. [Ticket: X]
* fix: Remove absolute self url's from STAC objects in Geostore In order to fix pystac issue stac-utils/pystac#801 Multi-line description of commit, feel free to be detailed. [Ticket: X] * refactor: reduce test and optimise copy job Co-authored-by: Victor Engmark <[email protected]>
I think this is incorrect. When creating
This goes back to the question of "is PySTAC a strict implementation of the specification, or a tool to work with the specification in a user-friendly way"? If it's a strict implementation, option 1; otherwise, option 2. Interested in @philvarner's thoughts as well. |
There are a few places in the code (e.g. accepting single lists as |
I think I'll need a bit more time to put together a solution and some tests to make sure we're actually getting the behavior we want out of this. I'm going to move this into a future release for now so we don't hold up 1.5. |
Thanks again for the excellent reproducible example! I used it to confirm that #984 fixes the problem. |
Hello.
I am seeing some weird behaviour that I hope you can help me with.
I've made an example in this repository here.
In this example I am attempting to add a STAC catalog 'catalog_1' as a child to the root catalog.json.
If you clone that repo and run main.py, you will see the files are modified and the new child and parent relationship is added to the links object of each STAC file successfully.
However if you look at line 27 of the modified Item STAC file '/example/catalog_1/collection_1/item_1/item_1.json'.
You will see that the href to the asset has been updated and now points to a non-existent asset outside of this directory.
Any help on this issue would be greatly appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: