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
283 stars 57 forks source link

How large is too large? #117

Closed efreethy closed 1 year ago

efreethy commented 1 year ago

The docs state "Loads large geotiffs greater than a hundred megabytes".

I have some heavy COG geotiffs weighing in at 500 megabytes. Will this tool support that?

DanielJDufour commented 1 year ago

hey, great question! It should work okay as long as the COG has a low-res overviews for when you are zoomed out.

DanielJDufour commented 1 year ago

let me know if you run into any problems. there's some other issues that can appear when dealing with really large geotiffs. for example if you are using a floating point bit depth, decompressing a tile can lead to memory and max array length issues, so you may need to look at bit depth and tile size, too.

efreethy commented 1 year ago

You are incredibly helpful thank you!

as long as the COG has a low-res overviews for when you are zoomed out.

Is there a recommended approach here? Currently using gdalwarp with mostly defaults

for example if you are using a floating point bit depth, decompressing a tile can lead to memory and max array length issues

I will keep that in mind - working with 1 band of Float32, however it only needs to represent values between 0 and 5.

efreethy commented 1 year ago

Using your library I was able to achieve this within minutes:

Screen Shot 2023-02-01 at 2 23 21 PM

You are a hero

DanielJDufour commented 1 year ago

glad to hear it! thanks for the kind words :-)

to answer your previous question, I think if you use gdalwarp with -of COG, you should be fine (see https://gdal.org/drivers/raster/cog.html)

Screen Shot 2023-02-01 at 6 36 35 PM