mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
#12462 Well Log Import: add support for RMS well format.
This commit is contained in:
1 parent
065d39d856
commit
0f55899ba9
3 files changed
+13
-4
No files matched your search
@@ -58,7 +58,7 @@ std::vector<RimWellLogLasFile*> RicWellLogsImportFileFeature::importWellLogFiles
|
||||
QStringList RicWellLogsImportFileFeature::wellLogFileNameFilters()
|
||||
{
|
||||
QStringList nameFilters;
|
||||
nameFilters << "*.las" << "*.LAS";
|
||||
nameFilters << "*.las" << "*.LAS" << "*.rmswell" << "*.RMSWELL";
|
||||
return nameFilters;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ RimWellLogLasFile* RimWellLogLasFile::readWellLogFile( const QString& logFilePat
|
||||
|
||||
RimWellLogLasFile* wellLogFile = nullptr;
|
||||
|
||||
if ( fi.suffix().toUpper().compare( "LAS" ) == 0 )
|
||||
if ( fi.suffix().toUpper().compare( "LAS" ) == 0 || fi.suffix().toUpper().compare( "RMSWELL" ) == 0 )
|
||||
{
|
||||
wellLogFile = new RimWellLogLasFile();
|
||||
wellLogFile->setFileName( logFilePath );
|
||||
|
||||
@@ -58,11 +58,20 @@ bool RigWellLogLasFile::open( const QString& fileName, QString* errorMessage )
|
||||
{
|
||||
close();
|
||||
|
||||
auto guessFormatFromFileExtension = []( const QString& filePath )
|
||||
{
|
||||
QFileInfo fi( filePath );
|
||||
if ( fi.suffix().toUpper() == "RMSWELL" )
|
||||
return NRLib::Well::RMS;
|
||||
else
|
||||
return NRLib::Well::LAS;
|
||||
};
|
||||
|
||||
NRLib::Well* well = nullptr;
|
||||
|
||||
try
|
||||
{
|
||||
int wellFormat = NRLib::Well::LAS;
|
||||
int wellFormat = guessFormatFromFileExtension( fileName );
|
||||
|
||||
well = NRLib::Well::ReadWell( RiaStringEncodingTools::toNativeEncoded( fileName ).data(), wellFormat );
|
||||
if ( !well )
|
||||
@@ -96,7 +105,7 @@ bool RigWellLogLasFile::open( const QString& fileName, QString* errorMessage )
|
||||
wellLogNames.append( logName );
|
||||
|
||||
// 2018-11-09 Added MD https://github.com/OPM/ResInsight/issues/3641
|
||||
if ( logName.toUpper() == "DEPT" || logName.toUpper() == "DEPTH" || logName.toUpper() == "MD" )
|
||||
if ( logName.toUpper() == "DEPT" || logName.toUpper() == "DEPTH" || logName.toUpper() == "MD" || logName.toUpper() == "MDEPTH" )
|
||||
{
|
||||
m_depthLogName = logName;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user