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

WIP: Add an extension for visualization parameters. #470

Closed
wants to merge 3 commits into from

Conversation

emsal0
Copy link

@emsal0 emsal0 commented Jun 5, 2019

The primary purpose of this extension is to allow collections to
specify the default way they are to be visualized or overlayed onto a
map.

PR Checklist:

  • This PR has no breaking changes.
  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.
  • API only: I have run npm run generate-all. to update the generated OpenAPI files.

emsal0 added 3 commits June 5, 2019 11:42
The primary purpose of this extension is to allow tabular collections to
specify the default way they are to be visualized or overlayed onto a
map.
TODO: how would we make these more general?
@m-mohr m-mohr changed the title Add an extension for visualization parameters. WIP: Add an extension for visualization parameters. Jun 6, 2019
@mojodna mojodna self-assigned this Jun 6, 2019
Copy link
Contributor

@jisantuc jisantuc left a comment

Choose a reason for hiding this comment

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

I'm reading this primarily from the perspective of "could I translate this into query params on a TMS server and produce sensible imagery", and I just about could if I understood the two questions below


| Field Name | Type | Description |
|------------|----------|------------------------------------------------------------------------------------------------|
| min | [double] | Minimum value of each band. If only one value then it is applied as the minimum for all bands. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there some way to express optionality? For example, in Raster Foundry land, we consider these optional, since we assume for color correction that we have statistical information about the image, but that a user might want to override it. Does that match the intention here?

Copy link
Collaborator

@m-mohr m-mohr Jun 7, 2019

Choose a reason for hiding this comment

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

In STAC everything that is not required explicitly is optional.

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean optional in the "value or null" sense on the individual array items. For example, if I had some bands where I want to set a minimum, but not others, I don't believe I can express that here (unless I've gotten too used to types, and [0, null, 0] would be a valid value here)

| Field Name | Type | Description |
|------------|---------|--------------------------------------------------------|
| band_vis | BandVis | Vis args for the given band_names. |
| global_vis | BandVis | If vis_args are present here, they apply to all bands. |
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like there are two places where you can specify global viz arguments -- in band_vis, if you provide only one value in the array parameters, or here -- am I reading this correctly that those could conflict? If so, does global_vis take precedence? Under what circumstances should someone provide both global_vis and band_vis?

Copy link
Author

Choose a reason for hiding this comment

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

In Earth Engine it's handled like this:
In ImageVisualization a number of band_names are specified. For each of these bands, the BandVis in band_vis is applied. But for ALL bands of the Image/ImageCollection, the visualization parameters in global_vis are applied.

@matthewhanson
Copy link
Collaborator

Stale PR - will be taken up for consideration after 1.0 if there is still interest

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.

5 participants