Last updated

API / geotoolkit3d / geodata / Trajectory3d / Trajectory3d

Class: 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.

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new Trajectory3d(x, y, z, origin, d, values)

new Trajectory3d(x, y, z, origin?, d?, values?)

Create the Trajectory3d from the given coordinates.

Throws

if the Trajectory data is invalid.

Parameters

Name Type Description
xnumber[]x-coordinate of the transformed stations.
ynumber[]y-coordinate of the transformed stations.
znumber[]z-coordinate of the transformed stations.
Optional originVector3the 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 dnumber[]The measured depths array for each station. If not supplied, they will be estimated from the given xyz.
Optional valuesTrajectoryValue[]property values that are associated with each station in this trajectory.

Overrides

EventDispatcher.constructor

Methods

count

count(): number

Gets the number of stations in the trajectory.

Returns

number


dispose

dispose(): void

Dispose.

Returns

void

Inherited from

EventDispatcher.dispose


getClassName

getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


getCoordinateForDepth

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.

Parameters

Name Type Description
locationnumberdepth for the desired position, in measured depth (MD).
Optional applyOriginOffsetbooleanif true, the Well origin offset is applied to the result (default is false).

Returns

Vector3

the position as a Vector3.


getCoordinatesForDepths

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.

Parameters

Name Type Description
Optional startnumberstarting depth. If undefined, will return everything until the given trajectory end.
Optional endnumberending depth.
Optional radii{ depth: number ; radius: number }[]radii values, for generating a radius value on each depths (depths from start to end).

Returns

CoordinatesForDepths


getDepth

getDepth(index): number

Gets the MD value (measured depth) at the specified index.

Parameters

Name Type Description
indexnumberindex of the station.

Returns

number

value if found; "undefined" otherwise


getDirectionAtDepth

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.

Parameters

Name Type Description
locationnumberthe measured depth (MD) at which the direction will be deduced.
Optional preferForwardbooleanIf 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.

Returns

Vector3

pos


getMaxDepth

getMaxDepth(): number

Gets the calculated maximal MD (measured depth).
Measured depth is considered to be unsigned, meaning max Depth is the deepest point.

Returns

number


getMaxX

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.

Returns

number


getMaxY

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.

Returns

number


getMaxZ

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.

Returns

number


getMinDepth

getMinDepth(): number

Gets the calculated minimal MD (measured depth).
Measured depth is considered to be unsigned, meaning min Depth is the shallowest point.

Returns

number


getMinX

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.

Returns

number


getMinY

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.

Returns

number


getMinZ

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.

Returns

number


getOrigin

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.

Returns

Vector3


getPointForCoordinates

getPointForCoordinates(options): GetPointResult

Returns the closest point/station to the given XYZ world coordinate position.

Parameters

Name Type
optionsGetPointByPositionOptions

Returns

GetPointResult

the point result, or null if no point is found, or if the trajectory points are too far.


getValuesForDepths

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.

Parameters

Name Type Description
Optional propertyNamestringname of the property to get the values of.
Optional startnumberstarting depth. If undefined, will returns everything before end.
Optional endnumberending 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.

Returns

number[]

values the value array, sorted by depth, from start to end of the trajectory.


getWellLocalBounds

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.

Returns

Box3


getWellWorldBounds

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.

Returns

Box3


getX

getX(index): number

Gets the x coordinate at the specified index.
Coordinates are relative to the origin offset.

Parameters

Name Type Description
indexnumberindex of the station.

Returns

number

value if found; "undefined" otherwise


getY

getY(index): number

Gets the y coordinate at the specified index.
Coordinates are relative to the origin offset.

Parameters

Name Type Description
indexnumberindex of the station.

Returns

number

value if found; "undefined" otherwise


getZ

getZ(index): number

Gets the z coordinate at the specified index.
Coordinates are relative to the origin offset.

Parameters

Name Type Description
indexnumberindex of the station.

Returns

number

value if found; "undefined" otherwise


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

EventDispatcher.hasEventListener


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

EventDispatcher.isDisposed


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

EventDispatcher.isSilent


maxDepth

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.

Returns

number


minDepth

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.

Returns

number


notify

notify(type, source, args?): Trajectory3d

Notify listeners

Parameters

Name Type Description
typestringevent types
sourceanyof the event
Optional argsanyarguments of the event

Returns

Trajectory3d

this

Inherited from

EventDispatcher.notify


off

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.

Parameters

Name Type Description
Optional typestringtype of the event
Optional callbackEventListenerfunction to be called

Returns

Trajectory3d

this

Inherited from

EventDispatcher.off

off<E>(type, callback): Trajectory3d

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: Trajectory3d, args: EventMap[E]) => void

Returns

Trajectory3d

Inherited from

EventDispatcher.off


on

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.

Parameters

Name Type Description
typestringtype of event or property
callbackEventListenerto be called
Optional optionsOptionsoptions of subscription

Returns

Trajectory3d

this

Inherited from

EventDispatcher.on

on<E>(type, callback, options?): Trajectory3d

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: Trajectory3d, args: EventMap[E]) => void
Optional optionsOptions

Returns

Trajectory3d

Inherited from

EventDispatcher.on


setSilent

setSilent(bool): Trajectory3d

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

Trajectory3d

this

Inherited from

EventDispatcher.setSilent


getClassName

Static getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName