DRAFT: Earth Engine layers refactor
See this PR for description: https://github.com/dhis2/maps-app/pull/3079
Next steps
- Review and merge the maps-gl dependency: https://github.com/dhis2/maps-gl/pull/548
- Update the maps-gl dependency in this PR (breaking change)
- Merge ee-dev into dev
- Test on dashboards
- Backport code to allow supported versions of DHIS2 Maps to use the latest version of maps-gl. The code changes needed are limited for backporting, see PR for v39: https://github.com/dhis2/maps-app/pull/3067
🚀 Deployed on https://pr-3158--dhis2-maps.netlify.app
A. Needs fixing:
-
[x] A.1. Weighted vs Unweighted zonal statistics, demo: https://code.earthengine.google.co.in/eaec4755bc65a42d7ca659b867deb81b
This is already an option in the EE layers definition, any reason to maintain unweighted approach?
-
[x] A.2. NULL values in EE pop rasters should be given default value (0) for mean, median, min, variance/std aggregation values to be correct, demo: https://code.earthengine.google.co.in/fc12f64f19a69b78abab0d3ec5f14b68
- Without
.unmask(0): pixels count: 24803 & mean: 69.5 - With
.unmask(0): pixels count: 86102 & mean: 20.2This option is not available in the EE layers definiton, we should add it with the possibility to specify the default value (default, no unmask).
- Without
-
[x] A.3. Update descriptions:
- [ ] i. Precipitation and Temperature layer description, url: https://developers.google.com/earth-engine/datasets/catalog/ECMWF_ERA5_LAND_MONTHLY_AGGR
- [ ] ii. Elevation layer url: https://developers.google.com/earth-engine/datasets/catalog/USGS_SRTMGL1_003
- [ ] iii. Indicate spatial resolution, temporal resolution and years of availability of datasets
-
[x] A.4. Resolve conflicts (just to make sure the list is complete):
- src/components/periods/PeriodSelect.js
- src/util/periods.js
B. Should we fix:
-
[ ] B.1. In GEE the "most standard" way to access an image date is via
properties.system:time_startandproperties.system:time_end(https://developers.google.com/earth-engine/glossary#system:time_start and https://code.earthengine.google.co.in/102149dc03364c21db922956db839d30) but the maps app is using other properties that are not "as standard" likeyear,monthorsystem:index. This could become a problem when we will want to use data source that do not have these periodicities or if we want to offer temporal aggregations. -
[ ] B.2. In GEE it is common to do operations between the bands of raster, for instance to get NDVI or the Relative Humidity it would be necessary. The current layers definiton model is not prepared for that.
-
[ ] B.3. Aggregation method, some of it is confusing, editing the text could help to highlight:
- [ ] i. This is spatial aggregation
- [ ] ii. This is going to affect the popup and the data table not the map (I find where it is positioned, between the dataset description and the unit 7 source in adding to the confusion),
- [ ] iii. Count is number of pixels in area (population)
-
[ ] B.4. Buffer:
- [ ] i. Being able to select buffer even if the features are polygons is confusing (https://github.com/dhis2/maps-gl/blob/7325abf3cd38b5344f6c751771da94a4208dc411/src/layers/EarthEngine.js#L143)
- [ ] ii. Size is affecting the way spatial aggregation is done, having it in style is confusing
-
[ ] B.5. When right clicking to get pixel values, options for different GEE layers seem reversed
C. Issues/improvements for data table:
- [x] C.1. Data table not working with Landcover layer
- [ ] C.2. Data table needs to be re-opened for Building footprints / Elevation aggs. to show
- [ ] C.3. Download data table as csv
- [ ] C.4. Highlight row in datatable when hovering feature on map (this happens the other way round)
D. Other:
- [ ] D.1. No tooltip when hovering over an OU with EE layer?
Potential new layers:
Finally I am adding a list of layers I am thinking could be interesting to add in the future and I tried to add but could not:
- [ ] Yearly temperature and precipitation
- [ ] TD (ie Dew Point) (
dewpoint_temperature_2m) - https://developers.google.com/earth-engine/datasets/catalog/ECMWF_ERA5_LAND_MONTHLY_AGGR#description - Ref: https://www.weather.gov/arx/why_dewpoint_vs_humidity - [ ] RH (ie Relative Humidity) = 100 exp[ (cb(TD-T)) / ((c+T)(c+TD)) ] with b=17.625 and c=243.04 (T & TD in Cº) (
temperature_2manddewpoint_temperature_2m) - https://developers.google.com/earth-engine/datasets/catalog/ECMWF_ERA5_LAND_MONTHLY_AGGR#description - Ref: https://earthscience.stackexchange.com/a/16575 - [ ] TROPOMI CO (
CO_column_number_density) - https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_S5P_OFFL_L3_CO#description - [ ] TROPOMI NO2 (
tropospheric_NO2_column_number_density) - https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_S5P_OFFL_L3_NO2#description - [ ] TROPOMI O3 (
O3_column_number_density) - https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_S5P_OFFL_L3_O3#description
:tada: This PR is included in version 100.6.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: