Skip to content

Class: Field

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Field(params): Field

Parameters

NameType
paramsIField

Returns

Field

Defined in

core/dist/index.d.ts:109

Properties

grid

grid: (null | Vector)[][]

Defined in

core/dist/index.d.ts:106


range

range: undefined | (undefined | number)[]

Defined in

core/dist/index.d.ts:107

Methods

buildGrid

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

Returns

(null | Vector)[][]

Defined in

core/dist/index.d.ts:110


release

release(): void

release data

Returns

void

Defined in

core/dist/index.d.ts:114


extent

extent(): number[]

grib data extent 格点数据范围

Returns

number[]

Defined in

core/dist/index.d.ts:119


calculateRange

calculateRange(): undefined | any[]

calculate vector value range

Returns

undefined | any[]

Defined in

core/dist/index.d.ts:136


contains

contains(lon, lat): any

Parameters

NameType
lonnumber
latnumber

Returns

any

Defined in

core/dist/index.d.ts:144


getDecimalIndexes

getDecimalIndexes(lon, lat): number[]

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

Parameters

NameType
lonnumber
latnumber

Returns

number[]

Defined in

core/dist/index.d.ts:150


valueAt

valueAt(lon, lat): null | Vector

Nearest value at lon-lat coordinates 线性插值

Parameters

NameType
lonnumber
latnumber

Returns

null | Vector

Defined in

core/dist/index.d.ts:157


interpolatedValueAt

interpolatedValueAt(lon, lat): null | Vector

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

Parameters

NameType
lonnumber
latnumber

Returns

null | Vector

Defined in

core/dist/index.d.ts:164


hasValueAt

hasValueAt(lon, lat): boolean

Parameters

NameType
lonnumber
latnumber

Returns

boolean

Defined in

core/dist/index.d.ts:165


valueAtIndexes

valueAtIndexes(i, j): null | Vector

Value for grid indexes

Parameters

NameTypeDescription
inumbercolumn index (integer)
jnumberrow index (integer)

Returns

null | Vector

Defined in

core/dist/index.d.ts:213


lonLatAtIndexes

lonLatAtIndexes(i, j): number[]

Lon-Lat for grid indexes

Parameters

NameTypeDescription
inumbercolumn index (integer)
jnumberrow index (integer)

Returns

number[]

[lon, lat]

Defined in

core/dist/index.d.ts:220


randomize

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

生成粒子位置

Parameters

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

Returns

IPosition

IPosition

Defined in

core/dist/index.d.ts:241


checkFields

checkFields(): boolean

判断是否是 Field 的实例

Returns

boolean

boolean

Defined in

core/dist/index.d.ts:246

Released under the MIT License.