Giter Site home page Giter Site logo

Fails to load some COGs about cogviewer HOT 3 CLOSED

giswqs avatar giswqs commented on May 20, 2024 1
Fails to load some COGs

from cogviewer.

Comments (3)

mykolakozyr avatar mykolakozyr commented on May 20, 2024 1

Thanks, @giswqs! And thanks for sharing links.
I'll take a look, I had some issues with specific CORS settings on the bucket. It could be the case. When there is a tiler in between, as it is implemented in @vincentsarago viewer, then it's solved.

The implementation of the current viewer does not have any tiler in between, so FE reads COG directly.

from cogviewer.

robmarkcole avatar robmarkcole commented on May 20, 2024 1

I believe there is issue with single-band cogs (tracking on GeoTIFF/georaster-layer-for-leaflet#16):

georaster-layer-for-leaflet:2 ERROR initializing GeoTIFFLayer pixelValuesToColorFn is a required option for single-band rasters

RE cors we resolved this by updating the bucket S3 CORS policy:

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "HEAD"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]

from cogviewer.

mykolakozyr avatar mykolakozyr commented on May 20, 2024 1

Hey @robmarkcole, thanks for sharing that!
When I organize a bucket to share COGs, I do use those CORS settings as well. I believe in the case of the links shared by @giswqs, CORS settings are different.
The HTML page that is added to Streamlit app as a component returns the following error when run locally:
Access to fetch at 'https://opendata.digitalglobe.com/events/california-fire-2020/pre-event/2018-02-16/pine-gulch-fire20/1030010076004E00.tif' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

As a summary:

  • This implementation of the viewer renders COG directly on a browser with no layer in between (like tiler). Therefore, this issue would happen once the bucket settings do not allow CORS.

I don't consider adding any tiler to the viewer at this moment based on the whole concept of COG, so considering closing the issue.

from cogviewer.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.