Skip to content
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

Collection names are duplicated #103

Closed
drnextgis opened this issue Oct 21, 2021 · 9 comments
Closed

Collection names are duplicated #103

drnextgis opened this issue Oct 21, 2021 · 9 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested
Milestone

Comments

@drnextgis
Copy link
Contributor

I'm running stac-browser v3 locally and pointing it at a private test stac catalog:

$ npm start -- --open --catalogUrl="https://stac-api.local

The catalog has 2 collections but stac-browser shows them two times:
image

As you can see names of collections are the same but its URLs a bit different:

@m-mohr
Copy link
Collaborator

m-mohr commented Oct 22, 2021

Thanks for the report. Could you make the JSON available so that I can test against it?

@drnextgis
Copy link
Contributor Author

drnextgis commented Oct 22, 2021

Please tell me which stac endpoint I should call to make a json you need?

@m-mohr
Copy link
Collaborator

m-mohr commented Oct 22, 2021

I guess from your report that it would be the JSON responses from both:

You can send it to the e-mail in my profile, if you don't want it to be publicly posted.

@drnextgis
Copy link
Contributor Author

responses.zip

@m-mohr
Copy link
Collaborator

m-mohr commented Oct 22, 2021

Thanks. The issue here is that you list catalogs as childs in the root catalogs with the same name as the collections in the collection endpoint. They get merged and thus they are there shown twice.

@drnextgis
Copy link
Contributor Author

drnextgis commented Oct 22, 2021

I use stac_fastapi-based stac catalog and can see in the code where it is happening. Do you think stac-browser should handle this case to filter out collections with same names?

@m-mohr
Copy link
Collaborator

m-mohr commented Oct 22, 2021

Hmm, I'm not sure. I could probably try to detect duplicates based on the URL, but that may not always work perfectly if URLs differ slightly or collections have no self link etc.
I'd rather see this as an implementation issue or a best practice that should evolve in the API spec as I'm not sure why you'd want to list the collection twice (it also doesn't scale very well). I remember that we have discussed this issue before, but I guess nothing has been written / specified so far, at least I see related issues that are still open: radiantearth/stac-api-spec#137 and radiantearth/stac-api-spec#159 (comment)

@m-mohr m-mohr added help wanted Extra attention is needed question Further information is requested labels Oct 22, 2021
@m-mohr m-mohr added this to the 3.0.0 milestone Oct 22, 2021
@m-mohr m-mohr self-assigned this Oct 22, 2021
m-mohr added a commit that referenced this issue Nov 25, 2021
@m-mohr
Copy link
Collaborator

m-mohr commented Nov 25, 2021

@drnextgis This has been fixed, but may get another change once the issues above have been tackled in the API spec.

@m-mohr m-mohr closed this as completed Nov 25, 2021
@drnextgis
Copy link
Contributor Author

Thanks!

@m-mohr m-mohr modified the milestones: 3.0.0, 3.0.0-beta.1 Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants