Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RimWellPath.h"
|
2013-10-24 00:28:45 -05:00
|
|
|
|
2014-07-24 03:11:43 -05:00
|
|
|
#include "RifJsonEncodeDecode.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
|
2017-02-24 07:31:06 -06:00
|
|
|
#include "RigWellPath.h"
|
|
|
|
|
2017-02-22 07:40:13 -06:00
|
|
|
#include "RimMainPlotCollection.h"
|
|
|
|
#include "RimProject.h"
|
2014-07-24 03:11:43 -05:00
|
|
|
#include "RimProject.h"
|
2013-10-24 02:50:16 -05:00
|
|
|
#include "RimTools.h"
|
2015-09-16 09:06:06 -05:00
|
|
|
#include "RimWellLogFile.h"
|
2015-10-22 04:31:34 -05:00
|
|
|
#include "RimWellLogPlotCollection.h"
|
2017-02-24 07:31:06 -06:00
|
|
|
#include "RimWellPathCollection.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
#include "RimWellPathFracture.h"
|
2017-01-02 04:59:30 -06:00
|
|
|
#include "RimWellPathFractureCollection.h"
|
2017-02-22 07:40:13 -06:00
|
|
|
|
2015-09-24 02:37:26 -05:00
|
|
|
#include "RiuMainWindow.h"
|
|
|
|
|
2017-02-22 07:40:13 -06:00
|
|
|
#include "RivWellPathPartMgr.h"
|
|
|
|
|
|
|
|
#include "cafPdmUiTreeOrdering.h"
|
|
|
|
|
|
|
|
#include <QDateTime>
|
2014-07-24 03:11:43 -05:00
|
|
|
#include <QDir>
|
|
|
|
#include <QFileInfo>
|
2015-09-24 02:37:26 -05:00
|
|
|
#include <QMessageBox>
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
|
|
|
CAF_PDM_SOURCE_INIT(RimWellPath, "WellPath");
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellPath::RimWellPath()
|
|
|
|
{
|
|
|
|
CAF_PDM_InitObject("WellPath", ":/Well.png", "", "");
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault(&name, "WellPathName", "Name", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
name.uiCapability()->setUiReadOnly(true);
|
|
|
|
name.xmlCapability()->setIOWritable(false);
|
|
|
|
name.xmlCapability()->setIOReadable(false);
|
|
|
|
name.uiCapability()->setUiHidden(true);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault(&id, "WellPathId", "Id", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
id.uiCapability()->setUiReadOnly(true);
|
|
|
|
id.xmlCapability()->setIOWritable(false);
|
|
|
|
id.xmlCapability()->setIOReadable(false);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault(&sourceSystem, "SourceSystem", "Source System", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
sourceSystem.uiCapability()->setUiReadOnly(true);
|
|
|
|
sourceSystem.xmlCapability()->setIOWritable(false);
|
|
|
|
sourceSystem.xmlCapability()->setIOReadable(false);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault(&utmZone, "UTMZone", "UTM Zone", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
utmZone.uiCapability()->setUiReadOnly(true);
|
|
|
|
utmZone.xmlCapability()->setIOWritable(false);
|
|
|
|
utmZone.xmlCapability()->setIOReadable(false);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault(&updateDate, "WellPathUpdateDate", "Update Date", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
updateDate.uiCapability()->setUiReadOnly(true);
|
|
|
|
updateDate.xmlCapability()->setIOWritable(false);
|
|
|
|
updateDate.xmlCapability()->setIOReadable(false);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault(&updateUser, "WellPathUpdateUser", "Update User", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
updateUser.uiCapability()->setUiReadOnly(true);
|
|
|
|
updateUser.xmlCapability()->setIOWritable(false);
|
|
|
|
updateUser.xmlCapability()->setIOReadable(false);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault(&m_surveyType, "WellPathSurveyType", "Survey Type", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
m_surveyType.uiCapability()->setUiReadOnly(true);
|
|
|
|
m_surveyType.xmlCapability()->setIOWritable(false);
|
|
|
|
m_surveyType.xmlCapability()->setIOReadable(false);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
2016-10-25 08:52:52 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault(&m_datumElevation, "DatumElevation", "Datum Elevation", "", "", "");
|
|
|
|
m_datumElevation.uiCapability()->setUiReadOnly(true);
|
|
|
|
m_datumElevation.xmlCapability()->setIOWritable(false);
|
|
|
|
m_datumElevation.xmlCapability()->setIOReadable(false);
|
|
|
|
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
CAF_PDM_InitField(&filepath, "WellPathFilepath", QString(""), "Filepath", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
filepath.uiCapability()->setUiReadOnly(true);
|
2013-06-24 15:04:52 -05:00
|
|
|
CAF_PDM_InitField(&wellPathIndexInFile, "WellPathNumberInFile", -1, "Well Number in file", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
wellPathIndexInFile.uiCapability()->setUiReadOnly(true);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
|
|
|
CAF_PDM_InitField(&showWellPathLabel, "ShowWellPathLabel", true, "Show well path label", "", "", "");
|
|
|
|
|
|
|
|
CAF_PDM_InitField(&showWellPath, "ShowWellPath", true, "Show well path", "", "", "");
|
2015-08-05 06:27:36 -05:00
|
|
|
showWellPath.uiCapability()->setUiHidden(true);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
|
|
|
CAF_PDM_InitField(&wellPathRadiusScaleFactor, "WellPathRadiusScale", 1.0, "Well path radius scale", "", "", "");
|
|
|
|
CAF_PDM_InitField(&wellPathColor, "WellPathColor", cvf::Color3f(0.999f, 0.333f, 0.999f), "Well path color", "", "", "");
|
|
|
|
|
2015-09-16 09:06:06 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault(&m_wellLogFile, "WellLogFile", "Well Log File", "", "", "");
|
|
|
|
m_wellLogFile.uiCapability()->setUiHidden(true);
|
2015-09-14 09:33:28 -05:00
|
|
|
|
2016-12-21 07:19:52 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault(&fractureCollection, "FractureCollection", "Fractures", "", "", "");
|
2017-01-02 04:59:30 -06:00
|
|
|
fractureCollection = new RimWellPathFractureCollection();
|
2016-12-21 07:19:52 -06:00
|
|
|
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
m_wellPath = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimWellPath::~RimWellPath()
|
|
|
|
{
|
2015-09-16 09:06:06 -05:00
|
|
|
if (m_wellLogFile())
|
2015-09-14 09:33:28 -05:00
|
|
|
{
|
2015-09-16 09:06:06 -05:00
|
|
|
delete m_wellLogFile;
|
2015-09-14 09:33:28 -05:00
|
|
|
}
|
2015-10-22 04:31:34 -05:00
|
|
|
|
|
|
|
RimProject* project;
|
2016-09-21 06:59:41 -05:00
|
|
|
firstAncestorOrThisOfType(project);
|
2015-10-22 04:31:34 -05:00
|
|
|
if (project)
|
|
|
|
{
|
|
|
|
if (project->mainPlotCollection())
|
|
|
|
{
|
|
|
|
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
|
|
|
if (plotCollection)
|
|
|
|
{
|
|
|
|
plotCollection->removeExtractors(m_wellPath.p());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-21 07:19:52 -06:00
|
|
|
if (fractureCollection()) delete fractureCollection();
|
|
|
|
|
|
|
|
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
caf::PdmFieldHandle* RimWellPath::userDescriptionField()
|
|
|
|
{
|
|
|
|
return &name;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::setSurveyType(QString surveyType)
|
|
|
|
{
|
|
|
|
m_surveyType = surveyType;
|
|
|
|
if (m_surveyType == "PLAN")
|
|
|
|
wellPathColor = cvf::Color3f(0.999f, 0.333f, 0.0f);
|
|
|
|
else if (m_surveyType == "PROTOTYPE")
|
|
|
|
wellPathColor = cvf::Color3f(0.0f, 0.333f, 0.999f);
|
|
|
|
}
|
|
|
|
|
2017-02-24 07:31:06 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RigWellPath* RimWellPath::wellPathGeometry()
|
|
|
|
{
|
|
|
|
return m_wellPath.p();
|
|
|
|
}
|
|
|
|
|
2015-12-03 12:31:34 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
RivWellPathPartMgr* RimWellPath::partMgr()
|
|
|
|
{
|
|
|
|
if (m_wellPathPartMgr.isNull())
|
|
|
|
{
|
2015-12-01 05:27:19 -06:00
|
|
|
RimWellPathCollection* wpColl;
|
2016-09-21 06:59:41 -05:00
|
|
|
this->firstAncestorOrThisOfType(wpColl);
|
2015-12-03 12:31:34 -06:00
|
|
|
if (wpColl) m_wellPathPartMgr = new RivWellPathPartMgr(this);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return m_wellPathPartMgr.p();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
|
|
|
{
|
|
|
|
partMgr()->scheduleGeometryRegen();
|
2015-12-01 05:27:19 -06:00
|
|
|
|
|
|
|
RimProject* proj;
|
2016-09-21 06:59:41 -05:00
|
|
|
this->firstAncestorOrThisOfType(proj);
|
2015-12-01 05:27:19 -06:00
|
|
|
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
caf::PdmFieldHandle* RimWellPath::objectToggleField()
|
|
|
|
{
|
|
|
|
return &showWellPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2015-10-12 05:40:10 -05:00
|
|
|
/// Read JSON or ascii file containing well path data
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2015-12-01 05:27:19 -06:00
|
|
|
bool RimWellPath::readWellPathFile(QString* errorMessage, RifWellPathAsciiFileReader* asciiReader)
|
2013-06-18 04:56:51 -05:00
|
|
|
{
|
2015-10-12 05:40:10 -05:00
|
|
|
QFileInfo fileInf(filepath());
|
2013-06-26 05:01:53 -05:00
|
|
|
|
2015-10-12 05:40:10 -05:00
|
|
|
if (fileInf.isFile() && fileInf.exists())
|
2013-06-18 04:56:51 -05:00
|
|
|
{
|
2015-10-12 05:40:10 -05:00
|
|
|
if (fileInf.suffix().compare("json") == 0)
|
|
|
|
{
|
|
|
|
this->readJsonWellPathFile();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-12-01 05:27:19 -06:00
|
|
|
this->readAsciiWellPathFile(asciiReader);
|
2015-10-12 05:40:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
2013-06-18 04:56:51 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-10-12 05:40:10 -05:00
|
|
|
if (errorMessage) (*errorMessage) = "Could not find the well path file: " + filepath();
|
2013-06-18 04:56:51 -05:00
|
|
|
|
2015-10-12 05:40:10 -05:00
|
|
|
return false;
|
|
|
|
}
|
2013-06-18 04:56:51 -05:00
|
|
|
}
|
|
|
|
|
2017-02-24 07:31:06 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::setWellPathGeometry(RigWellPath* wellPathModel)
|
|
|
|
{
|
|
|
|
m_wellPath = wellPathModel;
|
|
|
|
}
|
|
|
|
|
2013-06-18 04:56:51 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
/// Read JSON file containing well path data
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::readJsonWellPathFile()
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
{
|
|
|
|
RigWellPath* wellPathGeom = new RigWellPath();
|
2016-06-06 03:43:36 -05:00
|
|
|
ResInsightInternalJson::JsonReader jsonReader;
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
QMap<QString, QVariant> jsonMap = jsonReader.decodeFile(filepath);
|
|
|
|
|
|
|
|
// General well info
|
2013-06-18 04:56:51 -05:00
|
|
|
|
|
|
|
name = jsonMap["name"].toString();
|
|
|
|
id = jsonMap["id"].toString();
|
|
|
|
sourceSystem = jsonMap["sourceSystem"].toString();
|
|
|
|
utmZone = jsonMap["utmZone"].toString();
|
|
|
|
updateUser = jsonMap["updateUser"].toString();
|
|
|
|
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
setSurveyType(jsonMap["surveyType"].toString());
|
|
|
|
|
|
|
|
// Convert updateDate from the following format:
|
2013-06-18 04:56:51 -05:00
|
|
|
// "Number of milliseconds elapsed since midnight Coordinated Universal Time (UTC)
|
|
|
|
// of January 1, 1970, not counting leap seconds"
|
|
|
|
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
QString updateDateStr = jsonMap["updateDate"].toString().trimmed();
|
|
|
|
uint updateDateUint = updateDateStr.toULongLong() / 1000; // should be within 32 bit, maximum number is 4294967295 which corresponds to year 2106
|
|
|
|
QDateTime updateDateTime;
|
|
|
|
updateDateTime.setTime_t(updateDateUint);
|
2013-06-18 04:56:51 -05:00
|
|
|
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
updateDate = updateDateTime.toString("d MMMM yyyy");
|
|
|
|
|
2013-06-18 04:56:51 -05:00
|
|
|
// Well path points
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
|
|
|
double datumElevation = jsonMap["datumElevation"].toDouble();
|
2016-10-25 08:52:52 -05:00
|
|
|
wellPathGeom->setDatumElevation(datumElevation);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
|
|
|
|
QList<QVariant> pathList = jsonMap["path"].toList();
|
|
|
|
foreach (QVariant point, pathList)
|
|
|
|
{
|
|
|
|
QMap<QString, QVariant> coordinateMap = point.toMap();
|
|
|
|
cvf::Vec3d vec3d(coordinateMap["east"].toDouble(), coordinateMap["north"].toDouble(), -(coordinateMap["tvd"].toDouble() - datumElevation));
|
|
|
|
wellPathGeom->m_wellPathPoints.push_back(vec3d);
|
2015-09-10 07:37:05 -05:00
|
|
|
|
|
|
|
double measuredDepth = coordinateMap["md"].toDouble();
|
|
|
|
wellPathGeom->m_measuredDepths.push_back(measuredDepth);
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
p4#: 21651
2013-05-16 05:59:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//jsonReader.dumpToFile(wellPathGeom->m_wellPathPoints, "c:\\temp\\jsonpoints.txt");
|
|
|
|
setWellPathGeometry(wellPathGeom);
|
|
|
|
}
|
2013-06-18 04:56:51 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2013-06-24 15:04:52 -05:00
|
|
|
///
|
2013-06-18 04:56:51 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2015-12-01 05:27:19 -06:00
|
|
|
void RimWellPath::readAsciiWellPathFile(RifWellPathAsciiFileReader* asciiReader)
|
2013-06-18 04:56:51 -05:00
|
|
|
{
|
2015-12-01 05:27:19 -06:00
|
|
|
CVF_ASSERT(asciiReader);
|
|
|
|
|
|
|
|
RifWellPathAsciiFileReader::WellData wpData = asciiReader->readWellData(filepath(), wellPathIndexInFile());
|
2013-06-24 15:04:52 -05:00
|
|
|
this->name = wpData.m_name;
|
2013-06-18 04:56:51 -05:00
|
|
|
|
2013-06-24 15:04:52 -05:00
|
|
|
setWellPathGeometry(wpData.m_wellPathGeometry.p());
|
2013-06-18 04:56:51 -05:00
|
|
|
}
|
2013-10-17 06:37:59 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
|
|
|
{
|
|
|
|
caf::PdmUiGroup* appGroup = uiOrdering.addNewGroup("Appearance");
|
|
|
|
appGroup->add(&showWellPathLabel);
|
|
|
|
appGroup->add(&wellPathColor);
|
|
|
|
appGroup->add(&wellPathRadiusScaleFactor);
|
|
|
|
|
|
|
|
caf::PdmUiGroup* fileInfoGroup = uiOrdering.addNewGroup("File");
|
|
|
|
fileInfoGroup->add(&filepath);
|
|
|
|
fileInfoGroup->add(&wellPathIndexInFile);
|
|
|
|
|
|
|
|
caf::PdmUiGroup* ssihubGroup = uiOrdering.addNewGroup("Well Info");
|
|
|
|
ssihubGroup->add(&id);
|
|
|
|
ssihubGroup->add(&sourceSystem);
|
|
|
|
ssihubGroup->add(&utmZone);
|
|
|
|
ssihubGroup->add(&updateDate);
|
|
|
|
ssihubGroup->add(&updateUser);
|
|
|
|
ssihubGroup->add(&m_surveyType);
|
2016-10-25 08:52:52 -05:00
|
|
|
ssihubGroup->add(&m_datumElevation);
|
|
|
|
|
|
|
|
if (m_wellPath.notNull() && m_wellPath->hasDatumElevation())
|
|
|
|
{
|
|
|
|
m_datumElevation = m_wellPath->datumElevation();
|
|
|
|
m_datumElevation.uiCapability()->setUiHidden(false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_datumElevation.uiCapability()->setUiHidden(true);
|
|
|
|
}
|
2013-10-17 06:37:59 -05:00
|
|
|
}
|
2013-10-24 00:28:45 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RimWellPath::getCacheDirectoryPath()
|
|
|
|
{
|
2013-10-24 02:50:16 -05:00
|
|
|
QString cacheDirPath = RimTools::getCacheRootDirectoryPathFromProject();
|
|
|
|
cacheDirPath += "_wellpaths";
|
2013-10-24 00:28:45 -05:00
|
|
|
return cacheDirPath;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RimWellPath::getCacheFileName()
|
|
|
|
{
|
2015-10-12 05:40:10 -05:00
|
|
|
if (filepath().isEmpty())
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2013-10-24 00:28:45 -05:00
|
|
|
QString cacheFileName;
|
|
|
|
|
|
|
|
// Make the path correct related to the possibly new project filename
|
|
|
|
QString newCacheDirPath = getCacheDirectoryPath();
|
|
|
|
QFileInfo oldCacheFile(filepath);
|
|
|
|
|
2015-10-12 05:40:10 -05:00
|
|
|
|
2013-10-24 00:28:45 -05:00
|
|
|
cacheFileName = newCacheDirPath + "/" + oldCacheFile.fileName();
|
|
|
|
|
|
|
|
return cacheFileName;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::setupBeforeSave()
|
|
|
|
{
|
|
|
|
// SSIHUB is the only source for populating Id, use text in this field to decide if the cache file must be copied to new project cache location
|
2013-10-24 02:50:16 -05:00
|
|
|
if (!isStoredInCache())
|
2013-10-24 00:28:45 -05:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-10-12 05:40:10 -05:00
|
|
|
if (filepath().isEmpty())
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-10-24 00:28:45 -05:00
|
|
|
QDir::root().mkpath(getCacheDirectoryPath());
|
|
|
|
|
|
|
|
QString newCacheFileName = getCacheFileName();
|
|
|
|
|
|
|
|
// Use QFileInfo to get same string representation to avoid issues with mix of forward and backward slashes
|
|
|
|
QFileInfo prevFileInfo(filepath);
|
|
|
|
QFileInfo currentFileInfo(newCacheFileName);
|
|
|
|
|
|
|
|
if (prevFileInfo.absoluteFilePath().compare(currentFileInfo.absoluteFilePath()) != 0)
|
|
|
|
{
|
|
|
|
QFile::copy(filepath, newCacheFileName);
|
|
|
|
|
|
|
|
filepath = newCacheFileName;
|
|
|
|
}
|
|
|
|
}
|
2013-10-24 02:50:16 -05:00
|
|
|
|
2017-02-22 07:40:13 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
|
|
|
{
|
|
|
|
for (RimWellPathFracture* fracture : fractureCollection()->fractures())
|
|
|
|
{
|
|
|
|
uiTreeOrdering.add(fracture);
|
|
|
|
}
|
2017-04-03 00:34:56 -05:00
|
|
|
uiTreeOrdering.skipRemainingChildren(true);
|
2017-02-22 07:40:13 -06:00
|
|
|
}
|
|
|
|
|
2013-10-24 02:50:16 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RimWellPath::isStoredInCache()
|
|
|
|
{
|
|
|
|
// SSIHUB is the only source for populating Id, use text in this field to decide if the cache file must be copied to new project cache location
|
|
|
|
return !id().isEmpty();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2016-06-29 09:09:27 -05:00
|
|
|
void RimWellPath::updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath)
|
2013-10-24 02:50:16 -05:00
|
|
|
{
|
2016-06-29 09:09:27 -05:00
|
|
|
if (isStoredInCache())
|
|
|
|
{
|
|
|
|
QString newCacheFileName = getCacheFileName();
|
2013-10-24 02:50:16 -05:00
|
|
|
|
2016-06-29 09:09:27 -05:00
|
|
|
if (QFile::exists(newCacheFileName))
|
|
|
|
{
|
|
|
|
filepath = newCacheFileName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2013-10-24 02:50:16 -05:00
|
|
|
{
|
2016-06-29 09:09:27 -05:00
|
|
|
filepath = RimTools::relocateFile(filepath(), newProjectPath, oldProjectPath, NULL, NULL);
|
2013-10-24 02:50:16 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-09-14 09:33:28 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2015-09-16 09:06:06 -05:00
|
|
|
void RimWellPath::setLogFileInfo(RimWellLogFile* logFileInfo)
|
2015-09-14 09:33:28 -05:00
|
|
|
{
|
2015-09-16 09:06:06 -05:00
|
|
|
if (m_wellLogFile())
|
2015-09-14 09:33:28 -05:00
|
|
|
{
|
2015-09-16 09:06:06 -05:00
|
|
|
delete m_wellLogFile;
|
2015-09-14 09:33:28 -05:00
|
|
|
}
|
|
|
|
|
2015-09-16 09:06:06 -05:00
|
|
|
m_wellLogFile = logFileInfo;
|
|
|
|
m_wellLogFile->uiCapability()->setUiHidden(true);
|
2015-09-14 09:33:28 -05:00
|
|
|
|
2015-09-16 09:06:06 -05:00
|
|
|
this->name = m_wellLogFile->wellName();
|
2015-09-14 09:33:28 -05:00
|
|
|
}
|