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
296 stars 58 forks source link

How to read tif overviews? #107

Open PostholerCom opened 2 years ago

PostholerCom commented 2 years ago

First, thank you for creating this!

I'm struggling to understand how this handles COG overviews. Using the demo as is, it appears to download the whole tif and not the appropriate overview regardless of zoom level. I've tried this on 2 different apache web servers, both with range request enabled and the .tif local to the web server.

Can someone clear the fog for me? Thanks!

jcphill commented 1 year ago

When I zoom in on https://geotiff.github.io/georaster-layer-for-leaflet-example/examples/load-cog-via-script-tag.html I see multiple partial fetches of 20170831_172754_101c_3b_Visual.tif and it definitely loads faster than downloading the entire raster. Some of the other demos fetch the entire .tif into an ArrayBuffer that is passed to parseGeoraster rather than just the URL.