API / geotoolkit / contour / scale / IrregularContourScale / 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.
↳
IrregularContourScale
Constructors
Constructors
• new IrregularContourScale(array)
| Name | Type | Description |
|---|---|---|
array | number[] | Float64Array | Array of contour values. These can be out of order, but will be sorted into order. |
ContourScale.constructor
Methods
▸ getArray(): Float64Array
Gets the scale array.
Float64Array
The scale array
▸ getClassName(): string
string
▸ getCount(): number
The number of intervals in this scale (=#values + 1: intervals to +/- infinity are included
number
size The number of intervals in this scale
▸ getIndex(zValue): number
Finds the contour index representing the supplied z-value.
| Name | Type | Description |
|---|---|---|
zValue | number | z-value for which contour index has to be found |
number
index The contour index to which the z value belongs
▸ getProperties(): AnyRecord
Gets the scale properties
properties Scale properties
▸ 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
| Name | Type | Description |
|---|---|---|
index | number | Optional Parameter. The contour index for which to find the z-value range. |
range The full range of this scale.
▸ setProperties(properties): IrregularContourScale
Sets the scale properties
| Name | Type | Description |
|---|---|---|
properties | AnyRecord | scale properties |
this
▸ Static getClassName(): string
string