diff --git a/ApplicationLibCode/Application/Tools/Cloud/RiaOsduConnector.cpp b/ApplicationLibCode/Application/Tools/Cloud/RiaOsduConnector.cpp index b0b1098bbf..6d1a71b1ee 100644 --- a/ApplicationLibCode/Application/Tools/Cloud/RiaOsduConnector.cpp +++ b/ApplicationLibCode/Application/Tools/Cloud/RiaOsduConnector.cpp @@ -518,14 +518,14 @@ void RiaOsduConnector::parseWellLogs( QNetworkReply* reply, const QString& wellb double samplingStart = dataObj["SamplingStart"].toDouble( std::numeric_limits::infinity() ); double samplingStop = dataObj["SamplingStop"].toDouble( std::numeric_limits::infinity() ); - QJsonArray curvesArray = dataObj["Curves"].toArray(); - QStringList curveMnemonics; + QJsonArray curvesArray = dataObj["Curves"].toArray(); RiaLogging::debug( QString( "Curves for '%1':" ).arg( id ) ); std::vector 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::infinity() ); double curveTopDepth = curve["TopDepth"].toDouble( std::numeric_limits::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, diff --git a/ApplicationLibCode/Application/Tools/Cloud/RiaOsduConnector.h b/ApplicationLibCode/Application/Tools/Cloud/RiaOsduConnector.h index c8bac574b2..3efb2ba586 100644 --- a/ApplicationLibCode/Application/Tools/Cloud/RiaOsduConnector.h +++ b/ApplicationLibCode/Application/Tools/Cloud/RiaOsduConnector.h @@ -41,6 +41,7 @@ struct OsduWellboreTrajectory struct OsduWellLogChannel { + QString id; QString mnemonic; QString description; double topDepth; diff --git a/ApplicationLibCode/Commands/OsduImportCommands/RiuWellLogImportWizard.h b/ApplicationLibCode/Commands/OsduImportCommands/RiuWellLogImportWizard.h index bf689771d3..3024b756a3 100644 --- a/ApplicationLibCode/Commands/OsduImportCommands/RiuWellLogImportWizard.h +++ b/ApplicationLibCode/Commands/OsduImportCommands/RiuWellLogImportWizard.h @@ -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( ", " ); }; diff --git a/ApplicationLibCode/Commands/RicImportWellLogOsduFeature.cpp b/ApplicationLibCode/Commands/RicImportWellLogOsduFeature.cpp index 647b56bd7d..6e9070bbb3 100644 --- a/ApplicationLibCode/Commands/RicImportWellLogOsduFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportWellLogOsduFeature.cpp @@ -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 ); diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLogChannel.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLogChannel.cpp index 032d3745cb..d443de1000 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLogChannel.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLogChannel.cpp @@ -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; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLogChannel.h b/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLogChannel.h index 2fe010f7a1..632b6f69ad 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLogChannel.h +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLogChannel.h @@ -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 m_id; caf::PdmField m_description; caf::PdmField m_topDepth; caf::PdmField m_baseDepth;