Skip to content

Commit a3edcc1

Browse files
committed
fix ReosGribGriddedDataProvider enum
1 parent dc11942 commit a3edcc1

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/dataProviders/grib/reosgribprovider.cpp

+17-17
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,14 @@ QDateTime ReosGribGriddedRainfallProvider::startTime( int index ) const
170170
{
171171
switch ( mSourceValueType )
172172
{
173-
case ValueType::CumulativeHeight:
173+
case ValueType::Cumulative:
174174
if ( index == 0 )
175175
return QDateTime::fromSecsSinceEpoch( mReferenceTime, Qt::UTC );
176176
else if ( index > 0 )
177177
return QDateTime::fromSecsSinceEpoch( mFrames.at( index - 1 ).validTime, Qt::UTC );
178178
break;
179-
case ValueType::Height:
180-
case ValueType::Intensity:
179+
case ValueType::CumulativeOnTimeStep:
180+
case ValueType::Instantaneous:
181181
return QDateTime();
182182
break;
183183
}
@@ -189,11 +189,11 @@ QDateTime ReosGribGriddedRainfallProvider::endTime( int index ) const
189189
{
190190
switch ( mSourceValueType )
191191
{
192-
case ValueType::CumulativeHeight:
192+
case ValueType::Cumulative:
193193
return QDateTime::fromSecsSinceEpoch( mFrames.at( index ).validTime, Qt::UTC );
194194
break;
195-
case ValueType::Height:
196-
case ValueType::Intensity:
195+
case ValueType::CumulativeOnTimeStep:
196+
case ValueType::Instantaneous:
197197
return QDateTime();
198198
break;
199199
}
@@ -223,7 +223,7 @@ const QVector<double> ReosGribGriddedRainfallProvider::data( int index ) const
223223

224224
switch ( mSourceValueType )
225225
{
226-
case ValueType::CumulativeHeight:
226+
case ValueType::Cumulative:
227227
{
228228
QVector<double> ret( raster.values().count(), std::numeric_limits<double>::quiet_NaN() ) ;
229229

@@ -254,8 +254,8 @@ const QVector<double> ReosGribGriddedRainfallProvider::data( int index ) const
254254
return ret;
255255
}
256256
break;
257-
case ValueType::Height:
258-
case ValueType::Intensity:
257+
case ValueType::CumulativeOnTimeStep:
258+
case ValueType::Instantaneous:
259259
{
260260
QVector<double> ret( raster.values().count(), std::numeric_limits<double>::quiet_NaN() ) ;
261261
for ( int i = 0; i < ret.count(); ++i )
@@ -357,12 +357,12 @@ QString ReosGribGriddedRainfallProvider::uri( const QString &sourcePath, const Q
357357

358358
switch ( valueType )
359359
{
360-
case ValueType::CumulativeHeight:
360+
case ValueType::Cumulative:
361361
stringValueType = QStringLiteral( "cumulative" );
362362
break;
363-
case ValueType::Height:
363+
case ValueType::CumulativeOnTimeStep:
364364
stringValueType = QStringLiteral( "height" );
365-
case ValueType::Intensity:
365+
case ValueType::Instantaneous:
366366
stringValueType = QStringLiteral( "intensity" );
367367
break;
368368
}
@@ -393,18 +393,18 @@ ReosGriddedRainfallProvider::ValueType ReosGribGriddedRainfallProvider::valueTyp
393393
{
394394
const QStringList part = uri.split( QStringLiteral( "::" ) );
395395
if ( part.count() < 3 )
396-
return ValueType::Height;
396+
return ValueType::CumulativeOnTimeStep;
397397

398398
if ( part.at( 2 ) == QStringLiteral( "cumulative" ) )
399-
return ValueType::CumulativeHeight;
399+
return ValueType::Cumulative;
400400

401401
if ( part.at( 2 ) == QStringLiteral( "intensity" ) )
402-
return ValueType::Intensity;
402+
return ValueType::Instantaneous;
403403

404404
if ( part.at( 2 ) == QStringLiteral( "height" ) )
405-
return ValueType::Height;
405+
return ValueType::CumulativeOnTimeStep;
406406

407-
return ValueType::Height;
407+
return ValueType::CumulativeOnTimeStep;
408408
}
409409

410410
bool ReosGribGriddedRainfallProvider::sourceIsValid( const QString &source, ReosModule::Message &message ) const

0 commit comments

Comments
 (0)