From 88e40aa2d9074af043a62a54fa24d229ed32ac67 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 23 Sep 2016 10:20:05 +0200 Subject: [PATCH] #886 LAS Export: Set the STEP if the data is resampled --- ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp | 5 ++++- ThirdParty/NRLib/nrlib/well/laswell.cpp | 5 +++++ ThirdParty/NRLib/nrlib/well/laswell.hpp | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp b/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp index 07787fcad8..145437464a 100644 --- a/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp +++ b/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp @@ -311,6 +311,10 @@ bool RigLasFileExporter::writeToFolder(const QString& exportFolder) lasFile.setVersionInfo("2.0"); lasFileDescr.appendDataToLasFile(&lasFile); + if (m_isResampleActive) + { + lasFile.setDepthStep(m_resamplingInterval); + } QDir dir(exportFolder); QString fileName = dir.absoluteFilePath(QString::fromStdString(lasFileDescr.generateFilename())); @@ -402,7 +406,6 @@ void RigLasFileExporter::appendLasFileDescriptions(const std::vector curveDefinitions; diff --git a/ThirdParty/NRLib/nrlib/well/laswell.cpp b/ThirdParty/NRLib/nrlib/well/laswell.cpp index 1a113438b2..9760463b71 100644 --- a/ThirdParty/NRLib/nrlib/well/laswell.cpp +++ b/ThirdParty/NRLib/nrlib/well/laswell.cpp @@ -597,6 +597,11 @@ void NRLib::LasWell::setStopDepth(double stopDepth) stop_depth_ = stopDepth; } +void NRLib::LasWell::setDepthStep(double depthStep) +{ + depth_increment_ = depthStep; +} + void NRLib::LasWell::addWellInfo(const std::string& parameter, const std::string& value) { // Example of line formatting taken from the documentation diff --git a/ThirdParty/NRLib/nrlib/well/laswell.hpp b/ThirdParty/NRLib/nrlib/well/laswell.hpp index 6ad1f4d915..074c177ef2 100644 --- a/ThirdParty/NRLib/nrlib/well/laswell.hpp +++ b/ThirdParty/NRLib/nrlib/well/laswell.hpp @@ -61,6 +61,7 @@ public: void setVersionInfo(const std::string& logName); void setStartDepth(double startDepth); void setStopDepth(double stopDepth); + void setDepthStep(double depthStep); void addWellInfo(const std::string& parameter, const std::string& value);