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