My Project
WellboreTrajectoryRepresentation.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2016)
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 resqml2
39 {
40  class MdDatum;
41 }
42 
43 namespace witsml1_4_1_1
44 {
45  class Trajectory;
46 }
47 
48 namespace resqml2_0_1
49 {
51  {
52  private:
53  gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const {return nullptr;}
54 
55  public:
56 
64  WellboreTrajectoryRepresentation(class WellboreInterpretation* interp, const std::string & guid, const std::string & title, resqml2::MdDatum * mdInfo);
65 
69  WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::_resqml2__WellboreTrajectoryRepresentation* fromGsoap): AbstractRepresentation(fromGsoap),
70  witsmlTrajectory(nullptr) {}
71 
73 
74  static const char* XML_TAG;
75  virtual std::string getXmlTag() const {return XML_TAG;}
76 
77  /*
78  * Set the geometry of the representation by means of a parametric line without MD information.
79  * @param controlPoints All the control points of all the cubic parametric lines. They are ordered by parametric line first.
80  * @param controlPointCount The count of control points and control point parameters per cubic parametric line.
81  * @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
82  * @param proxy The HDF proxy which indicates in which HDF5 file the control points and its parameters will be stored.
83  * It must be already opened for writing and won't be closed.
84  */
85  void setGeometry(double * controlPoints, const double & startMd, const double & endMd, const unsigned int & controlPointCount, const int & lineKind, resqml2::AbstractHdfProxy* proxy);
86 
87  /*
88  * Set the geometry of the representation by means of one natural cubic parametric line.
89  * @param controlPoints All the control points of all the cubic parametric lines. They are ordered by parametric line first.
90  * @param controlPointCount The count of control points and control point parameters per cubic parametric line.
91  * @param controlPointParameters The arrays of control point parameters (ordered regarding the control points). It corresponds to the MD values in a WellboreFeature context.
92  * @param proxy The HDF proxy which indicates in which HDF5 file the control points and its parameters will be stored.
93  * It must be already opened for writing and won't be closed.
94  */
95  void setGeometry(double * controlPoints, double* controlPointParameters, const unsigned int & controlPointCount,
97 
98  /*
99  * Set the geometry of the representation by means of one cubic parametric line.
100  * @param controlPoints All the control points of all the cubic parametric lines. They are ordered by parametric line first.
101  * @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.
102  * @param controlPointCount The count of control points and control point parameters and tangent vectors per cubic parametric line.
103  * @param controlPointParameters The arrays of control point parameters (ordered regarding the control points). It corresponds to the MD values in a WellboreFeature context.
104  * @param proxy The HDF proxy which indicates in which HDF5 file the parameters and the tangent vectors will be stored.
105  * It must be already opened for writing and won't be closed.
106  */
107  void setGeometry(double * controlPoints,
108  double * tangentVectors, double* controlPointParameters, const unsigned int & controlPointCount,
110 
114  int getGeometryKind() const;
115 
119  resqml2::MdDatum * getMdDatum() const;
120 
124  std::string getMdDatumUuid() const;
125 
129  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
130 
136  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
137 
141  bool hasMdValues() const;
142 
146  void getMdValues(double* values);
147 
151  double getStartMd() const;
152 
156  double getFinishMd() const;
157 
161  bool hasTangentVectors() const;
162 
166  void getTangentVectors(double* tangentVectors);
167 
172  void addParentTrajectory(const double & kickoffMd, const double & parentMd, WellboreTrajectoryRepresentation* parentTrajRep);
173 
178  WellboreTrajectoryRepresentation* getParentTrajectory() const;
179 
183  const double& getParentTrajectoryMd() const;
184 
188  const std::vector<WellboreTrajectoryRepresentation*> & getChildrenTrajectorySet() const;
189 
194  void addWellboreFrameRepresentation(class WellboreFrameRepresentation* WellboreFrameRepresentation) {wellboreFrameRepresentationSet.push_back(WellboreFrameRepresentation);}
195 
199  const std::vector<class WellboreFrameRepresentation*>& getWellboreFrameRepresentationSet() const {return wellboreFrameRepresentationSet;}
200 
205  unsigned int getWellboreFrameRepresentationCount() const {return wellboreFrameRepresentationSet.size();}
206 
212  class WellboreFrameRepresentation* getWellboreFrameRepresentation(const unsigned int & index) const {return wellboreFrameRepresentationSet[index];}
213 
214  std::string getLocalCrsUuid() const;
215 
216  std::string getHdfProxyUuid() const;
217 
218  unsigned int getPatchCount() const {return 1;}
219 
220  bool hasGeometry() const;
221 
222  void setWitsmlTrajectory(witsml1_4_1_1::Trajectory * witsmlTraj);
223  witsml1_4_1_1::Trajectory * getWitsmlTrajectory() {return witsmlTrajectory;}
224 
225  private:
230  void addChildrenTrajectory(WellboreTrajectoryRepresentation* childrenTraj) {childrenTrajSet.push_back(childrenTraj);}
231 
232  protected:
233 
234  std::vector<epc::Relationship> getAllEpcRelationships() const;
235  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
236 
237  // XML forward relationships
238  witsml1_4_1_1::Trajectory * witsmlTrajectory;
239 
240  // XML backward relationships
241  std::vector<WellboreTrajectoryRepresentation*> childrenTrajSet;
242  std::vector<class WellboreFrameRepresentation*> wellboreFrameRepresentationSet;
243  };
244 }
Definition: EpcDocument.h:142
Definition: WellboreInterpretation.h:40
Definition: AbstractHdfProxy.h:44
void addWellboreFrameRepresentation(class WellboreFrameRepresentation *WellboreFrameRepresentation)
Definition: WellboreTrajectoryRepresentation.h:194
class WellboreFrameRepresentation * getWellboreFrameRepresentation(const unsigned int &index) const
Definition: WellboreTrajectoryRepresentation.h:212
Definition: Trajectory.h:42
const std::vector< class WellboreFrameRepresentation * > & getWellboreFrameRepresentationSet() const
Definition: WellboreTrajectoryRepresentation.h:199
Definition: EpcDocument.h:79
Definition: EpcDocument.h:155
Definition: WellboreTrajectoryRepresentation.h:50
WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::_resqml2__WellboreTrajectoryRepresentation *fromGsoap)
Definition: WellboreTrajectoryRepresentation.h:69
Definition: AbstractRepresentation.h:40
Definition: WellboreFrameRepresentation.h:46
Definition: MdDatum.h:45
unsigned int getWellboreFrameRepresentationCount() const
Definition: WellboreTrajectoryRepresentation.h:205
Definition: EpcDocument.h:61
virtual std::string getXmlTag() const
Definition: WellboreTrajectoryRepresentation.h:75