mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add background data loader framework and well path loaders.
This commit is contained in:
@@ -54,6 +54,8 @@
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEnsembleWellLogsCollection.h"
|
||||
#include "RimFaultReactivationModelCollection.h"
|
||||
#include "RimFileWellPath.h"
|
||||
#include "RimFileWellPathDataLoader.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimFractureTemplateCollection.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
@@ -63,10 +65,15 @@
|
||||
#include "RimGridSummaryCase.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimModeledWellPath.h"
|
||||
#include "RimModeledWellPathDataLoader.h"
|
||||
#include "RimObservedDataCollection.h"
|
||||
#include "RimObservedFmuRftData.h"
|
||||
#include "RimObservedSummaryData.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimOsduWellPath.h"
|
||||
#include "RimOsduWellPathDataLoader.h"
|
||||
#include "RimPlotWindow.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RimSeismicData.h"
|
||||
@@ -96,6 +103,7 @@
|
||||
#include "RiuViewer.h"
|
||||
#include "RiuViewerCommands.h"
|
||||
|
||||
#include "cafDataLoadController.h"
|
||||
#include "cafPdmCodeGenerator.h"
|
||||
#include "cafPdmDataValueField.h"
|
||||
#include "cafPdmDefaultObjectFactory.h"
|
||||
@@ -1525,6 +1533,8 @@ void RiaApplication::initialize()
|
||||
m_project->setPlotTemplateFolders( m_preferences->plotTemplateFolders() );
|
||||
|
||||
caf::SelectionManager::instance()->setPdmRootObject( project() );
|
||||
|
||||
initializeDataLoadController();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1730,3 +1740,22 @@ RiaSumoConnector* RiaApplication::makeSumoConnector()
|
||||
|
||||
return m_sumoConnector;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaApplication::initializeDataLoadController()
|
||||
{
|
||||
caf::DataLoadController* dataLoadController = caf::DataLoadController::instance();
|
||||
|
||||
const QString wellPathGeometryKeyword = "WELL_PATH_GEOMETRY";
|
||||
dataLoadController->registerDataLoader( RimFileWellPath::classKeywordStatic(),
|
||||
wellPathGeometryKeyword,
|
||||
std::make_shared<RimFileWellPathDataLoader>() );
|
||||
dataLoadController->registerDataLoader( RimOsduWellPath::classKeywordStatic(),
|
||||
wellPathGeometryKeyword,
|
||||
std::make_shared<RimOsduWellPathDataLoader>() );
|
||||
dataLoadController->registerDataLoader( RimModeledWellPath::classKeywordStatic(),
|
||||
wellPathGeometryKeyword,
|
||||
std::make_shared<RimModeledWellPathDataLoader>() );
|
||||
}
|
||||
|
||||
@@ -227,6 +227,8 @@ protected:
|
||||
bool generateCode( const QString& outputPath, gsl::not_null<QString*> errMsg );
|
||||
|
||||
protected:
|
||||
void initializeDataLoadController();
|
||||
|
||||
cvf::ref<cvf::Font> m_defaultSceneFont;
|
||||
cvf::ref<cvf::Font> m_defaultAnnotationFont;
|
||||
cvf::ref<cvf::Font> m_defaultWellLabelFont;
|
||||
|
||||
@@ -16,6 +16,9 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellIAModelData.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellIADataAccess.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimOsduWellPath.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimOsduWellPathDataLoader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFileWellPathDataLoader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimModeledWellPathDataLoader.h
|
||||
)
|
||||
|
||||
set(SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -36,12 +39,18 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellIAModelData.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellIADataAccess.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimOsduWellPath.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimOsduWellPathDataLoader.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimFileWellPathDataLoader.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimModeledWellPathDataLoader.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
||||
|
||||
list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES})
|
||||
|
||||
list(APPEND QT_MOC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/RimOsduWellPathDataLoader.h)
|
||||
|
||||
|
||||
source_group(
|
||||
"ProjectDataModel\\WellPath"
|
||||
FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2024- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimFileWellPathDataLoader.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RimFileWellPath.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QObject>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFileWellPathDataLoader::RimFileWellPathDataLoader()
|
||||
: caf::DataLoader()
|
||||
{
|
||||
m_wellPathImporter = std::make_unique<RifWellPathImporter>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFileWellPathDataLoader::loadData( caf::PdmObject& pdmObject, const QString& dataType, int taskId, caf::ProgressInfo& progressInfo )
|
||||
{
|
||||
auto* fWPath = dynamic_cast<RimFileWellPath*>( &pdmObject );
|
||||
if ( fWPath && !fWPath->filePath().isEmpty() )
|
||||
{
|
||||
QString errorMessage;
|
||||
if ( !fWPath->readWellPathFile( &errorMessage, m_wellPathImporter.get(), false ) )
|
||||
{
|
||||
RiaLogging::warning( errorMessage );
|
||||
}
|
||||
}
|
||||
taskDone.send( dataType, taskId );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFileWellPathDataLoader::isRunnable() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2024- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RimFileWellPath.h"
|
||||
|
||||
#include "cafDataLoader.h"
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "RifWellPathImporter.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFileWellPathDataLoader : public caf::DataLoader
|
||||
{
|
||||
public:
|
||||
RimFileWellPathDataLoader();
|
||||
void loadData( caf::PdmObject& pdmObject, const QString& dataType, int taskId, caf::ProgressInfo& progressInfo ) override;
|
||||
bool isRunnable() const override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<RifWellPathImporter> m_wellPathImporter;
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2024- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimModeledWellPathDataLoader.h"
|
||||
|
||||
#include "RimModeledWellPath.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimModeledWellPathDataLoader::RimModeledWellPathDataLoader()
|
||||
: caf::DataLoader()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimModeledWellPathDataLoader::loadData( caf::PdmObject& pdmObject, const QString& dataType, int taskId, caf::ProgressInfo& progressInfo )
|
||||
{
|
||||
auto* mWPath = dynamic_cast<RimModeledWellPath*>( &pdmObject );
|
||||
|
||||
if ( mWPath )
|
||||
{
|
||||
mWPath->createWellPathGeometry();
|
||||
}
|
||||
|
||||
taskDone.send( dataType, taskId );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimModeledWellPathDataLoader::isRunnable() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2024- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafDataLoader.h"
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimModeledWellPathDataLoader : public caf::DataLoader
|
||||
{
|
||||
public:
|
||||
RimModeledWellPathDataLoader();
|
||||
void loadData( caf::PdmObject& pdmObject, const QString& dataType, int taskId, caf::ProgressInfo& progressInfo ) override;
|
||||
bool isRunnable() const override;
|
||||
};
|
||||
@@ -0,0 +1,109 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2024- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimOsduWellPathDataLoader.h"
|
||||
|
||||
#include "Cloud/RiaOsduConnector.h"
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RimOsduWellPath.h"
|
||||
|
||||
#include "RifOsduWellPathReader.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QObject>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimOsduWellPathDataLoader::RimOsduWellPathDataLoader()
|
||||
: caf::DataLoader()
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RiaOsduConnector* osduConnector = app->makeOsduConnector();
|
||||
|
||||
connect( osduConnector,
|
||||
SIGNAL( parquetDownloadFinished( const QByteArray&, const QString&, const QString& ) ),
|
||||
this,
|
||||
SLOT( parquetDownloadComplete( const QByteArray&, const QString&, const QString& ) ),
|
||||
Qt::QueuedConnection );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimOsduWellPathDataLoader::loadData( caf::PdmObject& pdmObject, const QString& dataType, int taskId, caf::ProgressInfo& progressInfo )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RiaOsduConnector* osduConnector = app->makeOsduConnector();
|
||||
|
||||
// TODO: this is weird?
|
||||
m_dataType = dataType;
|
||||
|
||||
auto oWPath = dynamic_cast<RimOsduWellPath*>( &pdmObject );
|
||||
if ( oWPath )
|
||||
{
|
||||
QString trajectoryId = oWPath->wellboreTrajectoryId();
|
||||
osduConnector->requestWellboreTrajectoryParquetDataById( trajectoryId );
|
||||
m_wellPaths[trajectoryId] = oWPath;
|
||||
m_taskIds[trajectoryId] = taskId;
|
||||
}
|
||||
QApplication::processEvents();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimOsduWellPathDataLoader::isRunnable() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimOsduWellPathDataLoader::parquetDownloadComplete( const QByteArray& contents, const QString& url, const QString& id )
|
||||
{
|
||||
RiaLogging::info( QString( "Parquet download complete. Id: %1 Size: %2" ).arg( id ).arg( contents.size() ) );
|
||||
|
||||
QMutexLocker lock( &m_mutex );
|
||||
int taskId = m_taskIds[id];
|
||||
|
||||
if ( !contents.isEmpty() )
|
||||
{
|
||||
m_parquetData[id] = contents;
|
||||
|
||||
auto oWPath = m_wellPaths[id];
|
||||
auto [wellPathGeometry, errorMessage] = RifOsduWellPathReader::readWellPathData( contents, oWPath->datumElevationFromOsdu() );
|
||||
if ( wellPathGeometry.notNull() )
|
||||
{
|
||||
oWPath->setWellPathGeometry( wellPathGeometry.p() );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::warning( errorMessage );
|
||||
}
|
||||
}
|
||||
|
||||
taskDone.send( m_dataType, taskId );
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2024- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RimOsduWellPath.h"
|
||||
|
||||
#include "cafDataLoader.h"
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
#include <QMutex>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimOsduWellPathDataLoader : public QObject, public caf::DataLoader
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RimOsduWellPathDataLoader();
|
||||
void loadData( caf::PdmObject& pdmObject, const QString& dataType, int taskId, caf::ProgressInfo& progressInfo ) override;
|
||||
bool isRunnable() const override;
|
||||
|
||||
private slots:
|
||||
void parquetDownloadComplete( const QByteArray& contents, const QString& url, const QString& id );
|
||||
|
||||
private:
|
||||
std::map<QString, QByteArray> m_parquetData;
|
||||
std::map<QString, RimOsduWellPath*> m_wellPaths;
|
||||
std::map<QString, int> m_taskIds;
|
||||
QString m_dataType;
|
||||
QMutex m_mutex;
|
||||
};
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "Cloud/RiaOsduConnector.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaDateStringParser.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
@@ -62,6 +63,8 @@
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafDataLoadController.h"
|
||||
#include "cafDataLoader.h"
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
#include "cafPdmObjectScriptingCapability.h"
|
||||
#include "cafPdmUiEditorHandle.h"
|
||||
@@ -154,73 +157,47 @@ void RimWellPathCollection::loadDataAndUpdate()
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
caf::DataLoadController* dataLoadController = caf::DataLoadController::instance();
|
||||
|
||||
const QString wellPathGeometryKeyword = "WELL_PATH_GEOMETRY";
|
||||
|
||||
for ( RimWellPath* wellPath : allWellPaths() )
|
||||
{
|
||||
progress.setProgressDescription( QString( "Reading file %1" ).arg( wellPath->name() ) );
|
||||
progress.setProgressDescription( QString( "Reading well %1" ).arg( wellPath->name() ) );
|
||||
dataLoadController->loadData( *wellPath, wellPathGeometryKeyword, progress );
|
||||
}
|
||||
|
||||
auto* fWPath = dynamic_cast<RimFileWellPath*>( wellPath );
|
||||
auto* mWPath = dynamic_cast<RimModeledWellPath*>( wellPath );
|
||||
auto* oWPath = dynamic_cast<RimOsduWellPath*>( wellPath );
|
||||
if ( fWPath )
|
||||
dataLoadController->blockUntilDone( wellPathGeometryKeyword );
|
||||
|
||||
for ( RimWellPath* wellPath : allWellPaths() )
|
||||
{
|
||||
for ( RimWellLog* wellLog : wellPath->wellLogs() )
|
||||
{
|
||||
if ( !fWPath->filePath().isEmpty() )
|
||||
if ( RimWellLogFile* wellLogFile = dynamic_cast<RimWellLogFile*>( wellLog ) )
|
||||
{
|
||||
QString errorMessage;
|
||||
if ( !fWPath->readWellPathFile( &errorMessage, m_wellPathImporter.get(), false ) )
|
||||
if ( !wellLogFile->readFile( &errorMessage ) )
|
||||
{
|
||||
RiaLogging::warning( errorMessage );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( mWPath )
|
||||
{
|
||||
mWPath->createWellPathGeometry();
|
||||
}
|
||||
else if ( oWPath )
|
||||
{
|
||||
RiaOsduConnector* osduConnector = app->makeOsduConnector();
|
||||
auto [wellPathGeometry, errorMessage] =
|
||||
loadWellPathGeometryFromOsdu( osduConnector, oWPath->wellboreTrajectoryId(), oWPath->datumElevationFromOsdu() );
|
||||
if ( wellPathGeometry.notNull() )
|
||||
else if ( RimOsduWellLog* osduWellLog = dynamic_cast<RimOsduWellLog*>( wellLog ) )
|
||||
{
|
||||
oWPath->setWellPathGeometry( wellPathGeometry.p() );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::warning( errorMessage );
|
||||
RiaOsduConnector* osduConnector = app->makeOsduConnector();
|
||||
auto [wellLogData, errorMessage] = loadWellLogFromOsdu( osduConnector, osduWellLog->wellLogId() );
|
||||
if ( wellLogData.notNull() )
|
||||
{
|
||||
osduWellLog->setWellLogData( wellLogData.p() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( wellPath )
|
||||
RimStimPlanModelCollection* stimPlanModelCollection = wellPath->stimPlanModelCollection();
|
||||
if ( stimPlanModelCollection )
|
||||
{
|
||||
for ( RimWellLog* wellLog : wellPath->wellLogs() )
|
||||
for ( RimStimPlanModel* stimPlanModel : stimPlanModelCollection->allStimPlanModels() )
|
||||
{
|
||||
if ( RimWellLogFile* wellLogFile = dynamic_cast<RimWellLogFile*>( wellLog ) )
|
||||
{
|
||||
QString errorMessage;
|
||||
if ( !wellLogFile->readFile( &errorMessage ) )
|
||||
{
|
||||
RiaLogging::warning( errorMessage );
|
||||
}
|
||||
}
|
||||
else if ( RimOsduWellLog* osduWellLog = dynamic_cast<RimOsduWellLog*>( wellLog ) )
|
||||
{
|
||||
RiaOsduConnector* osduConnector = app->makeOsduConnector();
|
||||
auto [wellLogData, errorMessage] = loadWellLogFromOsdu( osduConnector, osduWellLog->wellLogId() );
|
||||
if ( wellLogData.notNull() )
|
||||
{
|
||||
osduWellLog->setWellLogData( wellLogData.p() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RimStimPlanModelCollection* stimPlanModelCollection = wellPath->stimPlanModelCollection();
|
||||
if ( stimPlanModelCollection )
|
||||
{
|
||||
for ( RimStimPlanModel* stimPlanModel : stimPlanModelCollection->allStimPlanModels() )
|
||||
{
|
||||
stimPlanModel->loadDataAndUpdate();
|
||||
}
|
||||
stimPlanModel->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
progress.incrementProgress();
|
||||
|
||||
Reference in New Issue
Block a user