IndigoWizard / IndigoWizard/mega-port-environment
How to mosaick two raster images (NDVI and NDWI) as one layer in GEE? (Python)
- Dominant language
- HTML
- Stars
- 7
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### Important
- Don't forget to check the [CONTRIBUTING.md](https://github.com/IndigoWizard/mega-port-environment/blob/main/.github/CONTRIBUTING.md)
- This issue is related to the [feature/imagery-analysis](https://github.com/IndigoWizard/mega-port-environment/tree/feature/imagery-analysis) branch and so should the PR come from it (or make a new branch with prefix Imagery-) and it shall be merged into the [develop](https://github.com/IndigoWizard/mega-port-environment/tree/develop) branch.
### Main issue gist
##### _(original question asked in here in [gis.stackexchange.com/questions/436671/](https://gis.stackexchange.com/questions/436671/how-to-mosaick-two-raster-images-ndvi-and-ndwi-as-one-layer-in-gee)_
I'm trying to mosaic **NDVI** and **NDWI** layers into one layer using **GEE** (_python_). This is for having land part of the map covered by the **NDVI** results and the water part of the map covered by **NDWI**. All that in one layer.
Any idea how to make this work?
See here for reference: [Google Earth Engine: Image Visualization](https://developers.google.com/earth-engine/guides/image_visualization)
#### Visuals
|Wanted result | Similar to |
|--|--|
|[![enter image description here][1]][1]|[![enter image description here][2]][2]|
|Mosaic of NDWI & NDVI as one layer|Mosaic of NDWI & False Color Composite |
### The problem
- Simply not working.
- No errors.
- "**Mosaic: NDWI x NDVI**" layer exist but not showing visuals.
- "**Clipped: NDWI x NDVI**" layer exist and only showing NDVI land part but in a grey scale colors, not original NDVI palette. The NDWI part of the mosaic is left out not showing.
|my actual results-1 (problem) | my actual results-2 (problem) |
|--|--|
|[![enter image description here][3]][3]|[![enter image description here][4]][4]|
|Clipped mosaic of NDWI & NDVI as one layer
Greyed out and no NDWI|Nothing shows on the map
(Mosaic of NDWI & NDVI not working)|
### My approach
I first followed the official tutorial in GEE documentation (see here: https://developers.google.com/earth-engine/guides/image_visualization#mosaicking).
- Managed to reproduce the results and successfully mosaicked NDWI & FCC (false color composite) as one image layer.
- I tried to mosaic NDWI and NDVI but no results show up in that layer. No errors of execution in the console tho.
[1]: https://i.stack.imgur.com/fIXbH.png
[2]: https://i.stack.imgur.com/rTJIz.png
[3]: https://i.stack.imgur.com/idkFK.png
[4]: https://i.stack.imgur.com/uufbB.png
Contributor guide
Research direction
Read CONTRIBUTING.md and inspect the feature/imagery-analysis branch and the merged pull request #15 first. Compare the Google Earth Engine image-visualization mosaicking guidance with the repository's NDVI and NDWI implementation. Done means one visible layer combines NDVI over land and NDWI over water with the intended palettes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100