Last updated

API / geotoolkit / welllog / data / LogCurveDataSource / LogCurveDataSource

Class: LogCurveDataSource

data.LogCurveDataSource.LogCurveDataSource

This class defines a well log curve data source.

Throws

if parameters depths and values are not specified properly

Example

import {LogCurveDataSource} from '@int/geotoolkit/welllog/data/LogCurveDataSource';
const data1 = new LogCurveDataSource({ 'depth': depthObject, 'values': valuesObject });

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new LogCurveDataSource(options)

new LogCurveDataSource(options?)

Constructor

Parameters

Name Type Description
Optional optionsOptionsoptions

Overrides

LogAbstractData.constructor

Methods

calculateNeatLimits

calculateNeatLimits(logScale, centerOnZeroOnNegativeMin, displayUnit): number[]

Return an array of neat min and max

Parameters

Name Type Description
logScalebooleanscale log scale
centerOnZeroOnNegativeMinbooleanIf negative and positive values, center around 0
displayUnitstring | AbstractUnitdisplayed unit

Returns

number[]

Overrides

LogAbstractData.calculateNeatLimits


clear

clear(): LogCurveDataSource

Clear log data.

Returns

LogCurveDataSource

Overrides

LogAbstractData.clear


dispose

dispose(): void

Dispose.

Returns

void

Inherited from

LogAbstractData.dispose


getClassName

getClassName(): string

Returns

string

Inherited from

LogAbstractData.getClassName


getDataOrder

getDataOrder(): Order

Return the order of the log data

Returns

Order

Overrides

LogAbstractData.getDataOrder


getDepth

getDepth(index): number

Gets depth at index

Parameters

Name Type Description
indexnumberindex

Returns

number

Overrides

LogAbstractData.getDepth


getDepthData

getDepthData(): NumericalDataSeries | NumericalDataSeriesView

Returns the internal series object used to store the depth data

Returns

NumericalDataSeries | NumericalDataSeriesView

the internal backing object


getDepths

getDepths(): number[]

Return an array of depths

Returns

number[]

Overrides

LogAbstractData.getDepths


getIndexAt

getIndexAt(depth, fromIndex?, toIndex?): number

Return index for specified depth

Parameters

Name Type Description
depthnumberThe depth for which you want to compute the index
Optional fromIndexnumberindex of sample in depths
Optional toIndexnumberindex of sample in depths

Returns

number

Inherited from

LogAbstractData.getIndexAt


getIndexUnit

getIndexUnit(): AbstractUnit

Return the value unit

Throws

when this method is not implemented

Returns

AbstractUnit

Overrides

LogAbstractData.getIndexUnit


getMaxDepth

getMaxDepth(): number

Return maximum depth

Throws

when this method is not implemented

Returns

number

Overrides

LogAbstractData.getMaxDepth


getMaxMeaningDepth

getMaxMeaningDepth(): number

Return maximum Meaning depth (last depth with value)

Returns

number

Overrides

LogAbstractData.getMaxMeaningDepth


getMaxValue

getMaxValue(): number

Return maximum data value

Returns

number

Overrides

LogAbstractData.getMaxValue


getMinDepth

getMinDepth(): number

Return minimum depth

Throws

when this method is not implemented

Returns

number

Overrides

LogAbstractData.getMinDepth


getMinMeaningDepth

getMinMeaningDepth(): number

Return minimum Meaning depth (first depth with value)

Returns

number

Overrides

LogAbstractData.getMinMeaningDepth


getMinValue

getMinValue(): number

Return minimum data value

Returns

number

Overrides

LogAbstractData.getMinValue


getName

getName(): string

Return name of the data

Returns

string

Overrides

LogAbstractData.getName


getSize

getSize(): number

Return the count of the samples

Returns

number

Overrides

LogAbstractData.getSize


getState

getState(): LogDataState

Return state

Returns

LogDataState

Inherited from

LogAbstractData.getState


getTimeStamp

getTimeStamp(): number

Return the value to indicate if data source was changed

Returns

number

Inherited from

LogAbstractData.getTimeStamp


getValue

getValue(index): number

Return value by index

Parameters

Name Type Description
indexnumberindex of the sample in the array

Returns

number

Inherited from

LogAbstractData.getValue


getValueAt

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.5

Example

// Depth Value
// 0      0
// 100    1
// 100    2
// 200    3

getValueAt(100) // -> 1
getValueAt(150) // -> 2.5

Example

// Depth Value
// 0      0
// 100    1
// 200    2
// 100    3

getValueAt(100) // -> 3
getValueAt(150) // -> 1.5

Parameters

Name Type Description
depthnumberThe depth for which you want to compute the value
Optional fromIndexnumberindex of sample in depths
Optional toIndexnumberindex of sample in depths
Optional interpolationInterpolationTypeinterpolation type for the value

Returns

number

Inherited from

LogAbstractData.getValueAt


getValueInRange

getValueInRange(depth, prev, next): number

Return value by depth, using linear interpolation if necessary. See LogAbstractData.findValueAt.

Throws

when this method is not implemented

Parameters

Name Type Description
depthnumberThe depth for which you want to compute the value
prevnumberThe index of the largest previous depth
nextnumberThe index of the smallest following depth

Returns

number

Overrides

LogAbstractData.getValueInRange


getValueUnit

getValueUnit(): AbstractUnit

Return value unit

Returns

AbstractUnit

Overrides

LogAbstractData.getValueUnit


getValues

getValues(): number[]

