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

Add an option for a browser link column #23

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

m-mohr
Copy link
Contributor

@m-mohr m-mohr commented Jul 27, 2023

This adds an option that looks for an alternate link with the HTML media type and adds a separate column browser_link with the link to the HTML representation. This is pretty much aligned with the self link option and works more generally than the proposal from @cholmes in #15 that was specific to STAC Browser.

@@ -43,6 +46,8 @@ def to_geodataframe(
----------
items: A sequence of STAC items.
add_self_link: Add the absolute link (if available) to the source STAC Item as a separate column named "self_link"
add_browser_link: Add an absolute link to an alternate HTML representation of the source STAC Item (if available)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this should explicitly document the conditions for this link being exracted:

  • The relation type must be alternate
  • The media type must be text/html
  • The href must be absolute (or whatever we're checking for. Fully qualified domain name?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :-)

@@ -43,6 +46,8 @@ def to_geodataframe(
----------
items: A sequence of STAC items.
add_self_link: Add the absolute link (if available) to the source STAC Item as a separate column named "self_link"
add_browser_link: Add an absolute link to an alternate HTML representation of the source STAC Item (if available)
as a separate column named "browser_link"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think sphinx wants subsequent lines indented a bit. Maybe 3 spaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 3 spaces (but I'm not sure it has the intended effect?!).

@m-mohr m-mohr marked this pull request as ready for review July 31, 2023 14:25
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

Successfully merging this pull request may close these issues.

2 participants