API / geotoolkit3d / geodata / Trajectory3d / Trajectory3d
geodata.Trajectory3d.Trajectory3d
The utility class Trajectory3d is used to define a trajectory, providing the coordinates of each point/station along the well path.
Trajectory contains MD- (measured depth), X/Y/Z coordinates, and if provided, property values along the trajectory.
If measured depth is not provided, it is calculated from 0 along the path.
If the origin offset is provided in the constructor, the provided x,y,z array will be used by reference. Please make a copy if these array are to be modified by the user.
↳
Trajectory3d
Constructors
Methods
Constructors
• new Trajectory3d(x, y, z, origin?, d?, values?)
Create the Trajectory3d from the given coordinates.
Throws
if the Trajectory data is invalid.
| Name | Type | Description |
|---|---|---|
x | number[] | x-coordinate of the transformed stations. |
y | number[] | y-coordinate of the transformed stations. |
z | number[] | z-coordinate of the transformed stations. |
Optional origin | Vector3 | the 3D coordinates offset, if the given xyz coordinates are in deviation from origin. If provided, x,y,z arrays will be used by reference, else, x,y,z arrays will be deep copied. |
Optional d | number[] | The measured depths array for each station. If not supplied, they will be estimated from the given xyz. |
Optional values | TrajectoryValue[] | property values that are associated with each station in this trajectory. |
EventDispatcher.constructor
Methods
▸ count(): number
Gets the number of stations in the trajectory.
number
▸ dispose(): void
Dispose.
void
▸ getClassName(): string
string
▸ getCoordinateForDepth(location, applyOriginOffset?): Vector3
Gets the interpolated local position at the requested measured depth (MD).
Note:
Throws
Error if the provided Depth location is outside of range.
| Name | Type | Description |
|---|---|---|
location | number | depth for the desired position, in measured depth (MD). |
Optional applyOriginOffset | boolean | if true, the Well origin offset is applied to the result (default is false). |
Vector3
the position as a Vector3.
▸ getCoordinatesForDepths(start?, end?, radii?): CoordinatesForDepths
Return the trajectory coordinates for the given interval [start, end], in measured depths (MD).
If no parameters are given, this will return all depths.
Throws
Error if the provided start/end Depth locations are outside of range.
| Name | Type | Description |
|---|---|---|
Optional start | number | starting depth. If undefined, will return everything until the given trajectory end. |
Optional end | number | ending depth. |
Optional radii | { depth: number ; radius: number }[] | radii values, for generating a radius value on each depths (depths from start to end). |
▸ getDepth(index): number
Gets the MD value (measured depth) at the specified index.
| Name | Type | Description |
|---|---|---|
index | number | index of the station. |
number
value if found; "undefined" otherwise
▸ getDirectionAtDepth(location, preferForward?): Vector3
Gets the 3D direction of the trajectory at the requested depth, as a Vector3.
Throws
Error if the provided Depth location is outside of range.
| Name | Type | Description |
|---|---|---|
location | number | the measured depth (MD) at which the direction will be deduced. |
Optional preferForward | boolean | If true, the direction will be calculated downside along the well progression (forward), else the direction will be going up the well (backward). Default is true. |
Vector3
pos
▸ getMaxDepth(): number
Gets the calculated maximal MD (measured depth).
Measured depth is considered to be unsigned, meaning max Depth is the deepest point.
number
▸ getMaxX(): number
Gets the calculated maximal x coordinate of this trajectory.
Coordinates are relative to the origin offset.
Deprecated
since 5.0 as it is not consistent with the trajectory offset, please use getWellLocalBounds() or getWellWorldBounds() instead.
number
▸ getMaxY(): number
Gets the calculated maximal y coordinate of this trajectory.
Coordinates are relative to the origin offset.
Deprecated
since 5.0 as it is not consistent with the trajectory offset, please use getWellLocalBounds() or getWellWorldBounds() instead.
number
▸ getMaxZ(): number
Gets the calculated maximal z coordinate of this trajectory.
Coordinates are relative to the origin offset.
Deprecated
since 5.0 as it is not consistent with the trajectory offset, please use getWellLocalBounds() or getWellWorldBounds() instead.
number
▸ getMinDepth(): number
Gets the calculated minimal MD (measured depth).
Measured depth is considered to be unsigned, meaning min Depth is the shallowest point.
number
▸ getMinX(): number
Gets the calculated minimal x coordinate of this trajectory.
Coordinates are relative to the origin offset.
Deprecated
since 5.0 as it is not consistent with the trajectory offset, please use getWellLocalBounds() or getWellWorldBounds() instead.
number
▸ getMinY(): number
Gets the calculated minimal y coordinate of this trajectory.
Coordinates are relative to the origin offset.
Deprecated
since 5.0 as it is not consistent with the trajectory offset, please use getWellLocalBounds() or getWellWorldBounds() instead.
number
▸ getMinZ(): number
Gets the calculated minimal z coordinate of this trajectory.
Coordinates are relative to the origin offset.
Deprecated
since 5.0 as it is not consistent with the trajectory offset, please use getWellLocalBounds() or getWellWorldBounds() instead.
number
▸ getOrigin(): Vector3
Gets the origin position offset, as a Vector3.
To get the real coordinates out of this Trajectory, X, Y and Z coordinates should be offset by the origin coordinates first.
Vector3
▸ getPointForCoordinates(options): GetPointResult
Returns the closest point/station to the given XYZ world coordinate position.
| Name | Type |
|---|---|
options | GetPointByPositionOptions |
the point result, or null if no point is found, or if the trajectory points are too far.
▸ getValuesForDepths(propertyName?, start?, end?, radii?): number[]
Gets the property values for the defined start/end measured depths range.
If start/end are not defined, this will return the values for all depths in this trajectory.
Throws
Error if the provided start/end Depth locations are outside of range.
| Name | Type | Description |
|---|---|---|
Optional propertyName | string | name of the property to get the values of. |
Optional start | number | starting depth. If undefined, will returns everything before end. |
Optional end | number | ending depth. |
Optional radii | { depth: number ; radius: number }[] | provide optional additional depth positions to compute the values of. Resulting values will still be sorted from start to end depth. |
number[]
values the value array, sorted by depth, from start to end of the trajectory.
▸ getWellLocalBounds(): Box3
Gets the calculated minimum/maximum local coordinates of this trajectory.
Coordinates are relative to the origin offset, so to retrieve the actual world coordinates, either add the trajectory offset, or use the .getWellWorldBounds() method.
Box3
▸ getWellWorldBounds(): Box3
Gets the calculated minimum/maximum world coordinates of this trajectory.
Coordinates are absolute. To retrieve the local coordinates which depend on the trajectory offset, please instead use the .getWellLocalBounds() method.
Box3
▸ getX(index): number
Gets the x coordinate at the specified index.
Coordinates are relative to the origin offset.
| Name | Type | Description |
|---|---|---|
index | number | index of the station. |
number
value if found; "undefined" otherwise
▸ getY(index): number
Gets the y coordinate at the specified index.
Coordinates are relative to the origin offset.
| Name | Type | Description |
|---|---|---|
index | number | index of the station. |
number
value if found; "undefined" otherwise
▸ getZ(index): number
Gets the z coordinate at the specified index.
Coordinates are relative to the origin offset.
| Name | Type | Description |
|---|---|---|
index | number | index of the station. |
number
value if found; "undefined" otherwise
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
EventDispatcher.hasEventListener
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ maxDepth(): number
Gets the calculated maximal MD (measured depth).
Identical to getMaxDepth, exists to be closer to the existing Trajectory2d API.
Measured depth is considered to be unsigned, meaning max Depth is the deepest point.
number
▸ minDepth(): number
Gets the calculated minimal MD (measured depth).
Identical to getMinDepth, exists to be closer to the existing Trajectory2d API.
Measured depth is considered to be unsigned, meaning min Depth is the shallowest point.
number
▸ notify(type, source, args?): Trajectory3d
Notify listeners
| Name | Type | Description |
|---|---|---|
type | string | event types |
source | any | of the event |
Optional args | any | arguments of the event |
this
▸ off(type?, callback?): Trajectory3d
Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.
| Name | Type | Description |
|---|---|---|
Optional type | string | type of the event |
Optional callback | EventListener | function to be called |
this
▸ off<E>(type, callback): Trajectory3d
| Name | Type |
|---|---|
E | extends string |
| Name | Type |
|---|---|
type | E |
callback | (eventType: E, sender: Trajectory3d, args: EventMap[E]) => void |
▸ on(type, callback, options?): Trajectory3d
Attach listener on event that will be called whenever the specified event is delivered to the target
If the callback function is already in the list of event listeners for this target, the function is not added a second time.
If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
callback | EventListener | to be called |
Optional options | Options | options of subscription |
this
▸ on<E>(type, callback, options?): Trajectory3d
| Name | Type |
|---|---|
E | extends string |
| Name | Type |
|---|---|
type | E |
callback | (eventType: E, sender: Trajectory3d, args: EventMap[E]) => void |
Optional options | Options |
▸ setSilent(bool): Trajectory3d
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ Static getClassName(): string
string