-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unnecessary Resampling leading to poor pixel positioning #30
Comments
@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 |
@staffordsmith83 I spent a day solving this problem, and now:
|
That's great news thanks for your hard work on this, I'll let the Terria team know! |
@staffordsmith83
The implementation approach is as follows:
The current issues are:
The optimization plan is:
|
@staffordsmith83 @nf-s, a huge thanks to the wonderful new contributor @TheMrCam for offering the resampling method for bilinear. Thank you so much for your hard work, and the functionality of this library has become even more splendid. How delightful it is! But there are still some problems (unusual)
The test tiff is here #33 (comment) |
GPU based resampling supported, please check the latest version @staffordsmith83 |
Thanks @hongfaqiu this is great work! Just to let you know, the latest terria release incorporates your TIFFImageryProvider, we had to fork the code to make some modifications to suit our custom fork of cesium, but it is essentially your code that powers our COG support. Ive now left the project, but want to thank you very much for your contribution! I will alert the existing team to this new version |
@staffordsmith83 I have noticed that terriajs seems to have opened a rather different branch. The main branch fixed some obvious bugs some time ago. Therefore, I would like to remind you. |
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:
But TIFFImageryProvider renders it like this:
Note the following:
Note in a more zoomed in example, how the pixels are clearly not square. This is TIFFImageryProvider in TerriaJS:
This is TIFFImageryProvider in your online demo:
Whereas the tru data is square pixels (shown in QGIS):
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-L141
If you like, we have put more details on the perceived error in out PR here: TerriaJS/terriajs#7209
The text was updated successfully, but these errors were encountered: