mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#538) Added DepthUnitType enum containing meter and feet
This commit is contained in:
@@ -172,7 +172,7 @@ std::vector<double> RigWellLogFile::values(const QString& name) const
|
||||
|
||||
if (m_wellLogFile->HasContLog(name.toStdString()))
|
||||
{
|
||||
if (name == m_depthLogName && (depthUnit().toUpper() == "F" || depthUnit().toUpper() == "FT"))
|
||||
if (name == m_depthLogName && (depthUnitString().toUpper() == "F" || depthUnitString().toUpper() == "FT"))
|
||||
{
|
||||
std::vector<double> footValues = m_wellLogFile->GetContLog(name.toStdString());
|
||||
|
||||
@@ -207,7 +207,7 @@ std::vector<double> RigWellLogFile::values(const QString& name) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RigWellLogFile::depthUnit() const
|
||||
QString RigWellLogFile::depthUnitString() const
|
||||
{
|
||||
QString unit;
|
||||
|
||||
@@ -223,7 +223,7 @@ QString RigWellLogFile::depthUnit() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RigWellLogFile::wellLogChannelUnit(const QString& wellLogChannelName) const
|
||||
QString RigWellLogFile::wellLogChannelUnitString(const QString& wellLogChannelName) const
|
||||
{
|
||||
QString unit;
|
||||
|
||||
@@ -234,7 +234,7 @@ QString RigWellLogFile::wellLogChannelUnit(const QString& wellLogChannelName) co
|
||||
}
|
||||
|
||||
// Special handling of depth unit - we convert depth to meter
|
||||
if (unit == depthUnit())
|
||||
if (unit == depthUnitString())
|
||||
{
|
||||
return "m";
|
||||
}
|
||||
@@ -298,3 +298,18 @@ bool RigWellLogFile::exportToLasFile(const RimWellLogCurve* curve, const QString
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimDefines::DepthUnitType RigWellLogFile::depthUnit() const
|
||||
{
|
||||
RimDefines::DepthUnitType unitType = RimDefines::UNIT_METER;
|
||||
|
||||
if (depthUnitString().toUpper() == "F" || depthUnitString().toUpper() == "FT")
|
||||
{
|
||||
unitType = RimDefines::UNIT_FEET;
|
||||
}
|
||||
|
||||
return unitType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user