Open staffordsmith83 opened 1 week ago
@staffordsmith83 I'm glad to see you continue to support TIFF in Terriajs. This issue is the same as #18 #22 , and I've been quite busy lately. I'll try to fix this issue next week, which seems to be related to resampling
Thats great, thanks @hongfaqiu, @nf-s watch this ticket
Dear Hongfaqiou,
there seems to be an issue with how TIFFImageryProvider maps the tiff values to the canvas. This occurs even when re-projection is not needed, e.g. for cogs in EPSG:4326 and EPSG:3857.
Using this Climate Data cog as an example (it is in EPSG:4326): https://nex-gddp-cmip6-cog.s3-us-west-2.amazonaws.com/daily/GFDL-CM4/ssp585/r1i1p1f1/pr/pr_day_GFDL-CM4_ssp585_r1i1p1f1_gr1_2015_01_25.tif
The data should look like this:![image](https://github.com/hongfaqiu/TIFFImageryProvider/assets/7980991/c0fe92b6-3979-4162-a39d-d25048c1db1d)
But TIFFImageryProvider renders it like this:![image](https://github.com/hongfaqiu/TIFFImageryProvider/assets/7980991/998ff468-3272-40bf-8f36-14cdead8c5a4)
Note the following:
Note in a more zoomed in example, how the pixels are clearly not square. This is TIFFImageryProvider in TerriaJS:![image](https://github.com/hongfaqiu/TIFFImageryProvider/assets/7980991/1e7ec6b4-0923-40a5-8adf-28aaa24ff64e)
This is TIFFImageryProvider in your online demo:![image](https://github.com/hongfaqiu/TIFFImageryProvider/assets/7980991/4c1946e7-b53c-4a47-8c96-f8a458f01d66)
Whereas the tru data is square pixels (shown in QGIS):![image](https://github.com/hongfaqiu/TIFFImageryProvider/assets/7980991/2e92c516-3cb2-4974-b0e3-0947a76bad9a)
Please note, to be able to see what is happening at the pixel level we have changed the Cesium settings for
_defaultMagnificationFilter
and_defaultMinificationFilter
to remove the blurring: https://github.com/TerriaJS/terriajs/blob/13fa4cfaabecdc82dff749836a1dcef602b0a1ae/lib/Models/Catalog/CatalogItems/CogCatalogItem.ts#L140-L141If you like, we have put more details on the perceived error in out PR here: https://github.com/TerriaJS/terriajs/pull/7209