This page features troubleshooting questions students have asked for Remote Sensing Foundations Module 7: Human Dimensions: Urban Environments, Monitoring Human Activity, Pollution, Heat Islands and Humanitarian Applications
A1.2 Render Gif Animation, Q & A Question: For some reason, my GIF is not rendering in the console for A1.2. It seems to run fine, but has the “broken” image symbol. It seems so simple, but yet it’s not working. Am I missing something?
Answer: The code with this dataset would have worked but for two issues. 1) you chose your start date before the start date of the image collection and 2) your band names (“SR_B4” etc) do not match the names of the bands in this particular sensor. Apparently, with the dataset that suggested by your classmate, the names matched (as well as the dates) so it ran! Your code ran when the start date was changed to 2013 and the bands were renamed to “B4”, “B3” and “B2.”
A1.2 Question about NLCD urban classification and layer error
Question:Working through Tutorial A1.2 was going well until I got to page 37 and the NLCD urban classification. The time-series animation worked fine, as did the MODIS and CORINE urban classifications. Rather than starting a new code for each one, I just commented it out, but that shouldn’t be a problem. So everything was commented out except the NLCD urban classification section. When I ran it I got an error in the Console: NLCD 2016: Layer error: Expression does not evaluate to an image. I am thinking that it is not liking the ‘system:index’ name in the filter statement. Is this an error in the book?
Answer: It seems there is a mistake in tutorial here. The NLCD dataset that it tells you to use had been depracated. The code works with this dataset instead: ee.ImageCollection(“USGS/NLCD_RELEASES/2019_REL/NLCD”)
A1.5 Error, Q & A
Question:There’s a link in A1.5 that I can’t get to work the way it’s supposed to – We’re supposed to be able to add the toolbox to our GEE account using a link on pg 110, but it’s not working for me. I clicked the link, then tried to run the code, and got this error message (see photo). Has anyone else had the same problem or found a way to fix it?
I get the message: Cannot find required script: projects/gee-edu/book:modules/Landsat_LST.js Would love to hear how to get around and/or fix this issue
This is another book repository issue. I found the link.
Paste this into a browser and go there. It should open up your GEE account and under the Reader folder you should be able to find the book repo now…
GIF script follow-up, Q & A
Question:Here’s my GIF script. I think I have it right and blackout panels in the animation I assume are a sensor issue. I did try various dates and cloud cover percentages too. You can definitely see Oklahoma City during the animation. Please confirm.
// Filter collection for Oklahoma City metro. var collection = LS8 .filterBounds(OKCmetroArea) .filterDate(‘2010-01-01’, ‘2020-12-31’) .filter(ee.Filter.lte(‘CLOUD_COVER_LAND’, 3)); // Define GIF visualization. var gifParams = { bands: [‘SR_B4’, ‘SR_B3’, ‘SR_B2’], min: 0.07 * 65536, max: 0.3 * 65536, region: OKCmetroArea, framesPerSecond: 15, format: ‘gif’ }; // Render the GIF animation for OKC in the console.print(ui.Thumbnail(collection, gifParams));
Answer: So the dataset that I think you were using did not have dates or band names that matched your code (that is if you were using Landsat 8). If you use Landsat 7, I see what you are talking about with the black boxes. Essentially, when we are building the gif, our code is telling GEE to loop through all of the images that touch our geometry. Oklahoma City is big enough that multiple Landsat tiles touch it. In order to have the gif loop through city scenes without showing individual tiles, you’d have to first create a spatial composite and then clip the composite(s) to your geometry.
Seattle, Time Series Animation
Question: For our YD Time Series Animation of Urbanization assignment this week, I choose Seattle because I have always wanted to visit this region of Washington and it seems like Seattle is a city that has seen some growth so I wanted to explore the amount of urbanization. I feel like I did the code correctly by using NLCD for 2001 and 2016, but I’m not sure how to switch the code for getting a boundary around Seattle instead of Chicago because the ee.FeaatureCollection is based on ‘projects/gee-book/assets/A1-2/Chicago’ as shown below. I tried to just do a boundary polygon so hoping that works instead.
// Calculate the total area of the ‘Developed high intensity’ class (24) in Seattle. var Seattle = ee.FeatureCollection(| ‘projects/gee-book/assets/A1-2/Chicago’);
I also thought I had my area calculation set up correctly, however, area is showing up as 0 for both years because the geometry is referencing “Seattle” which is linked to the Feature Collection for Chicago (per above) in my clipped area for Seattle. When I change geometry to ‘geometry: seattleBoundary.geometry ( ),’ which is my boundary polygon for Seattle, I get an error saying Line 34: seattleBoundary.geometry is not a function
Would love to hear how to work around this or if there is code I can use to get the boundary around Seattle instead that gets the area calculation to run.
Answer: Try going to this link. It should open up the book repository in your scripts, in the “Reader” folder. There you should be able to see the file :projects/gee-book/assets/A1-2/Chicago. In your script you may have to update the filepath for the script to be able to navigate there, but I’m not sure. On my GEE it connects to the file correctly. Let me know if it works for you!