elif bands_feature is not None:
self.bands = data_source.bands()
else:
self.bands = []
if additional_data is None:
self.additional_data = []
else:
self.additional_data = list(self._parse_features(additional_data, new_names=True)())
self.all_bands = self.bands + [f_name for _, f_name, _ in self.additional_data]
self.request_types = {
api_type: [band for band in self.all_bands if band in self.API_BANDS[api_type]]
for api_type in self.API_BANDS
}
self.request_types = {api_type: bands for api_type, bands in self.request_types.items() if bands}
def generate_evalscript(self):
After Change
if bands_feature:
self.bands_feature = next(self._parse_features(bands_feature, allowed_feature_types=[FeatureType.DATA])())
bands = bands or data_source.bands()
requested_bands.extend(bands)
if additional_data is not None:
additional_features = list(self._parse_features(additional_data, new_names=True)())
requested_bands.extend(band for ftype, band, new_name in additional_features)