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

Native support for GeoTiffs and COGs #38

Closed
m-mohr opened this issue Aug 29, 2019 · 4 comments · Fixed by #204
Closed

Native support for GeoTiffs and COGs #38

m-mohr opened this issue Aug 29, 2019 · 4 comments · Fixed by #204
Assignees
Labels
enhancement New feature or request viewer
Milestone

Comments

@m-mohr
Copy link
Member

m-mohr commented Aug 29, 2019

Add native (browser-based, serverless) support for GeoTiffs and COGs.

@m-mohr m-mohr added the enhancement New feature or request label Aug 29, 2019
@m-mohr m-mohr added this to the v0.4-rc.1 milestone Aug 31, 2019
@m-mohr m-mohr modified the milestones: v0.4.2, v0.5.0 Sep 16, 2019
@m-mohr
Copy link
Member Author

m-mohr commented Mar 26, 2020

Related: cogeotiff/www.cogeo.org#36

@m-mohr m-mohr modified the milestones: v0.5.0, v1.0 Mar 26, 2020
@m-mohr
Copy link
Member Author

m-mohr commented Jul 28, 2021

So I've experimented a bit with the new experimental support for COGs that is available for OpenLayers here openlayers/openlayers#12008:

Here's how to link against the branch: openlayers/openlayers#12008 (comment)

One issue that came up is that the CORS policy for the GeoTiffs needs to allow the HTTP range requests at the back-end side:
Access to fetch at 'https://openeo-dev.vito.be/openeo/1.0/jobs/2abbf817-a558-41e5-a81c-3b2acfef5852/results/.../openEO.tif?expires=1628068876' from origin 'http://localhost' has been blocked by CORS policy: Request header field range is not allowed by Access-Control-Allow-Headers in preflight response.

After disabling CORS in Chrome (chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security) I ran into issues with projections (i.e. UTM not being handled by default in OL). So after installing proj4 and registering the corresponding projection, it requested the file, but then Chrome crashed a could of times or showed nothing. Not sure whether that is because I did not set the extent? Anyway, the example from OL uses an extent and no-data value, which we should pass from STAC, which would likely lead to a STAC extension for OL.

This leads me to the conclusion that this has quite a bit of small pitfalls when implemented for "all kinds of" results and thus needs proper support from back-ends, incl. CORS and good STAC metadata (e.g. including projection as WKT, no-data value, default visualization(?), bands, ...)

Next attempt: stacLayer, which is currently in development for Leaflet.

@jdries
Copy link

jdries commented Aug 4, 2021

Nice experiment!
Note that I would indeed expect problems with reprojection. I would propose to go for the GEE solution there, and simply only support this if data is generated in web mercator. (GEE does this by default, in openEO, the user will have to reproject more explicitly.) If that would make things work, (in leaflet or OL), we would have a nice demo of what is possible with current open source options.

@m-mohr
Copy link
Member Author

m-mohr commented Aug 4, 2021

Reprojection doesn't seem to be a too big problem, depending on which library you use. For many projections, it works out-of-the-box in the Leaflet implementation. I've experimented with the stacLayer plugin a bit in the last few days (for STAC Browser) and several projections worked flawlessly in my tests. So this seems more like an OpenLayers issue right now, which one could probably solve, but let's get them to a more mature state first. If work continues in such a good way for stacLayer/Leaflet, I have enough reasoning to switch back to Leaflet in the Web Editor and then we can give it another try. Let's see... (and there's always still the option to set up a tile server, too).

@m-mohr m-mohr added the viewer label Oct 20, 2021
@m-mohr m-mohr modified the milestones: v1.0, v0.11 Jan 5, 2022
@m-mohr m-mohr self-assigned this Feb 4, 2022
m-mohr added a commit that referenced this issue Apr 13, 2022
@m-mohr m-mohr linked a pull request Apr 14, 2022 that will close this issue
m-mohr added a commit that referenced this issue Apr 14, 2022
* Restructure Mapping components, new area chooser #212, COG experiments
* Remove swipe control
* Refactored the Viewer environment and components, includes basic support for GeoJSON #226, GeoTiff #38, CSV #224 and WMTS #31
* Charts for tables #224
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request viewer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants