Comments (3)
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cogviewer.