#820 Export of TVD along with MD to LAS file

Now the tvd data is always put into the RigWellLogCurveData
Existing tvd data is written to LAS file.
This commit is contained in:
Jacob Støren 2016-09-12 16:43:31 +02:00
parent 382bf84036
commit 2ea167337f
5 changed files with 50 additions and 32 deletions

View File

@ -218,15 +218,8 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
if (eclExtractor.notNull())
{
RimWellLogPlot* wellLogPlot;
firstAnchestorOrThisOfType(wellLogPlot);
CVF_ASSERT(wellLogPlot);
measuredDepthValues = eclExtractor->measuredDepth();
if (wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
{
tvDepthValues = eclExtractor->trueVerticalDepth();
}
tvDepthValues = eclExtractor->trueVerticalDepth();
m_eclipseResultDefinition->loadResult();
@ -251,15 +244,9 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
}
else if (geomExtractor.notNull()) // geomExtractor
{
RimWellLogPlot* wellLogPlot;
firstAnchestorOrThisOfType(wellLogPlot);
CVF_ASSERT(wellLogPlot);
measuredDepthValues = geomExtractor->measuredDepth();
if (wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
{
tvDepthValues = geomExtractor->trueVerticalDepth();
}
tvDepthValues = geomExtractor->trueVerticalDepth();
m_geomResultDefinition->loadResult();
@ -283,12 +270,19 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
RimWellLogPlot* wellLogPlot;
firstAnchestorOrThisOfType(wellLogPlot);
if (wellLogPlot)
CVF_ASSERT(wellLogPlot);
displayUnit = wellLogPlot->depthUnit();
if(wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
{
displayUnit = wellLogPlot->depthUnit();
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->trueDepthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
}
else
{
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->measuredDepthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
}
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->depthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
zoomAllParentPlot();

View File

@ -120,7 +120,7 @@ void RimWellLogFileCurve::onLoadDataAndUpdate()
displayUnit = wellLogPlot->depthUnit();
}
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->depthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->measuredDepthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
zoomAllParentPlot();

View File

@ -102,6 +102,14 @@ const std::vector<double>& RigWellLogCurveData::measuredDepths() const
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<double>& RigWellLogCurveData::tvDepths() const
{
return m_tvDepths;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -116,12 +124,12 @@ std::vector<double> RigWellLogCurveData::xPlotValues() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<double> RigWellLogCurveData::depthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const
std::vector<double> RigWellLogCurveData::trueDepthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const
{
std::vector<double> filteredValues;
if (m_tvDepths.size())
if(m_tvDepths.size())
{
if (destinationDepthUnit == m_depthUnit)
if(destinationDepthUnit == m_depthUnit)
{
RigCurveDataTools::getValuesByIntervals(m_tvDepths, m_intervalsOfContinousValidValues, &filteredValues);
}
@ -131,17 +139,25 @@ std::vector<double> RigWellLogCurveData::depthPlotValues(RimDefines::DepthUnitTy
RigCurveDataTools::getValuesByIntervals(convertedValues, m_intervalsOfContinousValidValues, &filteredValues);
}
}
return filteredValues;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<double> RigWellLogCurveData::measuredDepthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const
{
std::vector<double> filteredValues;
if(destinationDepthUnit == m_depthUnit)
{
RigCurveDataTools::getValuesByIntervals(m_measuredDepths, m_intervalsOfContinousValidValues, &filteredValues);
}
else
{
if (destinationDepthUnit == m_depthUnit)
{
RigCurveDataTools::getValuesByIntervals(m_measuredDepths, m_intervalsOfContinousValidValues, &filteredValues);
}
else
{
std::vector<double> convertedValues = convertDepthValues(destinationDepthUnit, m_measuredDepths);
RigCurveDataTools::getValuesByIntervals(convertedValues, m_intervalsOfContinousValidValues, &filteredValues);
}
std::vector<double> convertedValues = convertDepthValues(destinationDepthUnit, m_measuredDepths);
RigCurveDataTools::getValuesByIntervals(convertedValues, m_intervalsOfContinousValidValues, &filteredValues);
}
return filteredValues;

View File

@ -49,12 +49,14 @@ public:
const std::vector<double>& xValues() const;
const std::vector<double>& measuredDepths() const;
const std::vector<double>& tvDepths() const;
bool calculateMDRange(double* minMD, double* maxMD) const;
RimDefines::DepthUnitType depthUnit() const;
std::vector<double> xPlotValues() const;
std::vector<double> depthPlotValues(RimDefines::DepthUnitType displayDepthUnit) const;
std::vector<double> trueDepthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const;
std::vector<double> measuredDepthPlotValues(RimDefines::DepthUnitType destinationDepthUnit) const;
std::vector< std::pair<size_t, size_t> > polylineStartStopIndices() const;
private:

View File

@ -279,6 +279,12 @@ bool RigWellLogFile::exportToLasFile(const RimWellLogCurve* curve, const QString
else if (curveData->depthUnit() == RimDefines::UNIT_FEET)
{
lasFile.AddLog("DEPTH", "FT", "Depth in feet", curveData->measuredDepths());
}
if(curveData->tvDepths().size())
{
lasFile.AddLog("TVD", "M", "True vertical depth in meters", curveData->tvDepths());
}
lasFile.AddLog(wellLogChannelName.trimmed().toStdString(), "NO_UNIT", "", wellLogValues);