Skip to content

Class: Field

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Field(params): Field

Parameters

NameType
paramsIField

Returns

Field

Defined in

Field.ts:106

Properties

grid

grid: (null | Vector)[][]

Defined in

Field.ts:102


range

range: undefined | (undefined | number)[]

Defined in

Field.ts:103

Methods

buildGrid

buildGrid(): (null | Vector)[][]

Returns

(null | Vector)[][]

Defined in

Field.ts:163


release

release(): void

release data

Returns

void

Defined in

Field.ts:190


extent

extent(): number[]

grib data extent 格点数据范围

Returns

number[]

Defined in

Field.ts:198


calculateRange

calculateRange(): undefined | any[]

calculate vector value range

Returns

undefined | any[]

Defined in

Field.ts:237


contains

contains(lon, lat): any

Parameters

NameType
lonnumber
latnumber

Returns

any

Defined in

Field.ts:299


getDecimalIndexes

getDecimalIndexes(lon, lat): number[]

获取经纬度所在的位置索引

Parameters

NameType
lonnumber
latnumber

Returns

number[]

Defined in

Field.ts:323


valueAt

valueAt(lon, lat): null | Vector

Nearest value at lon-lat coordinates 线性插值

Parameters

NameType
lonnumber
latnumber

Returns

null | Vector

Defined in

Field.ts:340


interpolatedValueAt

interpolatedValueAt(lon, lat): null | Vector

Get interpolated grid value lon-lat coordinates 双线性插值

Parameters

NameType
lonnumber
latnumber

Returns

null | Vector

Defined in

Field.ts:367


hasValueAt

hasValueAt(lon, lat): boolean

Parameters

NameType
lonnumber
latnumber

Returns

boolean

Defined in

Field.ts:382


valueAtIndexes

valueAtIndexes(i, j): null | Vector

Value for grid indexes

Parameters

NameTypeDescription
inumbercolumn index (integer)
jnumberrow index (integer)

Returns

null | Vector

Defined in

Field.ts:506


lonLatAtIndexes

lonLatAtIndexes(i, j): number[]

Lon-Lat for grid indexes

Parameters

NameTypeDescription
inumbercolumn index (integer)
jnumberrow index (integer)

Returns

number[]

[lon, lat]

Defined in

Field.ts:516


randomize

randomize(o?, width, height, unproject): IPosition

生成粒子位置

Parameters

NameType
oIPosition
widthnumber
heightnumber
unproject(a: number[]) => null | [number, number]

Returns

IPosition

IPosition

Defined in

Field.ts:555


checkFields

checkFields(): boolean

判断是否是 Field 的实例

Returns

boolean

boolean

Defined in

Field.ts:580

Released under the MIT License.