My Project
WellboreTrajectoryRepresentation.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2017)
3 
4 philippe.verney@f2i-consulting.com
5 
6 This software is a computer program whose purpose is to access to data formatted using Energistics standards.
7 
8 This software is governed by the CeCILL-B license under French law and
9 abiding by the rules of distribution of free software. You can use,
10 modify and/ or redistribute the software under the terms of the CeCILL-B
11 license as circulated by CEA, CNRS and INRIA at the following URL
12 "http://www.cecill.info".
13 
14 As a counterpart to the access to the source code and rights to copy,
15 modify and redistribute granted by the license, users are provided only
16 with a limited warranty and the software's author, the holder of the
17 economic rights, and the successive licensors have only limited
18 liability.
19 
20 In this respect, the user's attention is drawn to the risks associated
21 with loading, using, modifying and/or developing or reproducing the
22 software by the user in light of its specific status of free software,
23 that may mean that it is complicated to manipulate, and that also
24 therefore means that it is reserved for developers and experienced
25 professionals having in-depth computer knowledge. Users are therefore
26 encouraged to load and test the software's suitability as regards their
27 requirements in conditions enabling the security of their systems and/or
28 data to be ensured and, more generally, to use and operate it in the
29 same conditions as regards security.
30 
31 The fact that you are presently reading this means that you have had
32 knowledge of the CeCILL-B license and that you accept its terms.
33 -----------------------------------------------------------------------*/
34 #pragma once
35 
36 #include "resqml2/AbstractRepresentation.h"
37 
38 namespace witsml1_4_1_1
39 {
40  class Trajectory;
41 }
42 
43 namespace resqml2_0_1
44 {
46  {
47  private:
48  gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const {return nullptr;}
49 
50  gsoap_resqml2_0_1::_resqml2__WellboreTrajectoryRepresentation* getSpecializedGsoapProxy() const;
51 
52  public:
53 
57  WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) :AbstractRepresentation(partialObject) {}
58 
59 
67  WellboreTrajectoryRepresentation(class WellboreInterpretation* interp, const std::string & guid, const std::string & title, resqml2::MdDatum * mdInfo);
68 
72  WellboreTrajectoryRepresentation(class WellboreInterpretation* interp, const std::string & guid, const std::string & title, DeviationSurveyRepresentation* deviationSurvey);
73 
77  WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::_resqml2__WellboreTrajectoryRepresentation* fromGsoap): AbstractRepresentation(fromGsoap),
78  witsmlTrajectory(nullptr) {}
79 
81 
82  static const char* XML_TAG;
83  virtual std::string getXmlTag() const {return XML_TAG;}
84 
85  /*
86  * Set the geometry of the representation by means of a parametric line without MD information.
87  * @param controlPoints All the control points of all the cubic parametric lines. They are ordered by parametric line first.
88  * @param controlPointCount The count of control points and control point parameters per cubic parametric line.
89  * @param lineKind Integer indicating the parametric line kind: 0 for vertical, 1 for linear spline, 2 for natural cubic spline, 3 for cubic spline, 4 for z linear cubic spline, 5 for minimum-curvature spline, (-1) for null: no line
90  * @param proxy The HDF proxy which indicates in which HDF5 file the control points and its parameters will be stored.
91  * It must be already opened for writing and won't be closed.
92  */
93  void setGeometry(double * controlPoints, const double & startMd, const double & endMd, const unsigned int & controlPointCount, const int & lineKind, common::AbstractHdfProxy* proxy);
94 
95  /*
96  * Set the geometry of the representation by means of one natural cubic parametric line.
97  * @param controlPoints All the control points of all the cubic parametric lines. They are ordered by parametric line first.
98  * @param controlPointCount The count of control points and control point parameters per cubic parametric line.
99  * @param controlPointParameters The arrays of control point parameters (ordered regarding the control points). It corresponds to the MD values in a WellboreFeature context.
100  * @param proxy The HDF proxy which indicates in which HDF5 file the control points and its parameters will be stored.
101  * It must be already opened for writing and won't be closed.
102  */
103  void setGeometry(double * controlPoints, double* controlPointParameters, const unsigned int & controlPointCount,
104  common::AbstractHdfProxy* proxy);
105 
106  /*
107  * Set the geometry of the representation by means of one cubic parametric line.
108  * @param controlPoints All the control points of all the cubic parametric lines. They are ordered by parametric line first.
109  * @param tangentVectors All the tangent vectors of all the control points of all the cubic parametric lines. They are ordered according to the control points.
110  * @param controlPointCount The count of control points and control point parameters and tangent vectors per cubic parametric line.
111  * @param controlPointParameters The arrays of control point parameters (ordered regarding the control points). It corresponds to the MD values in a WellboreFeature context.
112  * @param proxy The HDF proxy which indicates in which HDF5 file the parameters and the tangent vectors will be stored.
113  * It must be already opened for writing and won't be closed.
114  */
115  void setGeometry(double * controlPoints,
116  double * tangentVectors, double* controlPointParameters, const unsigned int & controlPointCount,
117  common::AbstractHdfProxy* proxy);
118 
122  int getGeometryKind() const;
123 
127  void setMdDatum(resqml2::MdDatum* mdDatum);
128 
132  resqml2::MdDatum * getMdDatum() const;
133 
137  std::string getMdDatumUuid() const;
138 
142  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
143 
149  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
150 
154  bool hasMdValues() const;
155 
159  gsoap_resqml2_0_1::eml20__LengthUom getMdUom() const;
160 
164  void getMdValues(double* values);
165 
169  double getStartMd() const;
170 
174  double getFinishMd() const;
175 
179  bool hasTangentVectors() const;
180 
184  void getTangentVectors(double* tangentVectors);
185 
190  void addParentTrajectory(const double & kickoffMd, const double & parentMd, WellboreTrajectoryRepresentation* parentTrajRep);
191 
196  WellboreTrajectoryRepresentation* getParentTrajectory() const;
197 
201  const double& getParentTrajectoryMd() const;
202 
206  const std::vector<WellboreTrajectoryRepresentation*> & getChildrenTrajectorySet() const;
207 
212  void addWellboreFrameRepresentation(class WellboreFrameRepresentation* WellboreFrameRepresentation) {wellboreFrameRepresentationSet.push_back(WellboreFrameRepresentation);}
213 
217  const std::vector<class WellboreFrameRepresentation*>& getWellboreFrameRepresentationSet() const {return wellboreFrameRepresentationSet;}
218 
223  unsigned int getWellboreFrameRepresentationCount() const {return wellboreFrameRepresentationSet.size();}
224 
230  class WellboreFrameRepresentation* getWellboreFrameRepresentation(const unsigned int & index) const {return wellboreFrameRepresentationSet[index];}
231 
235  void setDeviationSurvey(class DeviationSurveyRepresentation* deviationSurvey);
236 
240  class DeviationSurveyRepresentation* getDeviationSurvey() const;
241 
245  gsoap_resqml2_0_1::eml20__DataObjectReference* getLocalCrsDor() const;
246 
247  std::string getHdfProxyUuid() const;
248 
249  unsigned int getPatchCount() const {return 1;}
250 
251  bool hasGeometry() const;
252 
253  void setWitsmlTrajectory(witsml1_4_1_1::Trajectory * witsmlTraj);
254  witsml1_4_1_1::Trajectory * getWitsmlTrajectory() {return witsmlTrajectory;}
255 
256  private:
261  void addChildrenTrajectory(WellboreTrajectoryRepresentation* childrenTraj) { childrenTrajSet.push_back(childrenTraj); }
262 
266  gsoap_resqml2_0_1::eml20__DataObjectReference* getDeviationSurveyDor() const;
267 
268  protected:
269 
270  std::vector<epc::Relationship> getAllEpcRelationships() const;
271  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
272 
273  // XML forward relationships
274  witsml1_4_1_1::Trajectory * witsmlTrajectory;
275 
276  // XML backward relationships
277  std::vector<WellboreTrajectoryRepresentation*> childrenTrajSet;
278  std::vector<class WellboreFrameRepresentation*> wellboreFrameRepresentationSet;
279  };
280 }
Definition: EpcDocument.h:144
Definition: WellboreInterpretation.h:40
Definition: DeviationSurveyRepresentation.h:47
void addWellboreFrameRepresentation(class WellboreFrameRepresentation *WellboreFrameRepresentation)
Definition: WellboreTrajectoryRepresentation.h:212
class WellboreFrameRepresentation * getWellboreFrameRepresentation(const unsigned int &index) const
Definition: WellboreTrajectoryRepresentation.h:230
Definition: Trajectory.h:42
const std::vector< class WellboreFrameRepresentation * > & getWellboreFrameRepresentationSet() const
Definition: WellboreTrajectoryRepresentation.h:217
Definition: EpcDocument.h:78
WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: WellboreTrajectoryRepresentation.h:57
Definition: EpcDocument.h:168
Definition: WellboreTrajectoryRepresentation.h:45
WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::_resqml2__WellboreTrajectoryRepresentation *fromGsoap)
Definition: WellboreTrajectoryRepresentation.h:77
Definition: AbstractRepresentation.h:44
Definition: WellboreFrameRepresentation.h:46
Definition: MdDatum.h:46
unsigned int getWellboreFrameRepresentationCount() const
Definition: WellboreTrajectoryRepresentation.h:223
Definition: AbstractHdfProxy.h:45
virtual std::string getXmlTag() const
Definition: WellboreTrajectoryRepresentation.h:83