API / geotoolkit / deviation / Trajectory2d / Trajectory2d
deviation.Trajectory2d.Trajectory2d
Class Trajectory2d is used to define trajectory and it provides coordinates of each point along the planned well path. Trajectory contains MD- (measured depth), X- and Y-coordinates along itself.
If measured depth is not provided it is calculated from 0 along the path.
↳
Trajectory2d
Constructors
| [new Trajectory2d(options)](/solutions/geotoolkit/apis/classes/geotoolkit.deviation.trajectory2d.trajectory2d.md#new trajectory2d(options)) | [new Trajectory2d(x, y, d)](/solutions/geotoolkit/apis/classes/geotoolkit.deviation.trajectory2d.trajectory2d.md#new trajectory2d(x, y, d)) |
|---|
Methods
Constructors
• new Trajectory2d(options?)
Creates a new instance of Trajectory2d class
| Name | Type | Description |
|---|---|---|
Optional options | Options | object containing data and options |
EventDispatcher.constructor
• new Trajectory2d(x?, y?, d?)
Creates a new instance of Trajectory2d class
| Name | Type | Description |
|---|---|---|
Optional x | number[] | x-coordinate of the transformed stations |
Optional y | number[] | y-coordinate of the transformed stations |
Optional d | number[] | d-measured depths array for each station |
EventDispatcher.constructor
Methods
▸ add(x, y, md?): Trajectory2d
Adds new trajectory station to the end of trajectory
| Name | Type | Description |
|---|---|---|
x | number | the transformed station x-coordinate |
y | number | the transformed station y-coordinate |
Optional md | number | the transformed station measured depth |
▸ add(x, y, md?): Trajectory2d
Adds a trajectory stations array to the end of trajectory
| Name | Type | Description |
|---|---|---|
x | number[] | the transformed station x-coordinate array |
y | number[] | the transformed station y-coordinate array |
Optional md | number[] | the transformed station measured depth array |
▸ clear(): Trajectory2d
Removes all the trajectory stations
▸ count(): number
Gets number of stations in the trajectory
number
number of stations
▸ dispose(): void
Dispose.
void
▸ equals(trajectory): boolean
Checks for trajectories equality
| Name | Type | Description |
|---|---|---|
trajectory | Trajectory2d | other trajectory |
boolean
▸ getArrayX(): number[]
Gets x-values array
number[]
▸ getArrayY(): number[]
Gets y-values array
number[]
▸ getClassName(): string
string
▸ getDepth(index): number
Gets MD-value at specified position
| Name | Type | Description |
|---|---|---|
index | number | index of the station |
number
value if found; "undefined" otherwise
▸ getDepths(): number[]
Gets MD-values array
number[]
▸ getMaxX(): number
Gets calculated maximal x-value (convenience method)
number
▸ getMaxY(): number
Gets calculated maximal y-value (convenience method)
number
▸ getMinX(): number
Gets calculated minimal x-value (convenience method)
number
▸ getMinY(): number
Gets calculated minimal y-value (convenience method)
number
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
properties
▸ getX(index): number
Gets x-value at specified position
| Name | Type | Description |
|---|---|---|
index | number | index of the station |
number
value if found; "undefined" otherwise
▸ getY(index): number
Gets y-value at specified position
| 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
▸ interpolateXY(md, pt?): Point
Interpolates (x;y)-point at MD-value
| Name | Type | Description |
|---|---|---|
md | number | MD-value |
Optional pt | Point | point to put (x;y) in |
interpolated point; or null if trajectory too short
▸ 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 calculated maximal MD
number
maximal MD
▸ minDepth(): number
Gets calculated minimal MD
number
minimal MD
▸ notify<E>(type, source, args?): Trajectory2d
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | Trajectory2d | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ off<E>(type?, callback?): Trajectory2d
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 |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: Trajectory2d, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): Trajectory2d
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 |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: Trajectory2d, args: EventMap[E]) => void | to be called |
this
▸ Protected onDataChanged(): void
Fires the Events~DataChanged event
void
▸ setProperties(props?): Trajectory2d
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional props | Options | properties |
this
▸ setSilent(bool): Trajectory2d
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ shift(count): Trajectory2d
Removes first count stations from a trajectory
| Name | Type | Description |
|---|---|---|
count | number | an integer indicating the number of stations to remove. If count is greater than or equal to the number of stations, then all the stations will be deleted. If count is 0 or negative, no stations are removed. |
▸ Static createTrajectory(arg, inclination?, azimuth?, rightDeviation?, start?, filter?, approximate?): Trajectory2d
Creates trajectory from arrays of measured depths,inclinations and azimuths.
| Name | Type | Description |
|---|---|---|
arg | number[] | CreateTrajectoryArg | an array of the measured depth or object containing data and options |
Optional inclination | number[] | an array of the inclinations |
Optional azimuth | number[] | an array of azimuths. (not used now) |
Optional rightDeviation | boolean | rightDeviation means trjajectory goes from north-west to south-east with positive inclination angle |
Optional start | number | start index |
Optional filter | boolean | if true, perform filtering of redundant points. Removes any points, which could be removed safely, keeping the trajectory geometry and measured depth binding: 1. If two points have the same coordinates, it keeps the second point only 2. If two points have the same MD value, it keeps the second point only 3. If three points belong to a same line in a natural order (i.e. second point positioned between 1st and 3rd), and MD value of middle point corresponds to the point position, it removes the middle point NOTE: The rules are applied recursively |
Optional approximate | boolean | flag set to enable approximation of the trajectory along the path |
trajectory
▸ Static fromObject(object?): Trajectory2d
Creates or gets Trajectory2d instance from object
| Name | Type | Description |
|---|---|---|
Optional object | Trajectory2d | { id?: string ; md: number[] ; x: number[] ; y: number[] } | object can be in format of constructor |
▸ Static getClassName(): string
string