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

The Show on map button is not being shown for s3 links COG files #372

Open
imanshafiei540 opened this issue Sep 27, 2023 · 6 comments
Open
Labels
bug Something isn't working enhancement New feature or request funding needed
Milestone

Comments

@imanshafiei540
Copy link

Context:

Let's say I have an STAC item with the fllowing assets object:

{
  "id": "ID",
  ...
  "assets": {
    "FIRST_COG_FILE": {
      "href": "s3://something"
    },
    "SECOND_COG_FILE": {
      "href": "s3://something"
    } 
  }

Current behavior:

When I open the ITEM page, I can see the FIRST_COG_FILE and the SHOWN badge (Green one), but I cannot see the Show on map button for the SECOND_COG_FILE asset.

image

image

Let me know if you need more information/clarification.

Expected behavior:

I should be able to change the SHOWN asset even if they're using the s3 protocol.

I'll be happy to work on this (I've already done something) if you're also agreed on the expected behavior.

Thanks.

@m-mohr
Copy link
Collaborator

m-mohr commented Sep 28, 2023

STAC Browser can't read from S3:// urls. What you are probably seeing is the thumbnail. I assume there's a bug in labelling the right asset with the "shown" badge. I'll wait with a fix for the OpenLayers migration unless someone has funding to fix this specifically.

@m-mohr m-mohr added the bug Something isn't working label Sep 28, 2023
@m-mohr m-mohr added this to the 3.2.0 milestone Sep 28, 2023
@imanshafiei540
Copy link
Author

Thanks for getting back to me.

Correct me if I'm wrong, but I can see that the stac-layer is generating (Converting the COG file) an image on the map using for example this URL:

https://tiles.rdnt.io/tiles/8/79/157@2x?url=s3://venus-l2a-cogs/25MAYO/2017/11/28/VENUS-XS_20171128-143815-000_L2A_25MAYO_D/VENUS-XS_20171128-143815-000_L2A_25MAYO_C_V3-0_FRE_B1.tif

And it's showing the result. So it isn't intentional?

@m-mohr
Copy link
Collaborator

m-mohr commented Sep 28, 2023

If it does, it's not intentional. Also, your link errors for me.

@imanshafiei540
Copy link
Author

Oh, I see.
First, I want to confirm that you can also see the issue. Do you have access to this URL?

https://radiantearth.github.io/stac-browser/#/external/venus-l2a-cogs.s3.us-east-1.amazonaws.com/ALESUND/2023/04/27/VENUS-XS_20230427-124359-000_L2A_ALESUND_D/VENUS-XS_20230427-124359-000_L2A_ALESUND_D_STAC.json?.language=en

The quality mask asset is being shown. Could you please confirm that? If not, I need to look for another way to reproduce this for you.

Thanks.

@m-mohr
Copy link
Collaborator

m-mohr commented Sep 30, 2023

I see the issue via the url. It indeed shows the quality mask through the pre-defined tile server.

The issue is STAC Browser can't know upfront whether a tile server is used and what the capabilities of the tile server are. I wasn't aware until today that the pre-defined one supports s3. And if you configure another one, I don't know what that server supports.

I'm not sure how to fix this (apart from not selecting a s3 image to be shown by default, but that is the opposite of what you want.) [that's a bug and will be "fixed" in 3.2.0]

Maybe we need some kind of "can be shown on map" function in the config for the tile servers? Than everyone can implement that on their own. This may need also some code-changes in ol-stac and stac-layer. [that's an enhancement and needs funding]

@m-mohr m-mohr added enhancement New feature or request funding needed bug Something isn't working and removed bug Something isn't working labels Sep 30, 2023
@DanielJDufour
Copy link
Collaborator

I might be wrong here. (I haven't been keeping up with all the updates as I should). But doesn't tile-layer check if the tile server supports S3 by basically just checking if it can load the image?

@m-mohr m-mohr modified the milestones: 3.2.0, 3.3.0 Mar 15, 2024
@m-mohr m-mohr modified the milestones: 3.3.0, 3.4.0 Aug 9, 2024
@m-mohr m-mohr modified the milestones: 3.4.0, 3.5.0 Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request funding needed
Projects
None yet
Development

No branches or pull requests

3 participants