Commit 03e00ce2 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

qps update,

date field in spectral library now of type "QDate"
Signed-off-by: Benjamin Jakimow's avatarBenjamin Jakimow <>
parent fe3ab236
Pipeline #13959 failed with stage
in 6 seconds
......@@ -694,7 +694,11 @@ class SpectralProfile(QgsFeature):
assert isinstance(feature, QgsFeature)
if isinstance(value_field, QgsField):
value_field =
assert value_field in feature.fields().names(), f'field "{value_field}" does not exist'
if not value_field in feature.fields().names():
print(f'field "{value_field}" does not exist. Allows values: {",".join(feature.fields().names())}')
return None
sp = SpectralProfile(fields=feature.fields(), value_field=value_field)
......@@ -1394,8 +1394,7 @@ class SpectralLibraryPlotWidget(pg.PlotWidget):
# create a new PDI
profile = self.speclib().profile(fid, value_field=field_name)
assert isinstance(profile, SpectralProfile)
if profile.isEmpty():
if not isinstance(profile, SpectralProfile) or profile.isEmpty():
self.mNumberOfEmptyProfiles += 1
......@@ -63,7 +63,7 @@ from eotimeseriesviewer import debugLog
DEBUG = False
SPECTRA_PROFILE_FIELDS = SpectralProfile().fields()
SPECTRA_PROFILE_FIELDS.append(QgsField('date', QVariant.String, 'varchar'))
SPECTRA_PROFILE_FIELDS.append(QgsField('date', QVariant.Date, 'date'))
SPECTRA_PROFILE_FIELDS.append(QgsField('doy', QVariant.Int, 'int'))
SPECTRA_PROFILE_FIELDS.append(QgsField('sensor', QVariant.String, 'varchar'))
......@@ -111,7 +111,6 @@ class AboutDialogUI(QDialog):
class EOTimeSeriesViewerUI(QMainWindow):
sigAboutToBeClosed = pyqtSignal()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment