Class: Field ¶
Table of contents ¶
Constructors ¶
Properties ¶
Methods ¶
- buildGrid
- release
- extent
- calculateRange
- contains
- getDecimalIndexes
- valueAt
- interpolatedValueAt
- hasValueAt
- valueAtIndexes
- lonLatAtIndexes
- randomize
- checkFields
Constructors ¶
constructor ¶
• new Field(params
): Field
Parameters ¶
Name | Type |
---|---|
params | IField |
Returns ¶
Defined in ¶
Properties ¶
grid ¶
• grid: (null
| Vector
)[][]
Defined in ¶
range ¶
• range: undefined
| (undefined
| number
)[]
Defined in ¶
Methods ¶
buildGrid ¶
▸ buildGrid(): (null
| Vector
)[][]
Returns ¶
(null
| Vector
)[][]
Defined in ¶
release ¶
▸ release(): void
release data
Returns ¶
void
Defined in ¶
extent ¶
▸ extent(): number
[]
grib data extent 格点数据范围
Returns ¶
number
[]
Defined in ¶
calculateRange ¶
▸ calculateRange(): undefined
| any
[]
calculate vector value range
Returns ¶
undefined
| any
[]
Defined in ¶
contains ¶
▸ contains(lon
, lat
): any
Parameters ¶
Name | Type |
---|---|
lon | number |
lat | number |
Returns ¶
any
Defined in ¶
getDecimalIndexes ¶
▸ getDecimalIndexes(lon
, lat
): number
[]
获取经纬度所在的位置索引
Parameters ¶
Name | Type |
---|---|
lon | number |
lat | number |
Returns ¶
number
[]
Defined in ¶
valueAt ¶
▸ valueAt(lon
, lat
): null
| Vector
Nearest value at lon-lat coordinates 线性插值
Parameters ¶
Name | Type |
---|---|
lon | number |
lat | number |
Returns ¶
null
| Vector
Defined in ¶
interpolatedValueAt ¶
▸ interpolatedValueAt(lon
, lat
): null
| Vector
Get interpolated grid value lon-lat coordinates 双线性插值
Parameters ¶
Name | Type |
---|---|
lon | number |
lat | number |
Returns ¶
null
| Vector
Defined in ¶
hasValueAt ¶
▸ hasValueAt(lon
, lat
): boolean
Parameters ¶
Name | Type |
---|---|
lon | number |
lat | number |
Returns ¶
boolean
Defined in ¶
valueAtIndexes ¶
▸ valueAtIndexes(i
, j
): null
| Vector
Value for grid indexes
Parameters ¶
Name | Type | Description |
---|---|---|
i | number | column index (integer) |
j | number | row index (integer) |
Returns ¶
null
| Vector
Defined in ¶
lonLatAtIndexes ¶
▸ lonLatAtIndexes(i
, j
): number
[]
Lon-Lat for grid indexes
Parameters ¶
Name | Type | Description |
---|---|---|
i | number | column index (integer) |
j | number | row index (integer) |
Returns ¶
number
[]
[lon, lat]
Defined in ¶
randomize ¶
▸ randomize(o?
, width
, height
, unproject
): IPosition
生成粒子位置
Parameters ¶
Name | Type |
---|---|
o | IPosition |
width | number |
height | number |
unproject | (a : number []) => null | [number , number ] |
Returns ¶
IPosition
IPosition
Defined in ¶
checkFields ¶
▸ checkFields(): boolean
判断是否是 Field
的实例
Returns ¶
boolean
boolean