(#489) Added interface to get access to depth unit

This commit is contained in:
Pål Hagen 2015-09-18 13:43:56 +02:00
parent 479b2083ef
commit 39193396ae
3 changed files with 22 additions and 0 deletions

View File

@ -20,6 +20,7 @@
#include "RigWellLogFile.h"
#include "well.hpp"
#include "laswell.hpp"
#include <QString>
#include <QFileInfo>
@ -138,3 +139,19 @@ std::vector<double> RigWellLogFile::values(const QString& name) const
return std::vector<double>();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RigWellLogFile::depthUnit() const
{
QString unit;
NRLib::LasWell* lasWell = dynamic_cast<NRLib::LasWell*>(m_wellLogFile);
if (lasWell)
{
unit = QString::fromStdString(lasWell->depthUnit());
}
return unit;
}

View File

@ -48,6 +48,8 @@ public:
std::vector<double> depthValues() const;
std::vector<double> values(const QString& name) const;
QString depthUnit() const;
private:
void close();

View File

@ -49,6 +49,9 @@ public:
void WriteToFile(const std::string & filename,
const std::vector<std::string> & comment_header);
std::string depthUnit() const { return depth_unit_; };
private:
void ReadHeader(const std::string & filename,
std::ifstream & fin,