|
@@ -7,6 +7,14 @@ from collections import OrderedDict
|
|
|
|
|
|
import grass.script as gs
|
|
import grass.script as gs
|
|
|
|
|
|
|
|
+# band reference should be required to have the format
|
|
|
|
+# <shortcut>_<band>
|
|
|
|
+# instead, the sensor name should be stored somewhere else,
|
|
|
|
+# and band names should be STAC common names, see
|
|
|
|
+# https://stacspec.org/
|
|
|
|
+# https://github.com/radiantearth/stac-spec/blob/master/extensions/eo/README.md#band-object
|
|
|
|
+# custom names must be possible
|
|
|
|
+
|
|
class BandReferenceReaderError(Exception):
|
|
class BandReferenceReaderError(Exception):
|
|
pass
|
|
pass
|
|
|
|
|
|
@@ -165,9 +173,11 @@ class BandReferenceReader:
|
|
try:
|
|
try:
|
|
shortcut, band = band_reference.split('_')
|
|
shortcut, band = band_reference.split('_')
|
|
except ValueError:
|
|
except ValueError:
|
|
- raise BandReferenceReaderError("Invalid band identifier <{}>".format(
|
|
|
|
- band_reference
|
|
|
|
- ))
|
|
|
|
|
|
+ # raise BandReferenceReaderError("Invalid band identifier <{}>".format(
|
|
|
|
+ # band_reference
|
|
|
|
+ # ))
|
|
|
|
+ shortcut = "unknown"
|
|
|
|
+ band = band_reference
|
|
|
|
|
|
for filename, config in self.config.items():
|
|
for filename, config in self.config.items():
|
|
for root in config.keys():
|
|
for root in config.keys():
|