Adjustment of creating depth adjusted LAS files

* Make source well LAS files selectable in combobox
Detect all las files for source well and make selectable in combobox

* Add source well info to file name and as comment in file
Add info of source well in file name and as comment in LAS file for created depth adjusted las files
This commit is contained in:
Jørgen Herje
2023-02-07 17:51:35 +01:00
committed by GitHub
parent bbd732e84d
commit e19f3dad82
4 changed files with 58 additions and 10 deletions

View File

@@ -239,8 +239,29 @@ void RicCreateDepthAdjustedLasFilesImpl::createDestinationWellLasFile( const QSt
lasFile.AddLog( name.toUpper().toStdString(), unitText, "", values );
}
std::vector<std::string> commentHeader;
QString fullPathName = exportFolder + "/" + wellName + "_" + caseDescription + "_" + sourceWellLogData->date() + ".las";
// Add comment to LAS file
const std::vector<std::string> commentHeader = {
QString( "Note: Generated depth adjusted LAS file for '%1', using '%2'" )
.arg( wellName )
.arg( sourceWellLogData->wellName() )
.toStdString() };
// Add property value to file name if single property
QString propertyNameStr;
if ( propertyMap.size() == 1 )
{
propertyNameStr = QString( "-%1" ).arg( propertyMap.begin()->first );
}
// Replace white space from well names in file name
QString sourceWell = sourceWellLogData->wellName();
sourceWell = sourceWell.replace( QRegExp( "[\\s]+" ), "_" );
QString destinationWell = wellName;
destinationWell = destinationWell.replace( QRegExp( "[\\s]+" ), "_" );
// Create full file path name
QString fullPathName = exportFolder + "/" + destinationWell + "_Depth_Adjusted_Using_" + sourceWell + "_" +
caseDescription + propertyNameStr + "-" + sourceWellLogData->date() + ".las";
lasFile.WriteToFile( fullPathName.toStdString(), commentHeader );
}