hongfaqiu / TIFFImageryProvider

Load GeoTIFF/COG(Cloud optimized GeoTIFF) on Cesium
https://tiff-imagery-provider.opendde.com/?panel=layer
MIT License
52 stars 10 forks source link

ArrayBuffer Exception #28

Closed aspandaburkut closed 1 week ago

aspandaburkut commented 3 months ago

Thanks for the library @hongfaqiu. I have an issue that when i try to upload tiff file, it does not show up and then a few seconds later RangeError: Array buffer allocation failed error is thrown. How can i fix this?

image

hongfaqiu commented 3 months ago

@aspandaburkut Is the TIFF file you added a native TIFF file, and what is its size? This error may occur because the resolution of the added TIFF image is too high, exceeding the memory that the browser can allocate. It is suggested to convert it to COGTIFF and then try adding it again.

aspandaburkut commented 3 months ago

@hongfaqiu I'm exporting data from SASPlanet as both GeoTIFF and COGTIFF format. My resolution is 264193x102094 for 15 zoom levels and I use ZIP compression of 6 levels and number of tiles is 1033x400 (413200). When I used 18433x21249 pix and 73x84 (6132) tiles I saw the layer but it was lagging during zoom in and out process.

hongfaqiu commented 3 months ago

@aspandaburkut Could you provide a sample data? I will fix this issue when I have time next week.

aspandaburkut commented 3 months ago

@hongfaqiu Here it is sample data. But it is only there for 1 week. "https://we.tl/t-QPjnlFZtHT"

hongfaqiu commented 3 months ago

@hongfaqiu Here it is sample data. But it is only there for 1 week. "https://we.tl/t-QPjnlFZtHT"

Copy that!

aspandaburkut commented 3 months ago

Hi @hongfaqiu, did you have any time for fixing the issue? I've been through a deep searching phase but I couldn't make any progress. Thank you in advance for your return.

hongfaqiu commented 3 months ago

@aspandaburkut I'm really sorry, but I've been too busy this week and haven't had a chance to look at this question yet. I'll try to make time later today to take a look at it.

aspandaburkut commented 3 months ago

Okey, thank you for interest @hongfaqiu . I'm waiting for your response, have a good day.

hongfaqiu commented 3 months ago

Okey, thank you for interest @hongfaqiu . I'm waiting for your response, have a good day.

@aspandaburkut I'm sorry for the inconvenience. Today has been very busy for me, and I have to postpone once again. Perhaps next week I will have some time. The data you sent me last time is on my work computer, and I am unable to debug it from home.

aspandaburkut commented 3 months ago

Thank you, I've sent sample data again. You can redownload when you are free. The link is "https://we.tl/t-ZTkil9Mq7w"

hongfaqiu commented 3 months ago

@aspandaburkut I opened these two TIFF files in QGIS (which took several minutes), and it turns out they are both raster images.

image I suggest publishing the results of image registration like these as TMS (Tile Map Service) tiles to achieve the fastest request speed.

If you need to load these two TIFF files on the web, I recommend converting them to COG (Cloud-Optimized GeoTIFF) format and adjusting the tileSize to be below 1024. The error you encountered is likely due to the current low number of levels and the oversized tileSize.

aspandaburkut commented 3 months ago

@hongfaqiu Thank you for helping, have a nice day.