@kq_npm/client3d_webgl_vue 4.5.4-beta → 4.5.6-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aspectanalysis/index.js +7 -5
- package/boxclip/index.js +7 -6
- package/clientPrint/index.js +50208 -1835
- package/excavatefillanalysis/index.js +8 -7
- package/flight/index.js +1 -1
- package/floodanalysis/index.js +8 -6
- package/geologicalbodyanalysis/index.js +6 -4
- package/gpuspatialquery/index.js +7 -6
- package/heatmap3d/index.js +4 -4
- package/index.js +281 -183
- package/isolineanalysis/index.js +7 -6
- package/measure/index.js +2 -2
- package/modelFlat/index.js +64 -41
- package/modelexcavate/index.js +22 -17
- package/modelselect/index.js +7 -6
- package/package.json +1 -1
- package/planeclip/index.js +7 -6
- package/scaneffect/index.js +4 -4
- package/sceneadvancedtoimage/index.js +4 -2
- package/sceneapp/index.js +12 -8
- package/sceneview/index.js +11904 -11827
- package/shadowanalysis/index.js +6 -4
- package/skylineanalysis/index.js +7 -5
- package/slopeanalysis/index.js +7 -5
- package/slopeaspectanalysis/index.js +8 -5
- package/terrainoperation/index.js +8 -6
- package/terrainprofileanalysis/index.js +7 -5
package/isolineanalysis/index.js
CHANGED
|
@@ -264,16 +264,14 @@ var message = __webpack_require__(3275);
|
|
|
264
264
|
|
|
265
265
|
|
|
266
266
|
|
|
267
|
-
/*
|
|
268
|
-
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
269
|
-
* All rights reserved.
|
|
267
|
+
/*
|
|
268
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
269
|
+
* All rights reserved.
|
|
270
270
|
*/
|
|
271
271
|
|
|
272
272
|
//等值线分析逻辑类
|
|
273
273
|
|
|
274
274
|
class IsolineAnalysisViewModel {
|
|
275
|
-
//等值线分析存储参数对象
|
|
276
|
-
|
|
277
275
|
constructor(scenceView, options) {
|
|
278
276
|
(0,defineProperty/* default */.A)(this, "_elevation", null);
|
|
279
277
|
//等值线分析三维对象
|
|
@@ -300,6 +298,9 @@ class IsolineAnalysisViewModel {
|
|
|
300
298
|
src: const_image_.GREEN_TO_BLUE_URL
|
|
301
299
|
}]);
|
|
302
300
|
(0,defineProperty/* default */.A)(this, "_options", null);
|
|
301
|
+
//等值线分析存储参数对象
|
|
302
|
+
(0,defineProperty/* default */.A)(this, "_language", {});
|
|
303
|
+
this._language = scenceView._language;
|
|
303
304
|
this._options = options;
|
|
304
305
|
this._options.viewer = scenceView._viewer;
|
|
305
306
|
this._options.viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
@@ -453,7 +454,7 @@ class IsolineAnalysisViewModel {
|
|
|
453
454
|
});
|
|
454
455
|
} else {
|
|
455
456
|
(0,message/* default */.A)({
|
|
456
|
-
message: "
|
|
457
|
+
message: this._language["terrainAnalysisTips"],
|
|
457
458
|
type: "warning"
|
|
458
459
|
});
|
|
459
460
|
}
|
package/measure/index.js
CHANGED
|
@@ -920,7 +920,7 @@ const __default__ = {
|
|
|
920
920
|
if (mode.value === "ground") {
|
|
921
921
|
if (!viewModel.checkTerrainAdded()) {
|
|
922
922
|
(0,message/* default */.A)({
|
|
923
|
-
message: "
|
|
923
|
+
message: language.value["measuretAddTerrainTips"],
|
|
924
924
|
type: "warning"
|
|
925
925
|
});
|
|
926
926
|
return;
|
|
@@ -929,7 +929,7 @@ const __default__ = {
|
|
|
929
929
|
if (mode.value === "model") {
|
|
930
930
|
if (!viewModel.checkModelAdded()) {
|
|
931
931
|
(0,message/* default */.A)({
|
|
932
|
-
message: "
|
|
932
|
+
message: language.value["measuretAddModelTips"],
|
|
933
933
|
type: "warning"
|
|
934
934
|
});
|
|
935
935
|
return;
|
package/modelFlat/index.js
CHANGED
|
@@ -255,9 +255,9 @@ var message = __webpack_require__(3275);
|
|
|
255
255
|
|
|
256
256
|
|
|
257
257
|
|
|
258
|
-
/*
|
|
259
|
-
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
260
|
-
* All rights reserved.
|
|
258
|
+
/*
|
|
259
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
260
|
+
* All rights reserved.
|
|
261
261
|
*/
|
|
262
262
|
//模型拾取逻辑类
|
|
263
263
|
|
|
@@ -271,32 +271,54 @@ class ModelFlatViewModel {
|
|
|
271
271
|
//全局参数
|
|
272
272
|
(0,defineProperty/* default */.A)(this, "_removeEventListener", null);
|
|
273
273
|
//绘制完成监听事件
|
|
274
|
+
(0,defineProperty/* default */.A)(this, "_measureHandler", null);
|
|
275
|
+
//测量三维对象
|
|
276
|
+
(0,defineProperty/* default */.A)(this, "_measureResult", null);
|
|
277
|
+
//测量结果
|
|
274
278
|
(0,defineProperty/* default */.A)(this, "_flatteningPolygonTex", null);
|
|
275
279
|
// 平整对象
|
|
276
280
|
(0,defineProperty/* default */.A)(this, "_assistPolygons", []);
|
|
277
281
|
//平整辅助面数组
|
|
278
282
|
(0,defineProperty/* default */.A)(this, "currentFlatPolygonIndex", -1);
|
|
283
|
+
(0,defineProperty/* default */.A)(this, "_language", {});
|
|
279
284
|
this._viewer = scenceView._viewer;
|
|
280
285
|
this._options = viewModel;
|
|
281
286
|
this._viewer.scene.globe.depthTestAgainstTerrain = true;
|
|
287
|
+
this._language = scenceView._language;
|
|
282
288
|
this._drawManager = scenceView._drawManager;
|
|
283
289
|
//Create flattenning controller
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
var that = this;
|
|
291
|
+
if (scenceView.g_flattenedPolygonTexture) {
|
|
292
|
+
this._flatteningPolygonTex = scenceView.g_flattenedPolygonTexture;
|
|
293
|
+
} else {
|
|
294
|
+
let kq3dFlattenning = new window.Cesium.Kq3dFlattenning(this._viewer, {});
|
|
295
|
+
this._flatteningPolygonTex = kq3dFlattenning.createFlattenedPolygonTexture();
|
|
296
|
+
var models = this._viewer.scene.primitives._primitives;
|
|
297
|
+
for (let i = 0; i < models.length; i++) {
|
|
298
|
+
if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
|
|
299
|
+
that._flatteningPolygonTex.attachTileset(models[i]);
|
|
300
|
+
}
|
|
292
301
|
}
|
|
293
302
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
303
|
+
// this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
|
|
304
|
+
// if (shape) {
|
|
305
|
+
// that._options.positions = shape._controlPoints;
|
|
306
|
+
// that.createFlat();
|
|
307
|
+
// that._drawManager.clear();
|
|
308
|
+
// }
|
|
309
|
+
// });
|
|
310
|
+
this._measureHandler = new Cesium.Kq3dMeasureHandler(this._viewer);
|
|
311
|
+
this._measureHandler.measureEvent.addEventListener(function (result) {
|
|
312
|
+
that._measureResult = result;
|
|
313
|
+
result.measureResult.label.show = false;
|
|
314
|
+
});
|
|
315
|
+
this._measureHandler.activeEvent.addEventListener(function (ret) {
|
|
316
|
+
if (ret == false) {
|
|
317
|
+
if (that._measureResult) {
|
|
318
|
+
that._options.positions = that._measureResult.positions;
|
|
319
|
+
that.createFlat();
|
|
320
|
+
that._measureResult.measureResult.destroy();
|
|
321
|
+
}
|
|
300
322
|
}
|
|
301
323
|
});
|
|
302
324
|
}
|
|
@@ -315,7 +337,7 @@ class ModelFlatViewModel {
|
|
|
315
337
|
positions: this._options.positions,
|
|
316
338
|
height: this._options.flatHeight
|
|
317
339
|
});
|
|
318
|
-
this._flatteningPolygonTex.addFlattenedPolygon(myPolygon);
|
|
340
|
+
this._flatteningPolygonTex && this._flatteningPolygonTex.addFlattenedPolygon(myPolygon);
|
|
319
341
|
}
|
|
320
342
|
// 获取平整数量
|
|
321
343
|
getFlatCount() {
|
|
@@ -327,18 +349,18 @@ class ModelFlatViewModel {
|
|
|
327
349
|
var flag = false;
|
|
328
350
|
var models = this._viewer.scene.primitives._primitives;
|
|
329
351
|
for (let i = 0; i < models.length; i++) {
|
|
330
|
-
if (models[i]._url) {
|
|
352
|
+
if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
|
|
353
|
+
models[i].flattenDiscard = false;
|
|
331
354
|
flag = true;
|
|
332
355
|
}
|
|
333
356
|
}
|
|
334
357
|
if (flag) {
|
|
335
|
-
this.remove();
|
|
336
|
-
this.
|
|
337
|
-
|
|
338
|
-
});
|
|
358
|
+
this.remove(!this._options.showFlattenedPolygons);
|
|
359
|
+
this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
|
|
360
|
+
// this._drawManager.startDraw("polygon", { clampToGround: true });
|
|
339
361
|
} else {
|
|
340
362
|
(0,message/* default */.A)({
|
|
341
|
-
message: "
|
|
363
|
+
message: this._language["addModelTips"],
|
|
342
364
|
type: "warning"
|
|
343
365
|
});
|
|
344
366
|
}
|
|
@@ -346,7 +368,7 @@ class ModelFlatViewModel {
|
|
|
346
368
|
// 切换高度重新计算
|
|
347
369
|
setHeight(val) {
|
|
348
370
|
this._options.flatHeight = Number(val);
|
|
349
|
-
if (this.currentFlatPolygonIndex
|
|
371
|
+
if (this.currentFlatPolygonIndex == -1) {
|
|
350
372
|
this._flatteningPolygonTex.setFlattenedPolygonHeight(-1, Number(val));
|
|
351
373
|
} else {
|
|
352
374
|
this._flatteningPolygonTex.setFlattenedPolygonHeight(this.currentFlatPolygonIndex, Number(val));
|
|
@@ -370,21 +392,27 @@ class ModelFlatViewModel {
|
|
|
370
392
|
this.currentFlatPolygonIndex = val;
|
|
371
393
|
}
|
|
372
394
|
// 清除绘制
|
|
373
|
-
remove() {
|
|
395
|
+
remove(bool) {
|
|
374
396
|
this._drawManager.stopDraw();
|
|
397
|
+
if (bool) {
|
|
398
|
+
this._flatteningPolygonTex && this._flatteningPolygonTex.removeAllFlattenedPolygon();
|
|
399
|
+
for (var i = 0; i < this._assistPolygons.length; i++) {
|
|
400
|
+
this._viewer.entities.remove(this._assistPolygons[i]);
|
|
401
|
+
}
|
|
402
|
+
this._assistPolygons = [];
|
|
403
|
+
}
|
|
375
404
|
}
|
|
376
405
|
// 清除
|
|
377
406
|
clear() {
|
|
378
|
-
this.remove();
|
|
379
|
-
this.
|
|
380
|
-
|
|
381
|
-
this._viewer.entities.remove(this._assistPolygons[i]);
|
|
382
|
-
}
|
|
383
|
-
this._assistPolygons = [];
|
|
407
|
+
this.remove(true);
|
|
408
|
+
this._measureResult = null;
|
|
409
|
+
this._measureHandler.clear();
|
|
384
410
|
}
|
|
385
411
|
//销毁
|
|
386
412
|
destroy() {
|
|
387
413
|
this.clear();
|
|
414
|
+
this._measureHandler && this._measureHandler.destroy();
|
|
415
|
+
this._measureHandler = null;
|
|
388
416
|
}
|
|
389
417
|
}
|
|
390
418
|
// EXTERNAL MODULE: external "@kq_npm/client_icons_vue"
|
|
@@ -475,7 +503,9 @@ const __default__ = {
|
|
|
475
503
|
// 模型平整深度范围最小值
|
|
476
504
|
maxFlatDepth: props.settingParams && props.settingParams.maxExcavationDepth || 100,
|
|
477
505
|
// 模型平整深度范围最大值
|
|
478
|
-
flatteningShow: props.settingParams && props.settingParams.maxExcavationDepth || true
|
|
506
|
+
flatteningShow: props.settingParams && props.settingParams.maxExcavationDepth || true,
|
|
507
|
+
// 压平面是否显示
|
|
508
|
+
showFlattenedPolygons: props.settingParams && props.settingParams.showFlattenedPolygons || false // 是否显示多个压平面分析结果
|
|
479
509
|
});
|
|
480
510
|
|
|
481
511
|
// 组件容器Ref
|
|
@@ -508,14 +538,7 @@ const __default__ = {
|
|
|
508
538
|
//父组件ScenceView初始化完成后执行
|
|
509
539
|
gis_utils_.utils.getWebMap(null, scenceView => {
|
|
510
540
|
if (scenceView) {
|
|
511
|
-
viewModel = new ModelFlatViewModel(scenceView,
|
|
512
|
-
flatHeight: formItem.flatHeight,
|
|
513
|
-
flatteningShow: formItem.flatteningShow
|
|
514
|
-
});
|
|
515
|
-
setTimeout(() => {
|
|
516
|
-
setCurrentFlatPolygonIndex(0);
|
|
517
|
-
console.log(getFlatCount());
|
|
518
|
-
}, 1500);
|
|
541
|
+
viewModel = new ModelFlatViewModel(scenceView, formItem);
|
|
519
542
|
}
|
|
520
543
|
});
|
|
521
544
|
});
|
package/modelexcavate/index.js
CHANGED
|
@@ -257,6 +257,7 @@ class ModelExcavateViewModel {
|
|
|
257
257
|
(0,defineProperty/* default */.A)(this, "_wallPrimitive", void 0);
|
|
258
258
|
//Kq3dWallPrimitive
|
|
259
259
|
(0,defineProperty/* default */.A)(this, "entity0", null);
|
|
260
|
+
(0,defineProperty/* default */.A)(this, "_language", {});
|
|
260
261
|
(0,defineProperty/* default */.A)(this, "wall", null);
|
|
261
262
|
(0,defineProperty/* default */.A)(this, "ratio", 0.01);
|
|
262
263
|
(0,defineProperty/* default */.A)(this, "ii", 1);
|
|
@@ -268,21 +269,25 @@ class ModelExcavateViewModel {
|
|
|
268
269
|
(0,defineProperty/* default */.A)(this, "scratchCartesian7", new window.Cesium.Cartesian3());
|
|
269
270
|
(0,defineProperty/* default */.A)(this, "intervalId", null);
|
|
270
271
|
(0,defineProperty/* default */.A)(this, "g_flattenedPolygonTexture", null);
|
|
272
|
+
this._language = scenceView._language;
|
|
271
273
|
this._viewer = scenceView._viewer;
|
|
272
274
|
this._options = options;
|
|
273
275
|
this._viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
|
|
274
|
-
|
|
275
|
-
let kq3dFlattenning = new window.Cesium.Kq3dFlattenning(this._viewer, {});
|
|
276
|
-
this.g_flattenedPolygonTexture = kq3dFlattenning.createFlattenedPolygonTexture();
|
|
277
276
|
var that = this;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
277
|
+
if (scenceView.g_flattenedPolygonTexture) {
|
|
278
|
+
this.g_flattenedPolygonTexture = scenceView.g_flattenedPolygonTexture;
|
|
279
|
+
} else {
|
|
280
|
+
let kq3dFlattenning = new window.Cesium.Kq3dFlattenning(this._viewer, {});
|
|
281
|
+
this.g_flattenedPolygonTexture = kq3dFlattenning.createFlattenedPolygonTexture();
|
|
282
|
+
var models = this._viewer.scene.primitives._primitives;
|
|
283
|
+
for (let i = 0; i < models.length; i++) {
|
|
284
|
+
if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
|
|
285
|
+
models[i].enableFlattenning = true;
|
|
286
|
+
models[i].flattenDiscard = true;
|
|
287
|
+
models[i].readyPromise.then(function (tileset) {
|
|
288
|
+
that.g_flattenedPolygonTexture.attachTileset(tileset);
|
|
289
|
+
});
|
|
290
|
+
}
|
|
286
291
|
}
|
|
287
292
|
}
|
|
288
293
|
this._measureHandler = new Cesium.Kq3dMeasureHandler(this._viewer);
|
|
@@ -415,8 +420,8 @@ class ModelExcavateViewModel {
|
|
|
415
420
|
var models = this._viewer.scene.primitives._primitives;
|
|
416
421
|
for (let i = 0; i < models.length; i++) {
|
|
417
422
|
if (models[i] instanceof Cesium.Cesium3DTileset && models[i]._url) {
|
|
418
|
-
|
|
419
|
-
|
|
423
|
+
models[i].enableFlattenning = true;
|
|
424
|
+
models[i].flattenDiscard = true;
|
|
420
425
|
// models[i].readyPromise.then(function (tileset) {
|
|
421
426
|
// that.g_flattenedPolygonTexture.attachTileset(tileset);
|
|
422
427
|
// });
|
|
@@ -428,7 +433,7 @@ class ModelExcavateViewModel {
|
|
|
428
433
|
this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
|
|
429
434
|
} else {
|
|
430
435
|
(0,message/* default */.A)({
|
|
431
|
-
message: "
|
|
436
|
+
message: this._language["addModelTips"],
|
|
432
437
|
type: "warning"
|
|
433
438
|
});
|
|
434
439
|
}
|
|
@@ -467,8 +472,8 @@ class ModelExcavateViewModel {
|
|
|
467
472
|
//销毁
|
|
468
473
|
destroy() {
|
|
469
474
|
this.clear();
|
|
470
|
-
this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.detachAllTileset();
|
|
471
|
-
this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.destroy();
|
|
475
|
+
// this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.detachAllTileset();
|
|
476
|
+
// this.g_flattenedPolygonTexture && this.g_flattenedPolygonTexture.destroy();
|
|
472
477
|
this._measureHandler && this._measureHandler.destroy();
|
|
473
478
|
this._measureHandler = null;
|
|
474
479
|
}
|
|
@@ -686,7 +691,7 @@ const __default__ = {
|
|
|
686
691
|
}), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_row, {
|
|
687
692
|
class: "kq3d-model-excavate-tip"
|
|
688
693
|
}, {
|
|
689
|
-
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).skylineTips
|
|
694
|
+
default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).skylineTips), 1 /* TEXT */)]),
|
|
690
695
|
_: 1 /* STABLE */
|
|
691
696
|
}), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_3, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
|
|
692
697
|
onClick: _cache[5] || (_cache[5] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => startOperation(), ["stop"])),
|
package/modelselect/index.js
CHANGED
|
@@ -254,15 +254,13 @@ var message = __webpack_require__(3275);
|
|
|
254
254
|
|
|
255
255
|
|
|
256
256
|
|
|
257
|
-
/*
|
|
258
|
-
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
259
|
-
* All rights reserved.
|
|
257
|
+
/*
|
|
258
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
259
|
+
* All rights reserved.
|
|
260
260
|
*/
|
|
261
261
|
//模型拾取逻辑类
|
|
262
262
|
|
|
263
263
|
class ModelSelectViewModel {
|
|
264
|
-
// 模型属性匹配字段
|
|
265
|
-
|
|
266
264
|
constructor(scenceView, pickCallFunc) {
|
|
267
265
|
(0,defineProperty/* default */.A)(this, "_viewer", null);
|
|
268
266
|
//三维viewer对象
|
|
@@ -277,6 +275,9 @@ class ModelSelectViewModel {
|
|
|
277
275
|
(0,defineProperty/* default */.A)(this, "_modeFiledArray", null);
|
|
278
276
|
// 模型属性唯一值字段集合
|
|
279
277
|
(0,defineProperty/* default */.A)(this, "_modeFiled", "id");
|
|
278
|
+
// 模型属性匹配字段
|
|
279
|
+
(0,defineProperty/* default */.A)(this, "_language", {});
|
|
280
|
+
this._language = scenceView._language;
|
|
280
281
|
this._viewer = scenceView._viewer;
|
|
281
282
|
this._drawManager = scenceView._drawManager;
|
|
282
283
|
this._handler = new Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);
|
|
@@ -341,7 +342,7 @@ class ModelSelectViewModel {
|
|
|
341
342
|
this._isPick = true;
|
|
342
343
|
} else {
|
|
343
344
|
(0,message/* default */.A)({
|
|
344
|
-
message: "
|
|
345
|
+
message: this._language["addModelAnalysisTips"],
|
|
345
346
|
type: "warning"
|
|
346
347
|
});
|
|
347
348
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"4.5.
|
|
1
|
+
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"4.5.6-beta","homepage":"","keywords":["KQGIS","webGL","Vue"],"sdkNames":["@kq_npm/client_icons_vue"],"restrictedVersion":true,"validateSDK":true,"browserslist":["> 1%","last 2 versions","not dead","not ie 11"],"author":"KQWEB GROUP","license":"Apache-2.0","dependencies":{"colorcolor":"1.1.1","echarts":"5.5.1","echarts-stat":"1.2.0","js-cookie":"3.0.1","omit.js":"2.0.2","save":"2.5.0","tinycolor2":"1.4.2","vue-i18n":"9.2.0-beta.36","xlsx":"0.18.5","css-vars-ponyfill":"2.4.8","html2canvas":"1.4.1","xe-utils":"3.5.4"}}
|
package/planeclip/index.js
CHANGED
|
@@ -255,15 +255,13 @@ var message = __webpack_require__(3275);
|
|
|
255
255
|
|
|
256
256
|
|
|
257
257
|
|
|
258
|
-
/*
|
|
259
|
-
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
260
|
-
* All rights reserved.
|
|
258
|
+
/*
|
|
259
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
260
|
+
* All rights reserved.
|
|
261
261
|
*/
|
|
262
262
|
//平面裁剪逻辑类
|
|
263
263
|
|
|
264
264
|
class PlaneClipViewModel {
|
|
265
|
-
//绘制完成事件监听
|
|
266
|
-
|
|
267
265
|
constructor(scenceView, options) {
|
|
268
266
|
(0,defineProperty/* default */.A)(this, "_viewer", null);
|
|
269
267
|
//三维viewer对象
|
|
@@ -298,10 +296,13 @@ class PlaneClipViewModel {
|
|
|
298
296
|
(0,defineProperty/* default */.A)(this, "_drawManager", null);
|
|
299
297
|
//绘制管理对象
|
|
300
298
|
(0,defineProperty/* default */.A)(this, "_removeEventListener", null);
|
|
299
|
+
//绘制完成事件监听
|
|
300
|
+
(0,defineProperty/* default */.A)(this, "_language", {});
|
|
301
301
|
this._options = Object.assign({}, options, this._defaultOptions);
|
|
302
302
|
this._viewer = scenceView._viewer;
|
|
303
303
|
// this._viewer.enabledFXAA = true;
|
|
304
304
|
this._options.viewer = this._viewer;
|
|
305
|
+
this._language = scenceView._language;
|
|
305
306
|
this._drawManager = scenceView._drawManager;
|
|
306
307
|
let that = this;
|
|
307
308
|
this._removeEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
|
|
@@ -354,7 +355,7 @@ class PlaneClipViewModel {
|
|
|
354
355
|
});
|
|
355
356
|
} else {
|
|
356
357
|
(0,message/* default */.A)({
|
|
357
|
-
message: "
|
|
358
|
+
message: this._language["addModelAnalysisTips"],
|
|
358
359
|
type: "warning"
|
|
359
360
|
});
|
|
360
361
|
}
|
package/scaneffect/index.js
CHANGED
|
@@ -244,9 +244,9 @@ var const_image_ = __webpack_require__(4822);
|
|
|
244
244
|
;// CONCATENATED MODULE: ./src/webgl/scaneffect/ScanEffectViewModel.js
|
|
245
245
|
|
|
246
246
|
|
|
247
|
-
/*
|
|
248
|
-
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
249
|
-
* All rights reserved.
|
|
247
|
+
/*
|
|
248
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
249
|
+
* All rights reserved.
|
|
250
250
|
*/
|
|
251
251
|
|
|
252
252
|
|
|
@@ -660,7 +660,7 @@ class ScanEffectViewModel {
|
|
|
660
660
|
}
|
|
661
661
|
} else {
|
|
662
662
|
(0,message/* default */.A)({
|
|
663
|
-
message: "
|
|
663
|
+
message: this._language["addModelExtractionTips"],
|
|
664
664
|
type: "warning"
|
|
665
665
|
});
|
|
666
666
|
}
|
|
@@ -270,6 +270,8 @@ class SceneAdvancedToImageViewModel {
|
|
|
270
270
|
(0,defineProperty/* default */.A)(this, "_removeEventListener", null);
|
|
271
271
|
//绘制完成监听事件
|
|
272
272
|
(0,defineProperty/* default */.A)(this, "_satellitePyramidPrimitive", null);
|
|
273
|
+
(0,defineProperty/* default */.A)(this, "_language", {});
|
|
274
|
+
this._language = scenceView._language;
|
|
273
275
|
this._viewer = scenceView._viewer;
|
|
274
276
|
this._options = options;
|
|
275
277
|
this._drawManager = scenceView._drawManager;
|
|
@@ -318,13 +320,13 @@ class SceneAdvancedToImageViewModel {
|
|
|
318
320
|
}, 1000);
|
|
319
321
|
} catch (error) {
|
|
320
322
|
(0,message/* default */.A)({
|
|
321
|
-
message: "
|
|
323
|
+
message: this._language["toImageErrorTips"],
|
|
322
324
|
type: "error"
|
|
323
325
|
});
|
|
324
326
|
}
|
|
325
327
|
} else {
|
|
326
328
|
(0,message/* default */.A)({
|
|
327
|
-
message: "
|
|
329
|
+
message: this._language["toImageCentrumOpticusTips"],
|
|
328
330
|
type: "warning"
|
|
329
331
|
});
|
|
330
332
|
}
|
package/sceneapp/index.js
CHANGED
|
@@ -9521,9 +9521,9 @@ var _3rd_libs_shp = __webpack_require__(3825);
|
|
|
9521
9521
|
;// CONCATENATED MODULE: external "dompurify"
|
|
9522
9522
|
var external_dompurify_namespaceObject = require("dompurify");
|
|
9523
9523
|
;// CONCATENATED MODULE: ./src/common/_utils/util.js
|
|
9524
|
-
/*
|
|
9525
|
-
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
9526
|
-
* All rights reserved.
|
|
9524
|
+
/*
|
|
9525
|
+
* Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
|
|
9526
|
+
* All rights reserved.
|
|
9527
9527
|
*/// 获取当前时间返回置顶格式
|
|
9528
9528
|
/**
|
|
9529
9529
|
* 安全地设置html元素的innerHTML
|
|
@@ -9596,7 +9596,7 @@ return;}let params=new KqGIS.GeometryAnalysis.ShpParserParams({file:file});let d
|
|
|
9596
9596
|
* 解析json 文件
|
|
9597
9597
|
* @file 上传file文件流
|
|
9598
9598
|
* @callbackFun 回调方法 传入解析后的features数组
|
|
9599
|
-
*/function readJSON(file,callbackFun){try{let readEncoding="utf-8";let reader=new FileReader();reader.readAsText(file,readEncoding);reader.onload=function(){try{callbackFun(JSON.parse(this.result));}catch(err){callbackFun(this.result);}};reader.onerror=function(error){callbackFun(null);};}catch(error){callbackFun(null);}}/**
|
|
9599
|
+
*/function readJSON(file,callbackFun){try{let readEncoding="utf-8";let reader=new FileReader();reader.readAsText(file,readEncoding);reader.onload=function(){try{callbackFun(JSON.parse(this.result));}catch(err){callbackFun(this.result);}};reader.onerror=function(error){callbackFun(null,error);};}catch(error){callbackFun(null,error);}}/**
|
|
9600
9600
|
* 解析txt文件
|
|
9601
9601
|
* @file 上传file文件流
|
|
9602
9602
|
* @callbackFun 回调方法 传入解析后的features数组
|
|
@@ -9617,7 +9617,7 @@ if(rows[nextIndex].indexOf("@")!==-1){// 结束上个地块
|
|
|
9617
9617
|
getCoor(geoType,pointArr,objarr);dataArr.push({type:geoType,coordinates:objarr});}else{let nextRow=rows[nextIndex].split(",");if(nextRow.length>0){if(nextRow[1]!==arr_row[1]){// 一行的第二个值是代表圈号,圈号不同表示不同的多边形
|
|
9618
9618
|
getCoor(geoType,pointArr,objarr);pointArr=[];}}}}else{// 最后的行需要加上多边形
|
|
9619
9619
|
getCoor(geoType,pointArr,objarr);dataArr.push({type:geoType,coordinates:objarr});}}// 地图和服务默认投影都是经纬度的,传入定位的坐标也必须是经纬度的,需要转换
|
|
9620
|
-
if(dataArr.length===0){KqMessage({message:language.exporttxterror+"!",type:"error",duration:2000});callbackFun(null);return;}let features=[];for(let d in dataArr){let f=dataArr[d];let feature={type:"Feature",geometry:f};features.push(feature);}let data={type:"FeatureCollection",features:features};if(checkLatLng(dataArr[0])){if(callbackFun){callbackFun(data);}}else{let projectfeatures=[];for(let d in dataArr){let f=dataArr[d];let feature={type:"Feature",geometry:f};projectfeatures.push(feature);}
|
|
9620
|
+
if(dataArr.length===0){KqMessage({message:language.exporttxterror+"!",type:"error",duration:2000});callbackFun(null);return;}let features=[];for(let d in dataArr){let f=dataArr[d];let feature={type:"Feature",geometry:f};features.push(feature);}let data={type:"FeatureCollection",features:features};if(checkLatLng(dataArr[0])){if(callbackFun){callbackFun(data);}}else{let projectfeatures=[];for(let d in dataArr){let f=dataArr[d];projToAssign(f,"4326",inPrj);let feature={type:"Feature",geometry:f};projectfeatures.push(feature);}let data={type:"FeatureCollection",features:projectfeatures};if(callbackFun){callbackFun(data);}}};reader.readAsText(file,"utf-8");function getCoor(type,pointArr,objarr){if(type==="Point"){objarr.push(pointArr[0][0]);objarr.push(pointArr[0][1]);}else if(type==="LineString"){for(let i=0;i<pointArr.length;i++){objarr.push(pointArr[i]);}}else if(type==="Polygon"){objarr.push(pointArr);}}}/**
|
|
9621
9621
|
* 解析文件
|
|
9622
9622
|
* @file 上传file文件流
|
|
9623
9623
|
* @callbackFun 回调方法 传入解析后的features数组
|
|
@@ -9671,7 +9671,11 @@ return;}coor=transform.inverse(coor);}// 根据geometry对象 获取图形的空
|
|
|
9671
9671
|
function getGeoEPSGByFeture(geometry){let _x=0;if(geometry.type.toUpperCase()==="POLYGON"){_x=geometry.coordinates[0][0][0]||geometry.coordinates[0][0];}else if(geometry.type.toUpperCase()==="MULTIPOLYGON"){_x=geometry.coordinates[0][0][0][0]||geometry.coordinates[0][0][0];}else if(geometry.type.toUpperCase()==="POINT"){_x=geometry.coordinates[0][0]||geometry.coordinates[0];}else if(geometry.type.toUpperCase()==="LINESTRING"){_x=geometry.coordinates[0][0]||geometry.coordinates[0];}else{return"+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0 +ellps=GRS80 +units=m +no_defs ";}if(_x>-999&&_x<999){return"+proj=longlat +ellps=GRS80 +no_defs +type=crs";}let dh=_x.toString().substr(0,2);const _dh=33;// 以33度带为计算点
|
|
9672
9672
|
let lon=99;// 以33度带为计算点
|
|
9673
9673
|
let x=33500000;// 以33度带为计算点
|
|
9674
|
-
lon=lon+(Number(dh)-_dh)*3;x=x+(Number(dh)-_dh)*1000000;let a=`+proj=tmerc +lat_0=0 +lon_0=${lon} +k=1 +x_0=${x} +y_0=0 +ellps=GRS80 +units=m +no_defs `;return a;}}
|
|
9674
|
+
lon=lon+(Number(dh)-_dh)*3;x=x+(Number(dh)-_dh)*1000000;let a=`+proj=tmerc +lat_0=0 +lon_0=${lon} +k=1 +x_0=${x} +y_0=0 +ellps=GRS80 +units=m +no_defs `;return a;}}function projToAssign(geometry,outPrj,inPrj){inPrj="EPSG:"+inPrj;outPrj="EPSG:"+outPrj;// 转换的投影
|
|
9675
|
+
let transform=proj4(outPrj,inPrj);let type=geometry.type;let coor=geometry.coordinates;let d,c,p,newPoint;if(type==="Polygon"){for(d in coor){c=coor[d];for(p in c){newPoint=transform.inverse([Number(c[p][0]),Number(c[p][1])]);c[p]=newPoint;}}}else if(type==="MultiPolygon"){for(let r=0;r<coor.length;r++){let _coor=coor[r];for(d in _coor){c=_coor[d];// if (!$.isArray(c)) {
|
|
9676
|
+
// continue;
|
|
9677
|
+
// }
|
|
9678
|
+
for(p in c){newPoint=transform.inverse([Number(c[p][0]),Number(c[p][1])]);c[p]=newPoint;}}}}else if(type==="LineString"){for(d in coor){newPoint=transform.inverse(coor[d]);coor[d]=newPoint;}}else if(type==="Point"){coor=transform.inverse(coor);}}/**
|
|
9675
9679
|
* 导出 Excel
|
|
9676
9680
|
* @tableData 表格数据 数组对象
|
|
9677
9681
|
* @fields 表格数据中的属性名称
|
|
@@ -9699,8 +9703,8 @@ elink.href=_url;elink.setAttribute("download","shapefile.zip");elink.style.displ
|
|
|
9699
9703
|
* @param {string} outPrj //导出的坐标系
|
|
9700
9704
|
* @param {object} features //要导出的坐标
|
|
9701
9705
|
*/function exportTXT(dataUrl,outPrj,features){if(dataUrl){if(dataUrl.indexOf("?")>=0){let url=dataUrl.split("?")[0];if(url===""||url==="undefined"||url===null){KqMessage({message:"导出Txt失败,没有找到服务地址!",type:"error",duration:2000});return;}}}if(["4490","4326","4610"].includes(outPrj)){let txtBodys=createTxtBody(features);let drawTTitle="[属性描述] \r\n格式版本号=1.0 \r\n数据生产单位=国土资源部 \r\n数据产生日期=[datatime] \r\n坐标系=墨卡托 \r\n投影类型=高斯克吕格 \r\n计量单位=米 \r\n[地块坐标] \r\n";let date=new Date();let time=date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();drawTTitle=drawTTitle.replace("[datatime]",time);// 设置生成日期
|
|
9702
|
-
let evalue=drawTTitle+txtBodys;saveTXT(evalue,"","地块坐标信息.txt");}else{
|
|
9703
|
-
let evalue=drawTTitle+txtBodys;saveTXT(evalue,"","地块坐标信息.txt");}
|
|
9706
|
+
let evalue=drawTTitle+txtBodys;saveTXT(evalue,"","地块坐标信息.txt");}else{let dataFeatures=[];for(let d=0;d<features.length;d++){let f=features[d].geometry;projToAssign(f,outPrj,"4326");let feature={type:"Feature",geometry:f};dataFeatures.push(feature);}let txtBodys=createTxtBody(dataFeatures);let drawTTitle="[属性描述] \r\n格式版本号=1.0 \r\n数据生产单位=国土资源部 \r\n数据产生日期=[datatime] \r\n坐标系=墨卡托 \r\n投影类型=高斯克吕格 \r\n计量单位=米 \r\n[地块坐标] \r\n";let date=new Date();let time=date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();drawTTitle=drawTTitle.replace("[datatime]",time);// 设置生成日期
|
|
9707
|
+
let evalue=drawTTitle+txtBodys;saveTXT(evalue,"","地块坐标信息.txt");}}// 导出txt方法--总方法
|
|
9704
9708
|
function createTxtBody(features){let txtBodys="";for(let k in features){let geometry=features[k]["geometry"];let geoType=geometry["type"];let coordinates=geometry["coordinates"];// let RKZQBM = features[k]['properties']['XZQDM'] === undefined ? '' : features[k]['properties']['XZQDM'];
|
|
9705
9709
|
// let ZQMC = features[k]['properties']['XZQMC'] === undefined ? '' : features[k]['properties']['XZQDM'];
|
|
9706
9710
|
switch(geoType){case"Point":txtBodys+=createBodyBycoord([[coordinates]],"","","点");break;case"LineString":// this.removeCPointFromCoordinates(coordinates);
|