Last updated

API / geotoolkit / contour / scale / ContourRangeScale / ContourRangeScale

Class: ContourRangeScale

scale.ContourRangeScale.ContourRangeScale

Extends RegularContourScale, adds the ability to show a single additional user specified level

Hierarchy

Table of contents

Constructors
[new ContourRangeScale(range, step, showSingleLevel, singleLevelValue)](/solutions/geotoolkit/apis/classes/geotoolkit.contour.scale.contourrangescale.contourrangescale.md#new contourrangescale(range, step, showsinglelevel, singlelevelvalue))[new ContourRangeScale(scale)](/solutions/geotoolkit/apis/classes/geotoolkit.contour.scale.contourrangescale.contourrangescale.md#new contourrangescale(scale))
Methods

Contents

Constructors

new ContourRangeScale(range, step, showSingleLevel, singleLevelValue)

new ContourRangeScale(range, step?, showSingleLevel?, singleLevelValue?)

Parameters

Name Type Description
rangeRangeThe data range or another scale.
Optional stepnumberThe data range step.
Optional showSingleLevelbooleanWhether the single level should be shown.
Optional singleLevelValuenumberThe value of the single level.

Overrides

RegularContourScale.constructor


new ContourRangeScale(scale)

new ContourRangeScale(scale)

Parameters

Name Type
scaleContourRangeScale

Overrides

RegularContourScale.constructor

Methods

getArray

getArray(): number[]

Gets the scale array.

Returns

number[]

scaleArray The scale array


getClassName

getClassName(): string

Returns

string

Inherited from

RegularContourScale.getClassName


getCount

getCount(): number

Gets the total number of intervals within the scale.

Returns

number

size Size of the scale (#intervals)

Overrides

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

RegularContourScale.getIndex


getProperties

getProperties(): AnyRecord

Gets the scale properties

Returns

AnyRecord

properties Scale properties

Inherited from

RegularContourScale.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 out of range

Parameters

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

Returns

Range

range The full range of this scale.

Overrides

RegularContourScale.getRange


getSeparateSingleLevel

getSeparateSingleLevel(): boolean

Gets the flag indicating whether to separate the single level.

Returns

boolean

separateSingleLevel The flag indicating single level separation.


getSeparateSingleLevelFactor

getSeparateSingleLevelFactor(): number

Gets the factor which is used to calculate if single level will be separate

Returns

number


getShowSingleLevel

getShowSingleLevel(): boolean

Gets the flag for the single label visibility

Returns

boolean

showSingleLevel The flag indicating single level visibility.


getSingleLevelIndex

getSingleLevelIndex(): number

Gets the single level index.

Returns

number

singleLevelIndex The index position of the single index.


getSingleLevelValue

getSingleLevelValue(): number

Gets the single level value.

Returns

number

singleLevelValue The value of the single index.


getStep

getStep(): number

Gets the step value.

Returns

number

step The step value.


setProperties

setProperties(properties): ContourRangeScale

Sets the scale properties

Parameters

Name Type Description
propertiesAnyRecordscale properties

Returns

ContourRangeScale

this

Inherited from

RegularContourScale.setProperties


setSeparateSingleLevelFactor

setSeparateSingleLevelFactor(factor): ContourRangeScale

Sets the factor which is used to calculate if single level will be separate

Parameters

Name Type Description
factornumberfactor

Returns

ContourRangeScale


getClassName

Static getClassName(): string

Returns

string

Inherited from

RegularContourScale.getClassName