Geographic Information Systems Asked on December 3, 2020
I am trying to perform various operations on MODIS datasets in google earth engine.
Every operation I try to perform is prevented by the requirement in code to select a band to work with.
This collection: MODIS/MCD43A4_006_NDVI’
has no bands. It shows up in the console as
bands: [] when I perform any operation that requires selecting or manipulating bands.
part of the code I’ve tried is this:
.filter(ee.Filter.calendarRange(startyear,endyear,'year'))
.filter(ee.Filter.calendarRange(startmonth,endmonth,'month'))
.sort('system:time_start')
// .filterBounds(ROI)
.select('NDVI');
I can’t select NDVI, which I need later in the code, because I can’t select anything with this dataset–there are no bands. I can’t add a band, since the information is already there, NDVI and day of year, but apparently not stored in a band.
How can I use this dataset in operations that require selection of a band?
The bands
field present when printing an image collection does not indicate exactly what bands the images in that collection have. It only specifies that, if any bands are listed there, all images in the collection do have those named bands. Each image may have more bands than the ones listed. (The bands
information is only present in certain simple cases such as examining an image asset.)
You can look at each image within a collection to see what bands that image has:
Similarly, from code:
print(collection.first().bandNames()); // will print ["NDVI"]
Answered by Kevin Reid on December 3, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP