Added framework used to handle utm area of interest

p4#: 21775
This commit is contained in:
Magne Sjaastad
2013-05-31 13:57:16 +02:00
parent ead2eac08b
commit ea4491e987
9 changed files with 241 additions and 53 deletions
@@ -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);