From ba74293e214b4f9d26fb7083abbc8456ef4c68a5 Mon Sep 17 00:00:00 2001 From: Stefan Crooijmans Date: Thu, 22 Oct 2026 15:54:54 +0200 Subject: [PATCH] #12674: Export TVDMSL in the depth unit of the curve TVDMSL was always written with unit M and the comment "True vertical depth in meters", also for a FIELD case whose values are in feet. Write it with the depth unit of the curve, as DEPTH and TVDRKB already are. Co-Authored-By: Claude Fable 5.1 --- .../ReservoirDataModel/RigLasFileExporter.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ApplicationLibCode/ReservoirDataModel/RigLasFileExporter.cpp b/ApplicationLibCode/ReservoirDataModel/RigLasFileExporter.cpp index 5f97e7f2b6..6348ac9980 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigLasFileExporter.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigLasFileExporter.cpp @@ -188,7 +188,24 @@ public: if ( !firstCurveData.depths( RiaDefines::DepthType::TRUE_VERTICAL_DEPTH ).empty() ) { - lasFile->AddLog( "TVDMSL", "M", "True vertical depth in meters", firstCurveData.depths( RiaDefines::DepthType::TRUE_VERTICAL_DEPTH ) ); + if ( firstCurveData.depthUnit() == RiaDefines::DepthUnitType::UNIT_METER ) + { + lasFile->AddLog( "TVDMSL", + "M", + "True vertical depth in meters", + firstCurveData.depths( RiaDefines::DepthType::TRUE_VERTICAL_DEPTH ) ); + } + else if ( firstCurveData.depthUnit() == RiaDefines::DepthUnitType::UNIT_FEET ) + { + lasFile->AddLog( "TVDMSL", + "FT", + "True vertical depth in feet", + firstCurveData.depths( RiaDefines::DepthType::TRUE_VERTICAL_DEPTH ) ); + } + else if ( firstCurveData.depthUnit() == RiaDefines::DepthUnitType::UNIT_NONE ) + { + lasFile->AddLog( "TVDMSL", "", "True vertical depth", firstCurveData.depths( RiaDefines::DepthType::TRUE_VERTICAL_DEPTH ) ); + } if ( m_exportTvdrkb && m_rkbDiff != -1.0 ) {