API / geotoolkit / welllog / data / LogAbstractData / LogAbstractData
data.LogAbstractData.LogAbstractData
Define abstract Log data
↳
LogAbstractData↳↳
LogData
Constructors
Methods
Constructors
• Protected new LogAbstractData()
EventDispatcher.constructor
Methods
▸ Abstract calculateNeatLimits(logScale, centerOnZeroOnNegativeMin, displayUnit): number[]
Return an array of neat min and max
| Name | Type | Description |
|---|---|---|
logScale | boolean | scale log scale |
centerOnZeroOnNegativeMin | boolean | If negative and positive values, center around 0 |
displayUnit | string | AbstractUnit | displayed unit |
number[]
▸ Abstract clear(): LogAbstractData
Clear log data. Removes all samples and reset depth limits
this
▸ dispose(): void
Dispose.
void
▸ getClassName(): string
string
▸ Abstract getDataOrder(): Order
Return the order of the log data
▸ getDepth(index): number
Return depth by index
| Name | Type | Description |
|---|---|---|
index | number | index at the depth |
number
▸ Abstract getDepths(): number[]
Return an array of depths
number[]
▸ getIndexAt(depth, fromIndex?, toIndex?): number
Return index for specified depth
| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the index |
Optional fromIndex | number | index of sample in depths |
Optional toIndex | number | index of sample in depths |
number
▸ Abstract getIndexUnit(): AbstractUnit
Return the value unit
Throws
when this method is not implemented
▸ Abstract getMaxDepth(): number
Return maximum depth
Throws
when this method is not implemented
number
▸ Abstract getMaxMeaningDepth(): number
Return maximum Meaning depth (last depth with value)
number
▸ Abstract getMaxValue(): number
Return maximum data value
number
▸ Abstract getMinDepth(): number
Return minimum depth
Throws
when this method is not implemented
number
▸ Abstract getMinMeaningDepth(): number
Return minimum Meaning depth (first depth with value)
number
▸ Abstract getMinValue(): number
Return minimum data value
number
▸ Abstract getName(): string
Return name of the data
string
▸ Abstract getSize(): number
Return the count of the samples
number
▸ getState(): LogDataState
Return state
▸ getTimeStamp(): number
Return the value to indicate if data source was changed
number
▸ getValue(index): number
Return value by index
| Name | Type | Description |
|---|---|---|
index | number | index of the sample in the array |
number
▸ getValueAt(depth, fromIndex?, toIndex?, interpolation?): number
Return the value matching the given depth or NaN if the given depth is out of the logdata depth range.
If the depths are strictly increasing:
- The returned value will be interpolated when necessary. See example 1
If the depths are not strictly increasing but never decreasing:
- The value returned will be the first one found (in the insertion order). See example 2
- The value returned will be interpolated between the last one found and its closest larger neighbor. See example 2
If the depths are not always increasing (not forward only):
- The value returned will be the last one found (in the insertion order). See example 3
- The value returned will be interpolated between the first one found and its closest larger neighbor. See example 3
Examples assume the default linear interpolation
Example
// Depth Value
// 0 0
// 100 1
// 200 2
getValueAt(100) // -> 1
getValueAt(150) // -> 1.5Example
// Depth Value
// 0 0
// 100 1
// 100 2
// 200 3
getValueAt(100) // -> 1
getValueAt(150) // -> 2.5Example
// Depth Value
// 0 0
// 100 1
// 200 2
// 100 3
getValueAt(100) // -> 3
getValueAt(150) // -> 1.5| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
Optional fromIndex | number | index of sample in depths |
Optional toIndex | number | index of sample in depths |
Optional interpolation | InterpolationType | interpolation type for the value |
number
▸ Abstract getValueInRange(depth, prev, next): number
Return value by depth, using linear interpolation if necessary. See LogAbstractData.findValueAt.
Throws
when this method is not implemented
| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
prev | number | The index of the largest previous depth |
next | number | The index of the smallest following depth |
number
▸ Abstract getValueUnit(): AbstractUnit
Return the depth unit
Throws
when this method is not implemented
▸ Abstract getValues(): number[]
Return an array of values
number[]
▸ 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
▸ Abstract isForwardOnly(): boolean
Return true if data is in ascending order
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ notify<E>(type, source, args?): LogAbstractData
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | LogAbstractData | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ off<E>(type?, callback?): LogAbstractData
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: LogAbstractData, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): LogAbstractData
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: LogAbstractData, args: EventMap[E]) => void | to be called |
this
▸ Abstract requestData(range, scale, callback?): void
| Name | Type | Description |
|---|---|---|
range | Range | range |
scale | number | scale |
Optional callback | () => void | callback to be called after loading data |
void
▸ resumeUpdate(forceUpdate): LogAbstractData
Resume update. forceUpdate updates data statistics (update min, max of values, depths...)
| Name | Type | Description |
|---|---|---|
forceUpdate | boolean | force update based on the state of the data |
this
▸ Abstract setIndexUnit(unit): LogAbstractData
Sets index unit
Throws
when this method is not implemented
| Name | Type | Description |
|---|---|---|
unit | string | AbstractUnit | index unit |
this
▸ Abstract setName(name): LogAbstractData
Set name of the data
| Name | Type | Description |
|---|---|---|
name | string | The log data name |
this
▸ setSilent(bool): LogAbstractData
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setState(state): LogAbstractData
Sets state of data. Values can be (Empty,Normal, Warning,Error,Fetching).
| Name | Type | Description |
|---|---|---|
state | LogDataState | state of data. |
this
▸ Abstract setValue(index, value): LogAbstractData
Set value by index
Throws
when this method is not implemented
| Name | Type | Description |
|---|---|---|
index | number | index of the sample |
value | number | sample values |
this
▸ Abstract setValueUnit(unit): LogAbstractData
Sets value unit
Throws
when this method is not implemented
| Name | Type | Description |
|---|---|---|
unit | string | AbstractUnit | value unit |
this
▸ suspendUpdate(): LogAbstractData
Suspend update
this
▸ Protected update(args?): void
Notify when data has been changed.
| Name | Type | Description |
|---|---|---|
Optional args | LogDataEvent | optional parameters |
void
▸ Protected Abstract updateDataStatistics(): LogAbstractData
Update data statistics
this
▸ updateTimeStamp(): void
Update time stamp
void
▸ Static findValueAt(depth, depths, values, prev, next, interpolation?): number
Utility function to interpolate a value between two depths.
| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
depths | number[] | The array of ordered depths |
values | number[] | The array of values |
prev | number | The index of the largest previous depth |
next | number | The index of the smallest following depth |
Optional interpolation | InterpolationType | interpolation type for the value |
number
The interpolated value or Number.NaN if outside the range
▸ Static getClassName(): string
string
▸ Static interpolateValueAt(depth, depthPrev, valuePrev, depthNext, valueNext, interpolation?): number
Utility function to interpolate a value between two depths.
| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
depthPrev | number | prev depth |
valuePrev | number | prev value |
depthNext | number | next depth |
valueNext | number | next value |
Optional interpolation | InterpolationType | interpolation type for the value |
number
The interpolated value or Number.NaN if outside the range