Module 6: Terrestrial Applications: Forest Degradation and Deforestation, Active Fire Monitoring, and Wildlife Applications

This page features troubleshooting questions students have asked for Remote Sensing Foundations Module 6: Terrestrial Applications: Forest Degradation and Deforestation, Active Fire Monitoring, and Wildlife Applications

A3.5 Error Help, Q & A

Question: I am working through the second GEE tutorial this week and am stuck because I keep getting the following error message:

“Cannot find required script: projects/gee-edu/book:A3.5 Forest Degradation and Deforestation/palettes”

I have made sure that this types exactly as the textbook shows and have also tried just copy/pasting and both methods bring me the same error message. Not sure how to fix this any help is appreciated!

Answer: I will look into this – This seems like a textbook error. I’ll write an announcement to the class and post here when I have a fix!

Try to cut and paste this at the top of your code script:

var ndfiColors =
‘FFFFFF,FFFCFF,FFF9FF,FFF7FF,FFF4FF,FFF2FF,FFEFFF,FFECFF,FFEAFF,FFE7FF,’+
‘FFE5FF,FFE2FF,FFE0FF,FFDDFF,FFDAFF,FFD8FF,FFD5FF,FFD3FF,FFD0FF,FFCEFF,’+
‘FFCBFF,FFC8FF,FFC6FF,FFC3FF,FFC1FF,FFBEFF,FFBCFF,FFB9FF,FFB6FF,FFB4FF,’+
‘FFB1FF,FFAFFF,FFACFF,FFAAFF,FFA7FF,FFA4FF,FFA2FF,FF9FFF,FF9DFF,FF9AFF,’+
‘FF97FF,FF95FF,FF92FF,FF90FF,FF8DFF,FF8BFF,FF88FF,FF85FF,FF83FF,FF80FF,’+
‘FF7EFF,FF7BFF,FF79FF,FF76FF,FF73FF,FF71FF,FF6EFF,FF6CFF,FF69FF,FF67FF,’+
‘FF64FF,FF61FF,FF5FFF,FF5CFF,FF5AFF,FF57FF,FF55FF,FF52FF,FF4FFF,FF4DFF,’+
‘FF4AFF,FF48FF,FF45FF,FF42FF,FF40FF,FF3DFF,FF3BFF,FF38FF,FF36FF,FF33FF,’+
‘FF30FF,FF2EFF,FF2BFF,FF29FF,FF26FF,FF24FF,FF21FF,FF1EFF,FF1CFF,FF19FF,’+
‘FF17FF,FF14FF,FF12FF,FF0FFF,FF0CFF,FF0AFF,FF07FF,FF05FF,FF02FF,FF00FF,’+
‘FF00FF,FF0AF4,FF15E9,FF1FDF,FF2AD4,FF35C9,FF3FBF,FF4AB4,FF55AA,FF5F9F,’+
‘FF6A94,FF748A,FF7F7F,FF8A74,FF946A,FF9F5F,FFAA55,FFB44A,FFBF3F,FFC935,’+
‘FFD42A,FFDF1F,FFE915,FFF40A,FFFF00,FFFF00,FFFB00,FFF700,FFF300,FFF000,’+
‘FFEC00,FFE800,FFE400,FFE100,FFDD00,FFD900,FFD500,FFD200,FFCE00,FFCA00,’+
‘FFC600,FFC300,FFBF00,FFBB00,FFB700,FFB400,FFB000,FFAC00,FFA800,FFA500,’+
‘FFA500,F7A400,F0A300,E8A200,E1A200,D9A100,D2A000,CA9F00,C39F00,BB9E00,’+
‘B49D00,AC9C00,A59C00,9D9B00,969A00,8E9900,879900,7F9800,789700,709700,’+
‘699600,619500,5A9400,529400,4B9300,439200,349100,2D9000,258F00,1E8E00,’+
‘168E00,0F8D00,078C00,008C00,008C00,008700,008300,007F00,007A00,007600,’+
‘007200,006E00,006900,006500,006100,005C00,005800,005400,005000,004C00’;
exports = {
ndfiColors : ndfiColors
};

EVI Calculation for Landsat 7, Q & A

Question: Last week I tried multiple methods to calculate EVI for my EVI image. Not sure any of them were right because the results all looked different and not quite right to me.

But one of the big questions lingering for me is what to use to calculate EVI for Landsat 7. When I used the formula that was in the lecture and generally suggested in an Internet search, the results were way off. Then I found a Landsat 7 specific equation for EVI here. It suggested using: EVI2=2.5*((NIR-Red)/(NIR+2.4*Red+1))

Are there different methods to get EVI for each satellite dataset? Does this method address the issue raised here about the reduced image not having a projection and needing to set the scale? Or something else?

Answer: First, I think your code looks good. But as far as Landsat 7 goes, after following the link to the research gate link you gave, I do believe there are multiple ways to get EVI for multiple datasets and it depends largely on what dataset you are working with, some of them are just shortcuts as well.

It may be easier to stick with exactly what the lecture says to do with EVI and then try working out the kinks through there instead of using the reduced image way. This way you can work backwards to try to get it resolved if it’s still not looking right.

Question (part 2): Thanks very much for this. I’ve kind of given up on it for now. I was unable to get it to work using the method in the lecture — the scale was wrong (as best I can understand from what I read) as applied to Landsat 7. So the range I got for EVI was much much greater than -1 to 1. And I tried a bunch a stuff that didn’t work, but this method I found worked — to the extent that it was the only way I got a resulting range for EVI that made sense. I’ve given up on it though because I’m not sure it’s correct and figuring it out will take me a lot more time. Having already put in over 20 hours on that tutorial, I had to move on. I do hope to learn it someday. I could probably use it in my project, since I’m reliant on Landsat 7 there, too (Landsat 8 does not include the full period that I’m interested in).

Answer part 2: Yes, there are numerous ways to calculate EVI, depending on the dataset and bands. The difference between using filter and applying a reducer for median is mainly that you wouldn’t want to use median( ) when you are filtering your collection if the collection or area of interest is very big because you might run into memory errors on GEE. If you look here, you will see that both methods are fine and yield similar results (there is always some error associated) , but using .median( ) is a shortcut, and not advised when datasets are large. For the ways that you and the tutorial calculated EVI, I agree with Alejandro in terms of which to use here. I think NDVI is also going to be a better index for you to use for crops for your project. I hope this helps!

Skip to toolbar