Skip to content

Commit 5fe8ec0

Browse files
Allow to get the MD uom as string
1 parent 90b77b7 commit 5fe8ec0

4 files changed

Lines changed: 20 additions & 1 deletion

File tree

src/resqml2/WellboreTrajectoryRepresentation.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ RESQML2_NS::MdDatum * WellboreTrajectoryRepresentation::getMdDatum() const
150150
return getRepository()->getDataObjectByUuid<RESQML2_NS::MdDatum>(getMdDatumDor().getUuid());
151151
}
152152

153+
std::string WellboreTrajectoryRepresentation::getMdUomAsString() const
154+
{
155+
return gsoap_resqml2_0_1::soap_eml20__LengthUom2s(gsoapProxy2_0_1->soap, getMdUom());
156+
}
157+
153158
void WellboreTrajectoryRepresentation::convertMdValuesToXyzValues(double* mdValues, uint64_t mdCount, double* xyzPoints) const
154159
{
155160
auto const* mdDatum = getMdDatum();

src/resqml2/WellboreTrajectoryRepresentation.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,13 @@ namespace RESQML2_NS
273273
*/
274274
DLL_IMPORT_OR_EXPORT virtual gsoap_resqml2_0_1::eml20__LengthUom getMdUom() const = 0;
275275

276+
/**
277+
* Gets the unit of measure of the MDs along this trajectory as a string.
278+
*
279+
* @returns The unit of measure of the MDs along this trajectory as a string.
280+
*/
281+
DLL_IMPORT_OR_EXPORT std::string getMdUomAsString() const;
282+
276283
/**
277284
* Gets the MD double values associated to each trajectory station of this trajectory.
278285
*

src/resqml2_2/WellboreTrajectoryRepresentation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ bool WellboreTrajectoryRepresentation::hasMdValues() const
271271
gsoap_resqml2_0_1::eml20__LengthUom WellboreTrajectoryRepresentation::getMdUom() const
272272
{
273273
gsoap_resqml2_0_1::eml20__LengthUom result;
274-
gsoap_resqml2_0_1::soap_s2eml20__LengthUom(gsoapProxy2_3->soap, getMdDatum()->getLocalCrs()->getVerticalCrsUnitAsString().c_str(), &result);
274+
gsoap_resqml2_0_1::soap_s2eml20__LengthUom(gsoapProxy2_3->soap, static_cast<gsoap_eml2_3::resqml22__WellboreTrajectoryRepresentation*>(gsoapProxy2_3)->MdInterval->Uom.c_str(), &result);
275275
return result;
276276
}
277277

swig/swigResqml2Include.i

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9004,6 +9004,13 @@ namespace RESQML2_NS
90049004
* @returns The unit of measure of the MDs along this trajectory.
90059005
*/
90069006
gsoap_resqml2_0_1::eml20__LengthUom getMdUom() const;
9007+
9008+
/**
9009+
* Gets the unit of measure of the MDs along this trajectory as a string.
9010+
*
9011+
* @returns The unit of measure of the MDs along this trajectory as a string.
9012+
*/
9013+
std::string getMdUomAsString() const;
90079014

90089015
/**
90099016
* Gets the MD double values associated to each trajectory station of this trajectory.

0 commit comments

Comments
 (0)