Osdu Well Log: use channel "CurveId" instead of "Mnemonic".

This commit is contained in:
Kristian Bendiksen
2024-07-12 15:09:17 +02:00
parent eda26bcc25
commit 734a84956e
6 changed files with 21 additions and 6 deletions

View File

@@ -518,14 +518,14 @@ void RiaOsduConnector::parseWellLogs( QNetworkReply* reply, const QString& wellb
double samplingStart = dataObj["SamplingStart"].toDouble( std::numeric_limits<double>::infinity() );
double samplingStop = dataObj["SamplingStop"].toDouble( std::numeric_limits<double>::infinity() );
QJsonArray curvesArray = dataObj["Curves"].toArray();
QStringList curveMnemonics;
QJsonArray curvesArray = dataObj["Curves"].toArray();
RiaLogging::debug( QString( "Curves for '%1':" ).arg( id ) );
std::vector<OsduWellLogChannel> channels;
for ( const QJsonValue& curve : curvesArray )
{
QString mnemonic = curve["Mnemonic"].toString();
QString curveId = curve["CurveID"].toString();
QString curveDescription = curve["CurveDescription"].toString();
double curveBaseDepth = curve["BaseDepth"].toDouble( std::numeric_limits<double>::infinity() );
double curveTopDepth = curve["TopDepth"].toDouble( std::numeric_limits<double>::infinity() );
@@ -534,10 +534,10 @@ void RiaOsduConnector::parseWellLogs( QNetworkReply* reply, const QString& wellb
QString unit = curve["CurveUnit"].toString();
QString depthUnit = curve["DepthUnit"].toString();
curveMnemonics << mnemonic;
RiaLogging::debug(
QString( "%1: '%2' (%3 - %4)" ).arg( mnemonic ).arg( curveDescription ).arg( curveTopDepth ).arg( curveBaseDepth ) );
channels.push_back( OsduWellLogChannel{ .mnemonic = mnemonic,
QString( "%1: '%2' (%3 - %4)" ).arg( curveId ).arg( curveDescription ).arg( curveTopDepth ).arg( curveBaseDepth ) );
channels.push_back( OsduWellLogChannel{ .id = curveId,
.mnemonic = mnemonic,
.description = curveDescription,
.topDepth = curveTopDepth,
.baseDepth = curveBaseDepth,

View File

@@ -41,6 +41,7 @@ struct OsduWellboreTrajectory
struct OsduWellLogChannel
{
QString id;
QString mnemonic;
QString description;
double topDepth;

View File

@@ -69,7 +69,7 @@ public:
QStringList channels;
for ( auto c : wellLog.channels )
{
channels.push_back( c.mnemonic );
channels.push_back( c.id );
}
return channels.join( ", " );
};

View File

@@ -80,6 +80,7 @@ void RicImportWellLogOsduFeature::onActionTriggered( bool isChecked )
for ( OsduWellLogChannel c : wellLog.channels )
{
RimOsduWellLogChannel* osduWellLogChannel = new RimOsduWellLogChannel;
osduWellLogChannel->setId( c.id );
osduWellLogChannel->setName( c.mnemonic );
osduWellLogChannel->setDescription( c.description );
osduWellLogChannel->setTopDepth( c.topDepth );

View File

@@ -29,6 +29,9 @@ RimOsduWellLogChannel::RimOsduWellLogChannel()
{
CAF_PDM_InitObject( "OSDU Well Log Channel" );
CAF_PDM_InitFieldNoDefault( &m_id, "Id", "Id" );
m_id.uiCapability()->setUiReadOnly( true );
CAF_PDM_InitFieldNoDefault( &m_description, "Description", "Description" );
m_description.uiCapability()->setUiReadOnly( true );
@@ -56,6 +59,14 @@ RimOsduWellLogChannel::RimOsduWellLogChannel()
nameField()->xmlCapability()->setIOWritable( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimOsduWellLogChannel::setId( const QString& id )
{
m_id = id;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -31,6 +31,7 @@ class RimOsduWellLogChannel : public RimWellLogChannel
public:
RimOsduWellLogChannel();
void setId( const QString& id );
void setDescription( const QString& description );
void setTopDepth( double topDepth );
void setBaseDepth( double baseDepth );
@@ -40,6 +41,7 @@ public:
void setDepthUnit( const QString& depthUnit );
private:
caf::PdmField<QString> m_id;
caf::PdmField<QString> m_description;
caf::PdmField<double> m_topDepth;
caf::PdmField<double> m_baseDepth;