US-GHG-Center / ghgc-backend

Backend services for Green House Gas Center
Other
0 stars 1 forks source link

Deploy rio-tiler 6.5.0 #72

Closed j08lue closed 6 months ago

j08lue commented 6 months ago

rio-tiler 6.5.0 should fix the issue that was introduced after 6.2.3.post1 and present until 6.4.7.

We need rio-tiler >= 6.4.4 to have accurate zonal statistics, so 6.5.0 is the version we should deploy.

Acceptance criteria

amarouane-ABDELHAK commented 6 months ago

A PR was submitted to deploy the new rio-tiler version https://github.com/US-GHG-Center/ghgc-backend/pull/73 to dev

j08lue commented 6 months ago

Tiling

Testing against https://dev.ghg.center/ghgcenter/api/raster, where 6.5.0 is deployed.

The pixel shifting issue (https://github.com/US-GHG-Center/ghgc-architecture/issues/212) is absent.

https://deploy-preview-349--ghg-demo.netlify.app/exploration?datasets=%5B%7B%22id%22%3A%22micasa-co2-flux-npp-m%22%2C%22settings%22%3A%7B%22isVisible%22%3Atrue%2C%22opacity%22%3A100%2C%22analysisMetrics%22%3A%5B%7B%22id%22%3A%22mean%22%2C%22label%22%3A%22Average%22%2C%22chartLabel%22%3A%22Average%22%2C%22themeColor%22%3A%22infographicB%22%7D%5D%7D%7D%2C%7B%22id%22%3A%22total-ch4%22%2C%22settings%22%3A%7B%22isVisible%22%3Atrue%2C%22opacity%22%3A100%2C%22analysisMetrics%22%3A%5B%7B%22id%22%3A%22mean%22%2C%22label%22%3A%22Average%22%2C%22chartLabel%22%3A%22Average%22%2C%22themeColor%22%3A%22infographicB%22%7D%5D%7D%7D%5D&date=2016-11-30T23%3A00%3A00.000Z&search=4dv

There are still some jumps in resolution, I assume as we switch between overviews, for example between zoom level 3 and 4, but that is as expected, currently

image image

Zonal statistics

Applying an intermediate equal-area projection gives more accurate results for npp assets from the casagfed-carbonflux-monthgrid-v3 collection than using the native (WGS84) CRS, agreeing well with the benchmark:

image

Confirming that intermediate reprojection works as expected.

j08lue commented 6 months ago

So I can confirm that 6.5.0 has the accurate statistics from 6.4.7 that we approved and at least as accurate and sharp tiles as 6.2.3.post1.

So this is good to deploy.

j08lue commented 6 months ago

I see deployment to production is complete, so I visually inspected tile quality on https://staging.earth.gov/ghgcenter

https://deploy-preview-349--ghg-demo.netlify.app/exploration?datasets=%5B%7B%22id%22%3A%22total-ch4%22%2C%22settings%22%3A%7B%22isVisible%22%3Atrue%2C%22opacity%22%3A100%2C%22analysisMetrics%22%3A%5B%7B%22id%22%3A%22mean%22%2C%22label%22%3A%22Average%22%2C%22chartLabel%22%3A%22Average%22%2C%22themeColor%22%3A%22infographicB%22%7D%5D%7D%7D%2C%7B%22id%22%3A%22micasa-co2-flux-npp-m%22%2C%22settings%22%3A%7B%22isVisible%22%3Atrue%2C%22opacity%22%3A100%2C%22analysisMetrics%22%3A%5B%7B%22id%22%3A%22mean%22%2C%22label%22%3A%22Average%22%2C%22chartLabel%22%3A%22Average%22%2C%22themeColor%22%3A%22infographicB%22%7D%5D%7D%7D%5D&date=2016-11-30T23%3A00%3A00.000Z&search=4dv&aois=%5B%5D&dateRange=

and also the zonal statistics from https://ghg.center/api/raster agree with our benchmark again

image

I also verified that zonal averages for a non-rectangular geometry agree between dev and production.

This verifies that the same performance we validated on dev is now available in production, so we are good to move forward.

It would be great to do further testing of the zonal statistics against other software and for various edge cases. We should follow up with that after the release. (#FurtherResearchIsNeeded)