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 OL STAC example #15042

Merged
merged 1 commit into from
Aug 30, 2023
Merged

Add OL STAC example #15042

merged 1 commit into from
Aug 30, 2023

Conversation

m-mohr
Copy link
Contributor

@m-mohr m-mohr commented Aug 22, 2023

Adds an OL STAC example as requested in #14927

It does complain about missing dependencies. Do I need to add it do devDependencies? Edit: Yes, that seems to work. Hope that's the right way of doing it.

@m-mohr m-mohr mentioned this pull request Aug 22, 2023
15 tasks
@m-mohr m-mohr marked this pull request as ready for review August 22, 2023 14:36
@github-actions
Copy link

📦 Preview the website for this branch here: https://deploy-preview-15042--ol-site.netlify.app/.

@mike-000
Copy link
Contributor

Usually the region between the original image extent and the extent which encloses it when reprojected is transparent, as in https://codesandbox.io/s/multiple-cogs-forked-8ls754?file=/main.js, not black as here

image
This suggests you have only 3 bands or an incorrect nodata value?

@m-mohr m-mohr force-pushed the ol-stac-example branch 2 times, most recently from e3600fa to 866dd8d Compare August 23, 2023 12:04
@m-mohr
Copy link
Contributor Author

m-mohr commented Aug 23, 2023

Good point, OL STAC tried to default to NaN if no nodata value was provided through STAC, but that was obviously not a good idea as it discarded any nodata values from the TIFF. Fixed.

@mike-000
Copy link
Contributor

Yes, I have sometimes found it necessary to add a nodata setting to force an alpha band to be added for non-parallel reprojection, but doing that unnecessarily overrides any genuine nodata. It might be better if any supplied setting was appended instead of simply overriding.

@mike-000
Copy link
Contributor

#15048 will ensure alpha can be set in regions outside the original source extent without overriding the metadata. The metadata would handle alpha inside the original extent.

examples/stac-item.html Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Co-authored-by: Tim Schaub <tschaub@users.noreply.github.com>
@m-mohr
Copy link
Contributor Author

m-mohr commented Aug 28, 2023

Updated and re-released ol-stac with ol as peer dependency.

Copy link
Member

@tschaub tschaub left a comment

Choose a reason for hiding this comment

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

Thanks, @m-mohr

@tschaub tschaub merged commit c91119d into openlayers:main Aug 30, 2023
8 checks passed
@tschaub tschaub deleted the ol-stac-example branch August 30, 2023 20:22
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.

3 participants