Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
WellboreTrajectoryRepresentation.h
1 /*-----------------------------------------------------------------------
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"; you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -----------------------------------------------------------------------*/
19 #pragma once
20 
21 #include "resqml2/AbstractRepresentation.h"
22 
23 namespace WITSML1_4_1_1_NS
24 {
25  class Trajectory;
26 }
27 
28 namespace RESQML2_0_1_NS
29 {
31  {
32  private:
33  gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const {return nullptr;}
34 
35  gsoap_resqml2_0_1::_resqml2__WellboreTrajectoryRepresentation* getSpecializedGsoapProxy() const;
36 
37  public:
38 
42  WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) :AbstractRepresentation(partialObject) {}
43 
44 
52  WellboreTrajectoryRepresentation(class WellboreInterpretation* interp, const std::string & guid, const std::string & title, RESQML2_NS::MdDatum * mdInfo);
53 
57  WellboreTrajectoryRepresentation(class WellboreInterpretation* interp, const std::string & guid, const std::string & title, DeviationSurveyRepresentation* deviationSurvey);
58 
62  WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::_resqml2__WellboreTrajectoryRepresentation* fromGsoap): AbstractRepresentation(fromGsoap),
63  witsmlTrajectory(nullptr) {}
64 
66 
67  static const char* XML_TAG;
68  virtual std::string getXmlTag() const {return XML_TAG;}
69 
70  /*
71  * Set the geometry of the representation by means of a parametric line without MD information.
72  * @param controlPoints All the control points of all the cubic parametric lines. They are ordered by parametric line first.
73  * @param controlPointCount The count of control points and control point parameters per cubic parametric line.
74  * @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
75  * @param proxy The HDF proxy which indicates in which HDF5 file the control points and its parameters will be stored.
76  * It must be already opened for writing and won't be closed.
77  */
78  void setGeometry(double * controlPoints, const double & startMd, const double & endMd, const unsigned int & controlPointCount, const int & lineKind, COMMON_NS::AbstractHdfProxy* proxy);
79 
80  /*
81  * Set the geometry of the representation by means of one natural cubic parametric line.
82  * @param controlPoints All the control points of all the cubic parametric lines. They are ordered by parametric line first.
83  * @param controlPointCount The count of control points and control point parameters per cubic parametric line.
84  * @param controlPointParameters The arrays of control point parameters (ordered regarding the control points). It corresponds to the MD values in a WellboreFeature context.
85  * @param proxy The HDF proxy which indicates in which HDF5 file the control points and its parameters will be stored.
86  * It must be already opened for writing and won't be closed.
87  */
88  void setGeometry(double * controlPoints, double* controlPointParameters, const unsigned int & controlPointCount,
90 
91  /*
92  * Set the geometry of the representation by means of one cubic parametric line.
93  * @param controlPoints All the control points of all the cubic parametric lines. They are ordered by parametric line first.
94  * @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.
95  * @param controlPointCount The count of control points and control point parameters and tangent vectors per cubic parametric line.
96  * @param controlPointParameters The arrays of control point parameters (ordered regarding the control points). It corresponds to the MD values in a WellboreFeature context.
97  * @param proxy The HDF proxy which indicates in which HDF5 file the parameters and the tangent vectors will be stored.
98  * It must be already opened for writing and won't be closed.
99  */
100  void setGeometry(double * controlPoints,
101  double * tangentVectors, double* controlPointParameters, const unsigned int & controlPointCount,
103 
107  int getGeometryKind() const;
108 
112  void setMdDatum(RESQML2_NS::MdDatum* mdDatum);
113 
117  RESQML2_NS::MdDatum * getMdDatum() const;
118 
122  std::string getMdDatumUuid() const;
123 
127  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
128 
134  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
135 
139  bool hasMdValues() const;
140 
144  gsoap_resqml2_0_1::eml20__LengthUom getMdUom() const;
145 
149  void getMdValues(double* values);
150 
154  double getStartMd() const;
155 
159  double getFinishMd() const;
160 
164  bool hasTangentVectors() const;
165 
169  void getTangentVectors(double* tangentVectors);
170 
175  void addParentTrajectory(const double & kickoffMd, const double & parentMd, WellboreTrajectoryRepresentation* parentTrajRep);
176 
181  WellboreTrajectoryRepresentation* getParentTrajectory() const;
182 
186  const double& getParentTrajectoryMd() const;
187 
191  const std::vector<WellboreTrajectoryRepresentation*> & getChildrenTrajectorySet() const;
192 
197  void addWellboreFrameRepresentation(class WellboreFrameRepresentation* WellboreFrameRepresentation) {wellboreFrameRepresentationSet.push_back(WellboreFrameRepresentation);}
198 
202  const std::vector<class WellboreFrameRepresentation*>& getWellboreFrameRepresentationSet() const {return wellboreFrameRepresentationSet;}
203 
208  unsigned int getWellboreFrameRepresentationCount() const {return static_cast<unsigned int>(wellboreFrameRepresentationSet.size());}
209 
215  class WellboreFrameRepresentation* getWellboreFrameRepresentation(const unsigned int & index) const {return wellboreFrameRepresentationSet[index];}
216 
220  void setDeviationSurvey(class DeviationSurveyRepresentation* deviationSurvey);
221 
225  class DeviationSurveyRepresentation* getDeviationSurvey() const;
226 
230  gsoap_resqml2_0_1::eml20__DataObjectReference* getLocalCrsDor() const;
231 
232  std::string getHdfProxyUuid() const;
233 
234  unsigned int getPatchCount() const {return 1;}
235 
236  bool hasGeometry() const;
237 
238  void setWitsmlTrajectory(WITSML1_4_1_1_NS::Trajectory * witsmlTraj);
239  WITSML1_4_1_1_NS::Trajectory * getWitsmlTrajectory() {return witsmlTrajectory;}
240 
241  private:
246  void addChildrenTrajectory(WellboreTrajectoryRepresentation* childrenTraj) { childrenTrajSet.push_back(childrenTraj); }
247 
251  gsoap_resqml2_0_1::eml20__DataObjectReference* getDeviationSurveyDor() const;
252 
253  protected:
254 
255  std::vector<epc::Relationship> getAllEpcRelationships() const;
256  void importRelationshipSetFromEpc(COMMON_NS::EpcDocument* epcDoc);
257 
258  // XML forward relationships
259  WITSML1_4_1_1_NS::Trajectory * witsmlTrajectory;
260 
261  // XML backward relationships
262  std::vector<WellboreTrajectoryRepresentation*> childrenTrajSet;
263  std::vector<class WellboreFrameRepresentation*> wellboreFrameRepresentationSet;
264  };
265 }
266 
Definition: WellboreTrajectoryRepresentation.h:30
virtual std::string getXmlTag() const
Definition: WellboreTrajectoryRepresentation.h:68
Definition: DeviationSurveyRepresentation.h:32
Definition: AbstractRepresentation.h:31
Definition: EpcDocument.h:65
const std::vector< class WellboreFrameRepresentation * > & getWellboreFrameRepresentationSet() const
Definition: WellboreTrajectoryRepresentation.h:202
Definition: Trajectory.h:29
Definition: EpcDocument.h:130
Definition: EpcDocument.h:154
Definition: WellboreFrameRepresentation.h:31
unsigned int getWellboreFrameRepresentationCount() const
Definition: WellboreTrajectoryRepresentation.h:208
class WellboreFrameRepresentation * getWellboreFrameRepresentation(const unsigned int &index) const
Definition: WellboreTrajectoryRepresentation.h:215
Definition: AbstractHdfProxy.h:30
void addWellboreFrameRepresentation(class WellboreFrameRepresentation *WellboreFrameRepresentation)
Definition: WellboreTrajectoryRepresentation.h:197
Definition: WellboreInterpretation.h:26
WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: WellboreTrajectoryRepresentation.h:42
Definition: MdDatum.h:31
WellboreTrajectoryRepresentation(gsoap_resqml2_0_1::_resqml2__WellboreTrajectoryRepresentation *fromGsoap)
Definition: WellboreTrajectoryRepresentation.h:62