GeoVolumeCalculate

new Cesium.GeoVolumeCalculate(options, callback)

三维地图填挖方分析插件类
Name Type Description
options Object optional 对象具有以下属性:
Name Type Default Description
viewer Viewer optional 三维球
designElevation Number 4000 optional 规划高程
samplingPointsNumber Number 500 optional 采样点数量。越小则运算速度越快,相应地精度也越低。越大运算速度越慢,对应地精度也比较高.
callback function optional 回调函数,在分析完成时触发,参数是一个Promise
Example:
// 初始化填挖方分析插件.
var GeoVolumeCalculate=new Cesium.GeoVolumeCalculate({
	   viewer: viewer,
	   designElevation: 3000,
    samplingPointsNumber: 200
},function(promise){
    promise.then(function(result){
        console.log(result);
    })
});
Demo:

Methods

activate()

激活填挖方分析插件,左键开始绘制,右键结束绘制

clear()

清除填挖方分析结果

destroy()

销毁填挖方分析插件

volumeAnalysis(scene, polylinePositionArray_degree, designElevation, samplingPointsNumber)Promise

激活填挖方分析插件,左键开始绘制,右键结束绘制
Name Type Description
scene Scene 当前场景
polylinePositionArray_degree Array 带有高程的坐标数组
designElevation Number 设计基准面
samplingPointsNumber Number 采样点数
Returns:
分析完成的结果
Example:
// 初始化填挖方分析插件.
var scene=viewer.scene;
var polylinePositionArray_degree=[
    95.71454071065995,
    29.84559975029904,
    3657.036903333577,
    95.7530003335915,
    29.833285052531792,
    3459.779822074805,
    95.77400142612504,
    29.87672333825045,
    3277.7387479091662]
var designElevation=3600;
var samplingPointsNumber=200;
var promise=GeoVolumeCalculate.volumeAnalysis(scene,polylinePositionArray_degree,designElevation,samplingPointsNumber);
promise.then(function(result){
     console.log(result);
})