Last updated

API / geotoolkit / schematics / WeightedAspectRatioWidthStrategy / WeightedAspectRatioWidthStrategy

Class: WeightedAspectRatioWidthStrategy

schematics.WeightedAspectRatioWidthStrategy.WeightedAspectRatioWidthStrategy

The strategy sets track width according to the equation:
"trackWidth[device] = (trackLength[device] / aspectratio) * (OD[maximum] / OD[medium])"

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new WeightedAspectRatioWidthStrategy(options)

new WeightedAspectRatioWidthStrategy(options)

Parameters

Name Type
optionsOptions

Overrides

TrackWidthStrategy.constructor

Methods

getClassName

getClassName(): string

Returns

string

Inherited from

TrackWidthStrategy.getClassName


getDeviceLength

getDeviceLength(trajectory, tr): Object

Calculates trajectory widths (both: model and device)

Parameters

Name Type Description
trajectoryTrajectory2dtrajectory
trTransformationtransformation to device

Returns

Object

NameType
devicelengthnumber
lengthnumber

Inherited from

TrackWidthStrategy.getDeviceLength


getWidth

getWidth(tr, options): number

Return track width in pixels

Parameters

Name Type Description
trTransformationtransformation to device
optionsObjectoptions
options.trajectoryTrajectory2d
options.widthnumber

Returns

number

Overrides

TrackWidthStrategy.getWidth


getClassName

Static getClassName(): string

Returns

string

Inherited from

TrackWidthStrategy.getClassName