My Project
Trajectory.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 "witsml1_4_1_1/AbstractObject.h"
37 
38 #include "resqml2_0_1/WellboreTrajectoryRepresentation.h"
39 
40 namespace witsml1_4_1_1
41 {
42  class DLL_IMPORT_OR_EXPORT Trajectory : public AbstractObject
43  {
44  public:
49  Trajectory(class Wellbore* witsmlWellbore,
50  const std::string & guid,
51  const std::string & title);
52 
53  Trajectory(class Wellbore* witsmlWellbore,
54  const std::string & guid,
55  const std::string & title,
56  const std::string & sourceName,
57  const time_t & dTimCreation,
58  const time_t & dTimLastChange,
59  const std::string & comments);
60 
64  Trajectory(gsoap_witsml1_4_1_1::witsml1__obj_USCOREtrajectorys* fromGsoap):AbstractObject(fromGsoap), wellbore(nullptr), resqmlWellboreTrajectoryRepresentation(nullptr) {}
65 
70 
71  double getMdDatumElevation();
72  gsoap_witsml1_4_1_1::witsml1__WellVerticalCoordinateUom getMdDatumElevationUom();
73  std::string getMdDatumName();
74 
75  unsigned int getTrajectoryStationCount() const;
76 
77  void getMds(double * mds) const;
78  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom getMdUom() const;
79 
80  unsigned int getInclinometries(double * incls) const;
81  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom getInclinometryUom() const;
82 
83  unsigned int getAzimuths(double * azims) const;
84  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom getAzimuthUom() const;
85  gsoap_witsml1_4_1_1::witsml1__AziRef getAzimuthReference() const;
86 
87  unsigned int getEastings(double * eastings) const;
88  gsoap_witsml1_4_1_1::witsml1__LengthUom getEastingUom() const;
89 
90  unsigned int getNorthings(double * northings) const;
91  gsoap_witsml1_4_1_1::witsml1__LengthUom getNorthingUom() const;
92 
93  unsigned int getTvds(double * tvds) const;
94  gsoap_witsml1_4_1_1::witsml1__WellVerticalCoordinateUom getTvdUom() const;
95 
96  void setTrajectoryStations(
97  const unsigned int & trajectoryStationCount,
98  const unsigned int & mdDatumIndex,
99  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mDUom,
100  double * mDSet,
101  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom angleUom,
102  double * inclSet,
103  gsoap_witsml1_4_1_1::witsml1__AziRef aziRef,
104  double * aziSet);
105 
106  void setEastingNorthingTrajectoryStations(
107  const unsigned int & trajectoryStationCount,
108  const unsigned int & mdDatumIndex,
109  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mDUom,
110  double * mDSet,
111  const unsigned int & tvdDatumIndex,
112  gsoap_witsml1_4_1_1::witsml1__WellVerticalCoordinateUom tVDUom,
113  double * tVDSet,
114  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom angleUom,
115  double * inclSet,
116  gsoap_witsml1_4_1_1::witsml1__AziRef aziRef,
117  double * aziSet,
118  gsoap_witsml1_4_1_1::witsml1__LengthUom locationUom,
119  double * locationEastingSet,
120  double * locationNorthingSet,
121  class CoordinateReferenceSystem* wellCrs);
122 
123  void setWestingSouthingTrajectoryStations(
124  const unsigned int & trajectoryStationCount,
125  const unsigned int & mdDatumIndex,
126  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mDUom,
127  double * mDSet,
128  const unsigned int & tvdDatumIndex,
129  gsoap_witsml1_4_1_1::witsml1__WellVerticalCoordinateUom tVDUom,
130  double * tVDSet,
131  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom angleUom,
132  double * inclSet,
133  gsoap_witsml1_4_1_1::witsml1__AziRef aziRef,
134  double * aziSet,
135  gsoap_witsml1_4_1_1::witsml1__LengthUom locationUom,
136  double * locationWestingSet,
137  double * locationSouthingSet,
138  class CoordinateReferenceSystem* wellCrs);
139 
140  void setProjectedXProjectedYTrajectoryStations(
141  const unsigned int & trajectoryStationCount,
142  const unsigned int & mdDatumIndex,
143  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mDUom,
144  double * mDSet,
145  const unsigned int & tvdDatumIndex,
146  gsoap_witsml1_4_1_1::witsml1__WellVerticalCoordinateUom tVDUom,
147  double * tVDSet,
148  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom angleUom,
149  double * inclSet,
150  gsoap_witsml1_4_1_1::witsml1__AziRef aziRef,
151  double * aziSet,
152  gsoap_witsml1_4_1_1::witsml1__LengthUom locationUom,
153  double * locationProjectedXSet,
154  double * locationProjectedYSet,
155  class CoordinateReferenceSystem* wellCrs);
156 
157  void setWellbore(class Wellbore* witsmlWellbore);
158 
159  class Wellbore* getWellbore() {return wellbore;}
160 
161  resqml2_0_1::WellboreTrajectoryRepresentation* getResqmlWellboreTrajectoryRepresentation() const {return resqmlWellboreTrajectoryRepresentation;}
162 
163  soap* getGSoapContext() const {return collection->soap;}
164 
165  const std::string & getTitle() const {return static_cast<gsoap_witsml1_4_1_1::witsml1__obj_USCOREtrajectorys*>(collection)->trajectory[0]->name;}
166 
167  std::string getUuid() const {return *static_cast<gsoap_witsml1_4_1_1::witsml1__obj_USCOREtrajectorys*>(collection)->trajectory[0]->uid;}
168  time_t getCreation() const
169  {
170  if (static_cast<gsoap_witsml1_4_1_1::_witsml1__trajectorys*>(collection)->trajectory[0]->commonData->dTimCreation)
171  return *static_cast<gsoap_witsml1_4_1_1::_witsml1__trajectorys*>(collection)->trajectory[0]->commonData->dTimCreation;
172  else
173  return -1;
174  }
175  time_t getLastUpdate() const
176  {
177  if (static_cast<gsoap_witsml1_4_1_1::_witsml1__trajectorys*>(collection)->trajectory[0]->commonData->dTimLastChange)
178  return *static_cast<gsoap_witsml1_4_1_1::_witsml1__trajectorys*>(collection)->trajectory[0]->commonData->dTimLastChange;
179  else
180  return -1;
181  }
182 
183  std::vector<epc::Relationship> getAllEpcRelationships() const;
184 
188  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
189 
190  static const char* XML_TAG;
191  virtual std::string getXmlTag() const {return XML_TAG;}
192 
193  protected:
194 
195  gsoap_witsml1_4_1_1::witsml1__cs_USCOREtrajectoryStation* newTrajectoryStation(
196  gsoap_witsml1_4_1_1::witsml1__cs_USCOREwellDatum* mdDatum,
197  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mDUom,
198  const double & mD,
199  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom angleUom,
200  const double & incl,
201  const double & azi);
202 
203  gsoap_witsml1_4_1_1::witsml1__cs_USCOREtrajectoryStation* newTrajectoryStation(
204  gsoap_witsml1_4_1_1::witsml1__cs_USCOREwellDatum* mdDatum,
205  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mDUom,
206  const double & mD,
207  gsoap_witsml1_4_1_1::witsml1__cs_USCOREwellDatum* tvdDatum,
208  gsoap_witsml1_4_1_1::witsml1__WellVerticalCoordinateUom tVDUom,
209  const double & tVD,
210  gsoap_witsml1_4_1_1::witsml1__PlaneAngleUom angleUom,
211  const double & incl,
212  const double & azi);
213 
214  gsoap_witsml1_4_1_1::witsml1__cs_USCOREtrajectoryStation* newTrajectoryStation(
215  gsoap_witsml1_4_1_1::witsml1__cs_USCOREwellDatum* mdDatum,
216  gsoap_witsml1_4_1_1::witsml1__MeasuredDepthUom mDUom,
217  const double & mD,
218  gsoap_witsml1_4_1_1::witsml1__cs_USCOREwellDatum* tvdDatum,
219  gsoap_witsml1_4_1_1::witsml1__WellVerticalCoordinateUom tVDUom,
220  const double & tVD);
221 
222  // XML forwards relationship
223  class Wellbore* wellbore;
224 
225  // XML backwards relationship
226  resqml2_0_1::WellboreTrajectoryRepresentation* resqmlWellboreTrajectoryRepresentation;
227 
228  friend void resqml2_0_1::WellboreTrajectoryRepresentation::setWitsmlTrajectory(Trajectory * witsmlTraj);
229  };
230 }
Definition: EpcDocument.h:144
Definition: Wellbore.h:45
~Trajectory()
Definition: Trajectory.h:69
Definition: AbstractObject.h:43
Trajectory(gsoap_witsml1_4_1_1::witsml1__obj_USCOREtrajectorys *fromGsoap)
Definition: Trajectory.h:64
Definition: Trajectory.h:42
Definition: EpcDocument.h:168
Definition: WellboreTrajectoryRepresentation.h:45
Definition: CoordinateReferenceSystem.h:40
virtual std::string getXmlTag() const
Definition: Trajectory.h:191