|
@@ -106,9 +106,7 @@ export default {
|
|
|
|
|
|
return wktPolygon;
|
|
|
},
|
|
|
- async smooth_ana(positions, positions_noHeight) {
|
|
|
- console.log('positions: ', positions);
|
|
|
- console.log('positions_noHeight: ', positions_noHeight);
|
|
|
+ async smooth_ana(positions, positions_noHeight, threeArray, height) {
|
|
|
let data = await getDsm({
|
|
|
"geom": this.coordsToWktPolygon(positions_noHeight),
|
|
|
'type': 'min'
|
|
@@ -124,6 +122,9 @@ export default {
|
|
|
});
|
|
|
|
|
|
this.smooth_height = data.data.toFixed(2)
|
|
|
+
|
|
|
+ let cutVolume = cutFillAnalysis.VolumeAnalysis(threeArray, height);
|
|
|
+ that.result = cutVolume.toFixed(2);
|
|
|
},
|
|
|
draw() {
|
|
|
|
|
@@ -206,7 +207,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (that.radio == 'smooth') {
|
|
|
- that.smooth_ana(positions, positions_noHeight);
|
|
|
+ that.smooth_ana(positions, positions_noHeight, threeArray, -that.height);
|
|
|
|
|
|
} else if (that.radio == 'cut') {
|
|
|
if (that.height < 0) {
|
|
@@ -300,14 +301,14 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
- // const terrainP = new Cesium.CesiumTerrainProvider({
|
|
|
- // url: 'http://192.168.60.2:8090/iserver/services/3D-local3DCache-SanYaShi_GaoCheng_Level_16DataSource/rest/realspace/datas/%E4%B8%89%E4%BA%9A%E5%B8%82_%E9%AB%98%E7%A8%8B_Level_16%40DataSource',
|
|
|
- // isSct: true//地形服务源自SuperMap iServer发布时需设置isSct为true
|
|
|
- // });
|
|
|
+ const terrainP = new Cesium.CesiumTerrainProvider({
|
|
|
+ url: 'http://192.168.60.2:8090/iserver/services/3D-local3DCache-SanYaShi_GaoCheng_Level_16DataSource/rest/realspace/datas/%E4%B8%89%E4%BA%9A%E5%B8%82_%E9%AB%98%E7%A8%8B_Level_16%40DataSource',
|
|
|
+ isSct: true//地形服务源自SuperMap iServer发布时需设置isSct为true
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
|
|
- // viewer.terrainProvider = terrainP;
|
|
|
+ viewer.terrainProvider = terrainP;
|
|
|
|
|
|
|
|
|
|