#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 <noreply@anthropic.com>
This commit is contained in:
Stefan CrooijmansandClaude Fable 5.1 authored and Magne Sjaastad committed 2026-10-24 11:26:22 +02:00
1 parent 03eff53507
commit ba74293e21
1 file changed
+18 -1
@@ -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 )
{