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

Support additional parameters in Item Search? #704

Closed
drwelby opened this issue Jun 25, 2024 · 3 comments
Closed

Support additional parameters in Item Search? #704

drwelby opened this issue Jun 25, 2024 · 3 comments

Comments

@drwelby
Copy link

drwelby commented Jun 25, 2024

Any harm in allowing additional search parameters in the ItemSearch init that could get tacked onto the request URL as params? For example, let's say a STAC endpoint accepts an optional units=m|ft to send back metadata fields in a given measurement system.

These parameters could be captured as **kwargs or be more explicitly passed as something like params={}. I'm happy to PR the change but wanted to get some opinions first.

@gadomski
Copy link
Member

Any harm in allowing additional search parameters in the ItemSearch init that could get tacked onto the request URL as params?

I don't have a specific reason to not allow this, though I do have hesitancy around **kwargs usage generally because it often leads to a messy user experience. If the additional parameters had an defined extension that we could reference and add as proper arguments, that might be a better interface (see this discussion for some discussion around a similar topic).

@drwelby
Copy link
Author

drwelby commented Jun 25, 2024

I hear you on **kwargs.

I might be overthinking this, though. Since these sort of params are more "server options" could I just tack that param onto the URL when I open the catalog? client.open("https://my.stac.api/search?units=ft") would probably be good enough to enable "I want all my STAC metadata results to be in feet".

@drwelby
Copy link
Author

drwelby commented Jun 27, 2024

Playing around these "server options", they seem to be falling into stacIO's domain so I'm going to close this for now.

@gadomski gadomski closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants