mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 05:37:21 -05:00
Added framework used to handle utm area of interest
p4#: 21775
This commit is contained in:
@@ -467,3 +467,39 @@ void RimProject::createDisplayModelAndRedrawAllViews()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::computeUtmAreaOfInterest(double* north, double* south, double* east, double* west)
|
||||
{
|
||||
CVF_ASSERT(north && south && east && west);
|
||||
std::vector<RimCase*> cases;
|
||||
allCases(cases);
|
||||
|
||||
cvf::BoundingBox projectBB;
|
||||
|
||||
for (size_t i = 0; i < cases.size(); i++)
|
||||
{
|
||||
RimCase* rimCase = cases[i];
|
||||
|
||||
if (rimCase && rimCase->reservoirData())
|
||||
{
|
||||
for (size_t gridIdx = 0; gridIdx < rimCase->reservoirData()->gridCount(); gridIdx++ )
|
||||
{
|
||||
RigGridBase* rigGrid = rimCase->reservoirData()->grid(gridIdx);
|
||||
|
||||
projectBB.add(rigGrid->boundingBox());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (projectBB.isValid())
|
||||
{
|
||||
*north = projectBB.max().y();
|
||||
*south = projectBB.min().y();
|
||||
|
||||
*west = projectBB.min().x();
|
||||
*east = projectBB.max().x();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ public:
|
||||
void allCases(std::vector<RimCase*>& cases);
|
||||
void createDisplayModelAndRedrawAllViews();
|
||||
|
||||
void computeUtmAreaOfInterest(double* north, double* south, double* east, double* west);
|
||||
|
||||
private:
|
||||
RigMainGrid* registerCaseInGridCollection(RigCaseData* rigEclipseCase);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user