-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: main
Are you sure you want to change the base?
Conversation
stac_geoparquet/stac_geoparquet.py
Outdated
@@ -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) |
There was a problem hiding this comment.
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?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :-)
stac_geoparquet/stac_geoparquet.py
Outdated
@@ -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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?!).
d16af45
to
92a09cc
Compare
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.