Last updated

API / geotoolkit / contour / scale / IrregularContourScale / IrregularContourScale

Class: IrregularContourScale

scale.IrregularContourScale.IrregularContourScale

IrregularContourScale implements the ContourScale interface, and stores scale values at arbitrary levels. Compare this to ContourRegularScale where the scale values are spaced at regular intervals. Creates a customised contour scale, using the supplied values.

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new IrregularContourScale(array)

new IrregularContourScale(array)

Parameters

Name Type Description
arraynumber[] | Float64ArrayArray of contour values. These can be out of order, but will be sorted into order.

Overrides

ContourScale.constructor

Methods

getArray

getArray(): Float64Array

Gets the scale array.

Returns

Float64Array

The scale array


getClassName

getClassName(): string

Returns

string

Inherited from

ContourScale.getClassName


getCount

getCount(): number

The number of intervals in this scale (=#values + 1: intervals to +/- infinity are included

Returns

number

size The number of intervals in this scale

Overrides

ContourScale.getCount


getIndex

getIndex(zValue): number

Finds the contour index representing the supplied z-value.

Parameters

Name Type Description
zValuenumberz-value for which contour index has to be found

Returns

number

index The contour index to which the z value belongs

Overrides

ContourScale.getIndex


getProperties

getProperties(): AnyRecord

Gets the scale properties

Returns

AnyRecord

properties Scale properties

Inherited from

ContourScale.getProperties


getRange

getRange(index): Range

Returns the full range of values in the contour scale if called with no argument or returns the range of values represented by the supplied contour index.

Throws

if index argument less than zero or greater than array length

Parameters

Name Type Description
indexnumberOptional Parameter. The contour index for which to find the z-value range.

Returns

Range

range The full range of this scale.

Overrides

ContourScale.getRange


setProperties

setProperties(properties): IrregularContourScale

Sets the scale properties

Parameters

Name Type Description
propertiesAnyRecordscale properties

Returns

IrregularContourScale

this

Inherited from

ContourScale.setProperties


getClassName

Static getClassName(): string

Returns

string

Inherited from

ContourScale.getClassName