GeoTIFF / georaster-layer-for-leaflet

Display GeoTIFFs and soon other types of raster on your Leaflet Map
https://geotiff.github.io/georaster-layer-for-leaflet-example/
Apache License 2.0
303 stars 58 forks source link

Error: Unknown compression method identifier: 50000 #151

Open maphew opened 1 month ago

maphew commented 1 month ago

Describe the bug

Blank basemap-only page when attempting to load ZSTD compressed cloud optimized geotiffs. Browser dev console says "Error: Unknown compression method identifier: 50000".

Sample image and gdalinfo report attached. Excerpt:

Metadata: TIFFTAG_SOFTWARE=GDAL 3.8.1e (3080114) (4.6.0;1710;3.0.1;2.1.6;;0x10302;5.4.5;), PROJ 9.3.1 (EPSG.VERSION=v10.098;EPSG.DATE=2023-11-24;ESRI.VERSION=ArcGIS Pro 3.2;ESRI.DATE=2023-11-02;PROJ_DATA.VERSION=1.16;) AREA_OR_POINT=Area Image Structure Metadata: LAYOUT=COG COMPRESSION=ZSTD INTERLEAVE=PIXEL PREDICTOR=2

To Reproduce

  1. Put attached html and sample-cog.tif somewhere appropriate, edit paths as needed.
  2. Load page
  3. Open web developer tools (F12)
  4. Switch to console

image

Expected behavior The geotiff would load and display.

Additional context

DanielJDufour commented 1 month ago

Hi, @maphew . Thank you for reporting this! Unfortunately, I'm a bit stretched for time at the moment (some projects wrapping up at the end of the calendar year). I think the issue is that georaster is using an older version of geotiff.js, but unfortunately rebuilding the georaster package with this new version has had some issues (different build tools used by georaster expecting conflicting versions of nodejs).

The good news is there is light at the end of the tunnel. I've also been working on a major re-write of georaster-layer-for-leaflet and georaster, which should solve these types of issues.

Just in case it works, I'd also recommend trying the newest pre-release version of georaster-layer-for-leaflet by npm install georaster-layer-for-leaflet@next

DanielJDufour commented 1 month ago

@maphew , would it be alright with you if I added this geotiff to this test data repo? (https://github.com/geotiff/test-data)

It's baseline test data that's used in a whole range of projects in the JS geotiff ecosystem and would have more libraries making sure it works with that geotiff.

maphew commented 1 month ago

Thanks for having a look, and yes you can use the image for the test data repo. I totally understand making it through dance of time, attention, and worthy projects is not easy!