1. SunshineAnalysis
日照时长分析 (对指定区域内的日照时长进行采样计算并可视化)
1.1. new SunshineAnalysis(options)
Param | Type | Default | Description |
---|---|---|---|
options | Object |
||
[options.region] | Array.<Cartesain3> |
[] |
指定分析区域的顶点坐标集 |
[options.startTime] | JulianDate |
BOSGeo.JulianDate.fromIso8601('2021-12-22T08:00:00') |
日照时长开始统计的时刻 |
[options.stopTime] | JulianDate |
BOSGeo.JulianDate.fromIso8601('2021-12-22T18:00:00') |
日照时长终止统计的时刻 |
[options.timeIntervals] | Number |
5 |
采样时间间隔,单位为分钟,最小有效值为1 |
[options.spacingIntervals] | Number |
10 |
采样距离间隔,单位为米,最小有效值为1 |
[options.bottomHeight] | Number |
10 |
采样区域底部高程(距离海平面的高度),单位为米 |
[options.extrudedHeight] | Number |
0 |
采样区域拉伸高度,单位为米,最小值为0 |
[options.colorGradient] | ColorGradient |
颜色渐变梯度 |
Example
var sunshineAnalysis = new BOSGeo.SunshineAnalysis({
timeIntervals: 60,
bottomHeight: 10,
});
1.2. 属性
属性名 | Type | Default | Description |
---|---|---|---|
startTime | JulianDate |
BOSGeo.JulianDate.fromIso8601('2021-12-22T08:00:00') |
日照时长开始统计的时刻 |
stopTime | JulianDate |
BOSGeo.JulianDate.fromIso8601('2021-12-22T18:00:00') |
日照时长终止统计的时刻 |
timeIntervals | Number |
5 |
采样时间间隔,单位为分钟,最小有效值为1 |
spacingIntervals | Number |
10 |
采样距离间隔,单位为米,最小有效值为1 |
bottomHeight | Number |
10 |
采样区域底部高程,单位为米 |
extrudedHeight | JulianDate |
0 |
采样区域拉伸高度,单位为米,最小值为0 |
show | Boolean |
true |
是否显示(日照时长采样点) |
colorGradient | ColorGradient |
(时长归一化后映射的)颜色梯度 |
1.3. 方法
1.3.1. sunshineAnalysis.start(options)
开始日照时长分析
Param | Type | Description |
---|---|---|
options | Object |
|
[options.region] | Array.<Cartesian3> |
指定分析区域的顶点坐标集 |
[options.bottomHeight] | Number |
指定分析区域的底部高程(距离海平面的高度) |
[options.extrudedHeight] | Number |
指定分析区域的拉伸高度 |
Example
var drawHandler = new BOSGeo.DrawHandler(geoViewer);
drawHandler.drawPolygonPrimitive({
name: '',
alpha: 0.5,
isGround: true
}, (res) => {
if (res && res.positions) {
sunshineAnalysis.start({
region: res.positions,
});
}
});
1.3.2. sunshineAnalysis.querySunshineRatio(cartesian, ratioAccuracy) ⇒ Object
查询日照时长率
Returns : Object
-
{ ratio: Number, time: Number } : ratio: 时长率, time: 光照时长/分钟
Param | Type | Default | Description |
---|---|---|---|
cartesian | Cartesian3 |
采样点坐标 |
|
[ratioAccuracy] | Number |
3 |
时长率的精确度 |
Example
geoViewer.on(BOSGeo.MapEventType.LEFT_CLICK, (e) => {
const {ratio, time} = sunshineAnalysis.querySunshineRatio(e.world_position);
console.log(`日照时长率:${ratio},日照时长:${time} 分钟!`);
}, [BOSGeo.MapPickType.WORLD_POSITION])
1.3.3. sunshineAnalysis.destroy() ⇒ undefined
销毁