#12674: Compute the TVDMSL unit string as a separate step

Review: one AddLog call for TVDMSL instead of one per unit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Stefan CrooijmansandClaude Opus 5.5 authored and Magne Sjaastad committed 2026-10-24 11:26:22 +02:00
1 parent ba74293e21
commit 502eaf43bd
1 file changed
+8 -12
@@ -188,25 +188,21 @@ public:
if ( !firstCurveData.depths( RiaDefines::DepthType::TRUE_VERTICAL_DEPTH ).empty() )
{
std::string tvdUnit;
std::string tvdComment = "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 ) );
tvdUnit = "M";
tvdComment += " in meters";
}
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 ) );
tvdUnit = "FT";
tvdComment += " in feet";
}
lasFile->AddLog( "TVDMSL", tvdUnit, tvdComment, firstCurveData.depths( RiaDefines::DepthType::TRUE_VERTICAL_DEPTH ) );
if ( m_exportTvdrkb && m_rkbDiff != -1.0 )
{
// Export True Vertical Depth Rotary Kelly Bushing - TVDRKB