From 19e5e61cb7a32d7e1940748f86e8f133ed8bee54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Jensen?= Date: Fri, 29 Sep 2017 15:44:50 +0200 Subject: [PATCH] LasWell. Parse DATE token from LAS well information section --- ThirdParty/NRLib/nrlib/well/laswell.cpp | 6 +++++- ThirdParty/NRLib/nrlib/well/well.cpp | 4 ++++ ThirdParty/NRLib/nrlib/well/well.hpp | 7 +++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ThirdParty/NRLib/nrlib/well/laswell.cpp b/ThirdParty/NRLib/nrlib/well/laswell.cpp index 9760463b71..efb283fc3d 100644 --- a/ThirdParty/NRLib/nrlib/well/laswell.cpp +++ b/ThirdParty/NRLib/nrlib/well/laswell.cpp @@ -286,7 +286,11 @@ LasWell::ParseWellToken(const std::string & token, if(value.empty() == false) SetWellName(value); } - + else if (token == "DATE") + { + if (value.empty() == false) + SetDate(value); + } else if(token == "STRT" || token == "STOP" || token == "STEP" || token == "NULL" || token == "XWELL" || token == "YWELL") { diff --git a/ThirdParty/NRLib/nrlib/well/well.cpp b/ThirdParty/NRLib/nrlib/well/well.cpp index 2ac4c98e17..71d174c8d6 100644 --- a/ThirdParty/NRLib/nrlib/well/well.cpp +++ b/ThirdParty/NRLib/nrlib/well/well.cpp @@ -244,6 +244,10 @@ void Well::SetWellName(const std::string& wellname) well_name_ = wellname; } +void Well::SetDate(const std::string& date) +{ + date_ = date; +} bool Well::IsMissing(double x)const { diff --git a/ThirdParty/NRLib/nrlib/well/well.hpp b/ThirdParty/NRLib/nrlib/well/well.hpp index 2f1920d0c5..09b9baa9dd 100644 --- a/ThirdParty/NRLib/nrlib/well/well.hpp +++ b/ThirdParty/NRLib/nrlib/well/well.hpp @@ -96,6 +96,11 @@ namespace NRLib { void SetWellName(const std::string& wellname); /// const std::string& GetWellName() const { return well_name_; }; + /// Set name of well + void SetDate(const std::string& wellname); + /// + const std::string& GetDate() const { return date_; }; + /// Return true if x is missing bool IsMissing(double x) const; /// Return true if n is missing @@ -193,6 +198,8 @@ namespace NRLib { std::map > cont_log_background_resolution_; /// Name of well std::string well_name_; + /// Date + std::string date_; /// Missing value for continous logs. double well_rmissing_; /// Missing value for discrete logs.