Return an array of values

Returns

number[]

Overrides

LogAbstractData.getValues


getValuesData

getValuesData(): NumericalDataSeries | NumericalDataSeriesView

Returns the internal series object used to store the value data

Returns

NumericalDataSeries | NumericalDataSeriesView

the internal backing object


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

LogAbstractData.hasEventListener


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

LogAbstractData.isDisposed


isForwardOnly

isForwardOnly(): boolean

Return true if data is in ascending order

Returns

boolean

Overrides

LogAbstractData.isForwardOnly


isSilent

isSilent(): boolean

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

Returns

boolean

Inherited from

LogAbstractData.isSilent


notify

notify<E>(type, source, args?): LogCurveDataSource

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceLogAbstractDataof the event
Optional argsEventMap[E]arguments of the event

Returns

LogCurveDataSource

this

Inherited from

LogAbstractData.notify


off

off<E>(type?, callback?): LogCurveDataSource

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.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: LogCurveDataSource, args: EventMap[E]) => voidfunction to be called

Returns

LogCurveDataSource

this

Inherited from

LogAbstractData.off


on

on<E>(type, callback): LogCurveDataSource

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.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: LogCurveDataSource, args: EventMap[E]) => voidto be called

Returns

LogCurveDataSource

this

Inherited from

LogAbstractData.on


requestData

requestData(range, scale, callback?): void

Parameters

Name Type Description
rangeRangerange
scalenumberscale
Optional callback() => voidcallback to be called after loading data

Returns

void

Overrides

LogAbstractData.requestData


resumeUpdate

resumeUpdate(forceUpdate): LogCurveDataSource

Resume update. forceUpdate updates data statistics (update min, max of values, depths...)

Parameters

Name Type Description
forceUpdatebooleanforce update based on the state of the data

Returns

LogCurveDataSource

this

Inherited from

LogAbstractData.resumeUpdate


setData

setData(options?): LogCurveDataSource

Sets data

Throws

if parameters depths and values are not specified properly

Parameters

Name Type Description
Optional optionsDataOptionsaddition options

Returns

LogCurveDataSource

this


setIndexUnit

setIndexUnit(unit): LogCurveDataSource

Sets index unit

Throws

when this method is not implemented

Parameters

Name Type Description
unitstring | AbstractUnitindex unit

Returns

LogCurveDataSource

Overrides

LogAbstractData.setIndexUnit


setName

setName(name): LogCurveDataSource

Set name of the data

Parameters

Name Type Description
namestringThe log data name

Returns

LogCurveDataSource

this

Overrides

LogAbstractData.setName


setSilent

setSilent(bool): LogCurveDataSource

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

LogCurveDataSource

this

Inherited from

LogAbstractData.setSilent


setState

setState(state): LogCurveDataSource

Sets state of data. Values can be (Empty,Normal, Warning,Error,Fetching).

Parameters

Name Type Description
stateLogDataStatestate of data.

Returns

LogCurveDataSource

this

Inherited from

LogAbstractData.setState


setValue

setValue(index, value): LogCurveDataSource

Set value by index

Throws

when this method is not implemented

Parameters

Name Type Description
indexnumberindex of the sample
valuenumbersample values

Returns

LogCurveDataSource

this

Overrides

LogAbstractData.setValue


setValueUnit

setValueUnit(unit): LogCurveDataSource

Sets value unit

Throws

when this method is not implemented

Parameters

Name Type Description
unitstring | AbstractUnitvalue unit

Returns

LogCurveDataSource

Overrides

LogAbstractData.setValueUnit


suspendUpdate

suspendUpdate(): LogCurveDataSource

Suspend update

Returns

LogCurveDataSource

this

Inherited from

LogAbstractData.suspendUpdate


update

Protected update(args?): void

Notify when data has been changed.

Parameters

Name Type Description
Optional argsLogDataEventoptional parameters

Returns

void

Inherited from

LogAbstractData.update


updateDataStatistics

Protected updateDataStatistics(): LogCurveDataSource

Update data statistics

Throws

when this method is not implemented

Returns

LogCurveDataSource

Overrides

LogAbstractData.updateDataStatistics


updateTimeStamp

updateTimeStamp(): void

Update time stamp

Returns

void

Inherited from

LogAbstractData.updateTimeStamp


findValueAt

Static findValueAt(depth, depths, values, prev, next, interpolation?): number

Utility function to interpolate a value between two depths.

Parameters

Name Type Description
depthnumberThe depth for which you want to compute the value
depthsnumber[]The array of ordered depths
valuesnumber[]The array of values
prevnumberThe index of the largest previous depth
nextnumberThe index of the smallest following depth
Optional interpolationInterpolationTypeinterpolation type for the value

Returns

number

The interpolated value or Number.NaN if outside the range

Inherited from

LogAbstractData.findValueAt


getClassName

Static getClassName(): string

Returns

string

Inherited from

LogAbstractData.getClassName


interpolateValueAt

Static interpolateValueAt(depth, depthPrev, valuePrev, depthNext, valueNext, interpolation?): number

Utility function to interpolate a value between two depths.

Parameters

Name Type Description
depthnumberThe depth for which you want to compute the value
depthPrevnumberprev depth
valuePrevnumberprev value
depthNextnumbernext depth
valueNextnumbernext value
Optional interpolationInterpolationTypeinterpolation type for the value

Returns

number

The interpolated value or Number.NaN if outside the range

Inherited from

LogAbstractData.interpolateValueAt