convertTrajectory enhancements Add an input argument "unitMD" to separate it from "unitZ".
The issue is that md unit and height/depth unit is conflated. That means for a survey with md in ft, but a reference point in m that the calculated trajectory.xyz have different units. Also, currently one would need to convert either the reference point height to the MD unit, v.v. It should be possible to define the height "Z" of the reference point in a different unit than the MD unit, similar as it is for XY of the reference point.
The solution is to add an input argument unitMD
to separate it from unitZ
.
-
Add a new optional request parameter unitMD
.Task actions:
- If
unitMD
is present then it specifies the unit for MD (i.e., forinputKind
that have MD as inputs, e.g., forMD_Incl_Azim
- If
unitMD
is not present then it defaults tounitZ
.
- If
-
Change code to handle units appropriately on input. Task actions:
- such that MD unit is used for MD. Allow a record id or a PR (overloaded).
- such that on input the "unitZ" is for the height of the
referencePoint.z
. - check special case, e.g., for
inputKind
that has dz as input the unit should beunitZ
(this may well not be implemented to have dxdydz inputs).
"referencePoint": {
"x": 2000000,
"y": 10000000,
"z": 100.00 // unitZ
},
"unitZ": "osdu:reference-data--UnitOfMeasure:m:",
"unitMD": "osdu:reference-data--UnitOfMeasure:m:"
-
Change code to handle units appropriately on output. Task actions:
- Add
"unitMD"
similar to how it outputs"unitZ"
. - Ensure on output (the same) "unitZ" is for stations.point.z (trajectory height coordinates) and stations.dz. See below.
- Move dz after dyTN
- Add
{
"md": 1000.0, // unitMD (defaults to unitZ if unitMD is not given in request)
"inclination": 10.0, // deg [0,180]
"azimuthTN": 100.51354989131318, // deg [0,360)
"azimuthGN": 100.0, // deg [0,360)
"dxTN": 170.732934404631, // in unitXY (from projCRS unless trajectoryCRS is geogCRS then use input property unitXY)
"dyTN": -31.68524446220624, // in unitXY (from projCRS typically)
"point": {
"x": 2000170.9670364524, // unitXY (from projCRS typically)
"y": 9999969.85389616, // unitXY (from projCRS typically)
"z": -884.807753012208 // unitZ (from request); above vert datum
},
"wgs84Longitude": -85.88928230486448, // deg [-180,+180]
"wgs84Latitude": 27.553171177913015, // deg [-90,+90]
"dls": 2.5613209387547815E-8, // deg/30m (if unitMD is m), else deg/100ft (unitMD ft like)
"original": true,
"dz": 984.807753012208 // unitZ (from request); below ref.z
},
-
Update documentation. Task actions
- AppliedOperations to have proper descriptions what computations were done.
- Tutorial should be updated with clear example and how units are dealt with.
- Swagger should be updated for Request for the following:
- unitZ should say "for reference point.z (and dz if given)
- Swagger should be updated for Response
- stations.Out.dz is missing (i.e., some text needs to be written that explains this output. "dz" is the vertical height below the reference point "z", in the
unitz
. - Best is to document as per above, showing the output units explicitly for each property.
- localCRS should say this is an azimuthalEquidistant intermediate CRS.
- stations.Out.dz is missing (i.e., some text needs to be written that explains this output. "dz" is the vertical height below the reference point "z", in the
Edited by Bert Kampes