mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 23:46:00 -06:00
#2227 Well formations: Remove fluid annotation duplicates
This commit is contained in:
parent
03b03cd438
commit
fb876f8fdc
@ -87,6 +87,7 @@ namespace caf
|
||||
template<>
|
||||
void AppEnum<RigWellPathFormations::FormationLevel>::setUp()
|
||||
{
|
||||
addItem(RigWellPathFormations::NONE, "NONE", "None");
|
||||
addItem(RigWellPathFormations::ALL, "ALL", "All");
|
||||
addItem(RigWellPathFormations::GROUP, "GROUP", "Formation Group");
|
||||
addItem(RigWellPathFormations::LEVEL0, "LEVEL0", "Formation");
|
||||
@ -100,6 +101,7 @@ namespace caf
|
||||
addItem(RigWellPathFormations::LEVEL8, "LEVEL8", "Formation 8");
|
||||
addItem(RigWellPathFormations::LEVEL9, "LEVEL9", "Formation 9");
|
||||
addItem(RigWellPathFormations::LEVEL10, "LEVEL10", "Formation 10");
|
||||
setDefault(RigWellPathFormations::ALL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,7 +131,7 @@ RimWellLogTrack::RimWellLogTrack()
|
||||
|
||||
CAF_PDM_InitField(&m_showFormations, "ShowFormations", false, "Show", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_formationSource, "FormationSource", "Formation Source", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_formationSource, "FormationSource", "Source", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_formationTrajectoryType, "FormationTrajectoryType", "Trajectory", "", "", "");
|
||||
|
||||
@ -362,9 +364,12 @@ QList<caf::PdmOptionItemInfo> RimWellLogTrack::calculateValueOptions(const caf::
|
||||
if (formations)
|
||||
{
|
||||
using FormationLevelEnum = caf::AppEnum<RigWellPathFormations::FormationLevel>;
|
||||
|
||||
options.push_back(caf::PdmOptionItemInfo(FormationLevelEnum::uiText(RigWellPathFormations::NONE),
|
||||
RigWellPathFormations::NONE));
|
||||
|
||||
options.push_back(caf::PdmOptionItemInfo(FormationLevelEnum::uiText(RigWellPathFormations::ALL),
|
||||
FormationLevelEnum::fromText("All")));
|
||||
RigWellPathFormations::ALL));
|
||||
|
||||
for (const RigWellPathFormations::FormationLevel& level : formations->formationsLevelsPresent())
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ void evaluateFormations(const std::vector<std::pair<RigWellPathFormation, RigWel
|
||||
md = formation.first.mdBase;
|
||||
}
|
||||
|
||||
if (formation.second == RigWellPathFormations::FLUIDS)
|
||||
if (formation.second == RigWellPathFormations::FLUID)
|
||||
{
|
||||
if (includeFluids)
|
||||
{
|
||||
@ -150,6 +150,28 @@ void evaluateFormations(const std::vector<std::pair<RigWellPathFormation, RigWel
|
||||
}
|
||||
}
|
||||
|
||||
void evaluateFluids(const std::vector<std::pair<RigWellPathFormation, RigWellPathFormations::FormationLevel>>& formations,
|
||||
std::map<double, LevelAndName, MeasuredDepthComp>* uniqueListMaker)
|
||||
{
|
||||
for (const std::pair<RigWellPathFormation, RigWellPathFormations::FormationLevel>& formation : formations)
|
||||
{
|
||||
if (formation.second == RigWellPathFormations::FLUID)
|
||||
{
|
||||
(*uniqueListMaker)[formation.first.mdBase] =
|
||||
LevelAndName(formation.second, formation.first.formationName + " Base");
|
||||
}
|
||||
}
|
||||
|
||||
for (const std::pair<RigWellPathFormation, RigWellPathFormations::FormationLevel>& formation : formations)
|
||||
{
|
||||
if (formation.second == RigWellPathFormations::FLUID)
|
||||
{
|
||||
(*uniqueListMaker)[formation.first.mdTop] =
|
||||
LevelAndName(formation.second, formation.first.formationName + " Top");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -160,17 +182,29 @@ void RigWellPathFormations::measuredDepthAndFormationNamesUpToLevel(FormationLev
|
||||
names->clear();
|
||||
measuredDepths->clear();
|
||||
|
||||
if (maxLevel == RigWellPathFormations::ALL)
|
||||
std::map<double, LevelAndName, MeasuredDepthComp> tempMakeVectorUniqueOnMeasuredDepth;
|
||||
|
||||
if (maxLevel == RigWellPathFormations::NONE)
|
||||
{
|
||||
if (includeFluids)
|
||||
{
|
||||
evaluateFluids(m_formations, &tempMakeVectorUniqueOnMeasuredDepth);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (maxLevel == RigWellPathFormations::ALL)
|
||||
{
|
||||
measuredDepthAndFormationNamesWithoutDuplicatesOnDepth(names, measuredDepths);
|
||||
return;
|
||||
}
|
||||
|
||||
std::map<double, LevelAndName, MeasuredDepthComp> tempMakeVectorUniqueOnMeasuredDepth;
|
||||
|
||||
evaluateFormations(m_formations, maxLevel, includeFluids, PICK_POSITION::TOP, &tempMakeVectorUniqueOnMeasuredDepth);
|
||||
|
||||
evaluateFormations(m_formations, maxLevel, includeFluids, PICK_POSITION::BASE, &tempMakeVectorUniqueOnMeasuredDepth);
|
||||
else
|
||||
{
|
||||
evaluateFormations(m_formations, maxLevel, includeFluids, PICK_POSITION::TOP, &tempMakeVectorUniqueOnMeasuredDepth);
|
||||
evaluateFormations(m_formations, maxLevel, includeFluids, PICK_POSITION::BASE, &tempMakeVectorUniqueOnMeasuredDepth);
|
||||
}
|
||||
|
||||
for (auto it = tempMakeVectorUniqueOnMeasuredDepth.begin(); it != tempMakeVectorUniqueOnMeasuredDepth.end(); it++)
|
||||
{
|
||||
@ -226,7 +260,7 @@ RigWellPathFormations::FormationLevel RigWellPathFormations::detectLevel(QString
|
||||
|
||||
if (formationName == "OIL" || formationName == "GAS" || formationName == "WATER")
|
||||
{
|
||||
return RigWellPathFormations::FLUIDS;
|
||||
return RigWellPathFormations::FLUID;
|
||||
}
|
||||
|
||||
bool isGroupName = true;
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
|
||||
enum FormationLevel
|
||||
{
|
||||
GROUP, LEVEL0, LEVEL1, LEVEL2, LEVEL3, LEVEL4, LEVEL5, LEVEL6, LEVEL7, LEVEL8, LEVEL9, LEVEL10, ALL, FLUIDS, UNKNOWN
|
||||
GROUP, LEVEL0, LEVEL1, LEVEL2, LEVEL3, LEVEL4, LEVEL5, LEVEL6, LEVEL7, LEVEL8, LEVEL9, LEVEL10, ALL, FLUID, UNKNOWN, NONE
|
||||
};
|
||||
|
||||
void measuredDepthAndFormationNamesUpToLevel(FormationLevel level, std::vector<QString>* names,
|
||||
|
Loading…
Reference in New Issue
Block a user