geotiff.js icon indicating copy to clipboard operation
geotiff.js copied to clipboard

Release the olGeoTiff.js developed to modify the OpenLayers tileLoadFunction

Open PBrockmann opened this issue 5 years ago • 7 comments

As described in https://eox.at/2018/01/visualizing-geotiff-tiles-with-openlayers/, an olGeoTiff.js has been developped to modify the internal tileloadFunction so that OpenLayers does not request a regular PNG image rendered by the server but downloads the original GeoTIFF data.

Could this olGeoTiff.js be included in the geotiff.js project ? A small example of use would be great.

PBrockmann avatar Jan 10 '19 15:01 PBrockmann

Hi @PBrockmann, thanks for showing interest in the project.

geotiff.js itself should be agnostic in what context it is used, so I'm a bit hesitant to directly add the olGeoTiff.js source code it to the main repository itself. On the other hand I was planning to create a separate project to combine geotiff.js, OpenLayers and plotty.js, but have not yet come around to do it.

I think it is a good idea to add an examples directory to put stuff like this. I'll set one up, once I have some spare time.

For now, you can inspect the source code of the example directly.

There is also the COG-Explorer, where geotiff.js is used in conjunction with OpenLayers, maybe you can find some hints there.

I'll leave this issue open as a reminder to create the aforementioned examples.

constantinius avatar Jan 10 '19 15:01 constantinius

Ok thank you very much for this promising answer. +1 to have a olGeoTiff.js project by itself. I have already tested the code from the blog and coded a prototype to deliver high resolution products in a research lab environment. See http://webportals.ipsl.jussieu.fr/ScientificApps/dev/forge_patrick/eox/map_01.html

2 things are missing for me :

  • be able to go beyond the maximum native zoom level of the GeoTiff layer
  • having a olGeoTiff.js running with last OpenLayers release (ok with 4.6.5, not with 5.3.0)

So I will carefully look at this issue. Best regards

PBrockmann avatar Jan 10 '19 15:01 PBrockmann

COG-Explorer is too much integrated for my purpose. I prefer to design and code a personal app to have multiple synchronous slippy maps exposing different GeoTIFF layers (global at 90m resolution).

PBrockmann avatar Jan 10 '19 15:01 PBrockmann

Hi @PBrockmann, I love the idea of a separate repo for an olGeoTIFF.js layer that people can use in their own OL projects. We've talked about maybe moving https://geotiff.io to OL in the future and would definitely be interested in your developments. For what it's worth, here's a use of geotiff.js to display GeoTIFFs in Leaflet that we created: https://github.com/GeoTIFF/georaster-layer-for-leaflet/blob/master/README.md Let me know if you have any questions or if there's anyway I can help your endeavor :-)

DanielJDufour avatar Jan 10 '19 19:01 DanielJDufour

Hi @DanielJDufour, thank you for pointing the https://github.com/GeoTIFF/georaster-layer-for-leaflet repo. In my understanding, with it you can render only single GeoTIFF but not tiled ones (WMTS). In addition, the ability to have browser side all the values read from geotiff.js and rendered by plotty.js is extremely valuable since you can perform change on range/colours and make calculations on values. I am not sure to see this elsewhere, in the COG specifications for example. That is why, I would continue to be focused on the approach developed by EOX with the set of libraries: geotiff.js, plotty.js and olGeoTiff.js for the OpenLayers tileLoadFunction. Let me know if a similar approach is experimented by the Leaflet community.

PBrockmann avatar Jan 11 '19 12:01 PBrockmann

As I am completely neutral on the different web mapping librairies (OpenLayers, Leaflet), I have also submitted a ticket to the Mapbox GL JS project pointing the work made by EOX on geotiff.js and plotty.js (both with a MIT licence) See: https://github.com/mapbox/mapbox-gl-js/issues/7765

PBrockmann avatar Jan 11 '19 14:01 PBrockmann

Any news on getting this for openlayers 5.3 ?

ludvikbrodl avatar Sep 13 '19 09:09 ludvikbrodl