diff --git a/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp b/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp index 3d5defddca..222fc6257a 100644 --- a/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp +++ b/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp @@ -20,6 +20,7 @@ #include "RigWellLogFile.h" #include "well.hpp" +#include "laswell.hpp" #include #include @@ -138,3 +139,19 @@ std::vector RigWellLogFile::values(const QString& name) const return std::vector(); } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RigWellLogFile::depthUnit() const +{ + QString unit; + + NRLib::LasWell* lasWell = dynamic_cast(m_wellLogFile); + if (lasWell) + { + unit = QString::fromStdString(lasWell->depthUnit()); + } + + return unit; +} diff --git a/ApplicationCode/ReservoirDataModel/RigWellLogFile.h b/ApplicationCode/ReservoirDataModel/RigWellLogFile.h index f69c38ed34..3aa251c4eb 100644 --- a/ApplicationCode/ReservoirDataModel/RigWellLogFile.h +++ b/ApplicationCode/ReservoirDataModel/RigWellLogFile.h @@ -48,6 +48,8 @@ public: std::vector depthValues() const; std::vector values(const QString& name) const; + QString depthUnit() const; + private: void close(); diff --git a/ThirdParty/NRLib/nrlib/well/laswell.hpp b/ThirdParty/NRLib/nrlib/well/laswell.hpp index 38b91dadef..d1bc9afa55 100644 --- a/ThirdParty/NRLib/nrlib/well/laswell.hpp +++ b/ThirdParty/NRLib/nrlib/well/laswell.hpp @@ -49,6 +49,9 @@ public: void WriteToFile(const std::string & filename, const std::vector & comment_header); + + std::string depthUnit() const { return depth_unit_; }; + private: void ReadHeader(const std::string & filename, std::ifstream & fin,