0

I'm following a tutorial (https://medium.com/google-earth/how-to-generate-wildfire-boundary-maps-with-earth-engine-b38eadc97a38) to create fire perimeters for the Maui wildfires. Everything seems to work for the GOES 18 data set, but for GOES 17 I'm getting this error "Error ImageCollection.getRegion: No bands in collection."

// Time and location of the fire.
var kincade = {
longitude: -156.35148732346414,
latitude: 20.792893439694705,
start: '2023-8-7',
end: '2023-8-15',
};
// Region of interest.
var radius_of_interest_meters = 45000;
var area_of_interest = ee.Geometry.Point([kincade.longitude, kincade.latitude])
.buffer(radius_of_interest_meters);
// Satellite data.
var goes_17_data = ee.ImageCollection("NOAA/GOES/17/FDCF")
.filterDate(kincade.start, kincade.end)
.filterBounds(area_of_interest);
var goes_18_data = ee.ImageCollection('NOAA/GOES/18/FDCF')
.filterDate(kincade.start, kincade.end)
.filterBounds(area_of_interest);

// Conversion from mask codes to confidence values.
var fire_mask_codes = [10, 30, 11, 31, 12, 32, 13, 33, 14, 34, 15, 35];
var confidence_values = [1.0, 1.0, 0.9, 0.9, 0.8, 0.8, 0.5, 0.5, 0.3, 0.3, 0.1, 0.1];
var default_confidence_value = 0;
var map_from_mask_codes_to_confidence_values = function(image) {
return image
.clip(area_of_interest)
.remap(fire_mask_codes, confidence_values, default_confidence_value);
};
var goes_17_confidence = goes_17_data
.select(['Mask'])
.map(map_from_mask_codes_to_confidence_values);
var goes_18_confidence = goes_18_data
.select(['Mask'])
.map(map_from_mask_codes_to_confidence_values);

var goes_17_max_confidence = goes_17_confidence
.reduce(ee.Reducer.max());
var goes_18_max_confidence = goes_18_confidence
.reduce(ee.Reducer.max());

var affected_area_palette = ['white', 'yellow', 'orange', 'red', 'purple'];
Map.centerObject(area_of_interest, 9);
Map.addLayer(area_of_interest,
{color: 'green'},
'Area of interest', true, 0.2);
Map.addLayer(goes_17_max_confidence,
{opacity: 0.3, min: 0, max: 1, palette: affected_area_palette},
'GOES 17 maximum confidence');
Map.addLayer(goes_18_max_confidence,
{opacity: 0.3, min: 0, max: 1, palette: affected_area_palette},
'GOES 18 maximum confidence');

var combined_confidence = ee.ImageCollection([goes_17_max_confidence,
goes_18_max_confidence])
.reduce(ee.Reducer.min());
Map.addLayer(combined_confidence,
{opacity: 0.3, min: 0, max: 1, palette: affected_area_palette},
'Combined confidence');

1 Answer 1

0

The reason behind the error message is the absence of images in the image collection. Since there is no image, there is no band. If you print(goes_17_data) and print(goes_18_data), you will find empty collection for goes_17_data. According to the data availability of GOES 17 dataset, there is no data after 2023-01-10. On the other hand, GOES 18 dataset ranges till 2023-08-15.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.