gisviewer-vue3-arcgis 1.0.133 → 1.0.135

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.
Files changed (58) hide show
  1. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  2. package/es/src/gis-map/gis-map.vue.d.ts +17 -0
  3. package/es/src/gis-map/gis-map.vue.mjs +118 -113
  4. package/es/src/gis-map/index.d.ts +17 -0
  5. package/es/src/gis-map/utils/components/sketch-tool.vue.d.ts +18 -0
  6. package/es/src/gis-map/utils/components/sketch-tool.vue.mjs +7 -0
  7. package/es/src/gis-map/utils/components/sketch-tool.vue2.mjs +48 -0
  8. package/es/src/gis-map/utils/components/sketch-tool.vue3.mjs +4 -0
  9. package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +2 -1
  10. package/es/src/gis-map/utils/open-drive-renderer/index.mjs +18 -16
  11. package/es/src/gis-map/utils/signal-control-area-controller/district-controller.d.ts +1 -0
  12. package/es/src/gis-map/utils/signal-control-area-controller/district-controller.mjs +5 -4
  13. package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +2 -1
  14. package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +52 -24
  15. package/es/style.css +1 -1
  16. package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
  17. package/lib/src/gis-map/gis-map.vue.d.ts +17 -0
  18. package/lib/src/gis-map/gis-map.vue.js +1 -1
  19. package/lib/src/gis-map/index.d.ts +17 -0
  20. package/lib/src/gis-map/utils/components/sketch-tool.vue.d.ts +18 -0
  21. package/lib/src/gis-map/utils/components/sketch-tool.vue.js +1 -0
  22. package/lib/src/gis-map/utils/components/sketch-tool.vue2.js +1 -0
  23. package/lib/src/gis-map/utils/components/sketch-tool.vue3.js +1 -0
  24. package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +2 -1
  25. package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
  26. package/lib/src/gis-map/utils/signal-control-area-controller/district-controller.d.ts +1 -0
  27. package/lib/src/gis-map/utils/signal-control-area-controller/district-controller.js +1 -1
  28. package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +2 -1
  29. package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
  30. package/package.json +1 -1
  31. package/es/src/gis-map/utils/open-drive-renderer/draw-bezier.d.ts +0 -17
  32. package/es/src/gis-map/utils/open-drive-renderer/draw-bezier.mjs +0 -49
  33. package/es/src/gis-map/utils/open-drive-renderer/junction.d.ts +0 -51
  34. package/es/src/gis-map/utils/open-drive-renderer/junction.mjs +0 -151
  35. package/es/src/gis-map/utils/open-drive-renderer/lane-section.d.ts +0 -48
  36. package/es/src/gis-map/utils/open-drive-renderer/lane-section.mjs +0 -82
  37. package/es/src/gis-map/utils/open-drive-renderer/lane-utils.d.ts +0 -29
  38. package/es/src/gis-map/utils/open-drive-renderer/lane-utils.mjs +0 -265
  39. package/es/src/gis-map/utils/open-drive-renderer/lane.d.ts +0 -77
  40. package/es/src/gis-map/utils/open-drive-renderer/lane.mjs +0 -110
  41. package/es/src/gis-map/utils/open-drive-renderer/road.d.ts +0 -62
  42. package/es/src/gis-map/utils/open-drive-renderer/road.mjs +0 -121
  43. package/es/src/gis-map/utils/open-drive-renderer/wasm-loader.d.ts +0 -108
  44. package/es/src/gis-map/utils/open-drive-renderer/wasm-loader.mjs +0 -425
  45. package/lib/src/gis-map/utils/open-drive-renderer/draw-bezier.d.ts +0 -17
  46. package/lib/src/gis-map/utils/open-drive-renderer/draw-bezier.js +0 -1
  47. package/lib/src/gis-map/utils/open-drive-renderer/junction.d.ts +0 -51
  48. package/lib/src/gis-map/utils/open-drive-renderer/junction.js +0 -1
  49. package/lib/src/gis-map/utils/open-drive-renderer/lane-section.d.ts +0 -48
  50. package/lib/src/gis-map/utils/open-drive-renderer/lane-section.js +0 -1
  51. package/lib/src/gis-map/utils/open-drive-renderer/lane-utils.d.ts +0 -29
  52. package/lib/src/gis-map/utils/open-drive-renderer/lane-utils.js +0 -1
  53. package/lib/src/gis-map/utils/open-drive-renderer/lane.d.ts +0 -77
  54. package/lib/src/gis-map/utils/open-drive-renderer/lane.js +0 -1
  55. package/lib/src/gis-map/utils/open-drive-renderer/road.d.ts +0 -62
  56. package/lib/src/gis-map/utils/open-drive-renderer/road.js +0 -1
  57. package/lib/src/gis-map/utils/open-drive-renderer/wasm-loader.d.ts +0 -108
  58. package/lib/src/gis-map/utils/open-drive-renderer/wasm-loader.js +0 -1
@@ -1,110 +0,0 @@
1
- import n from "../common-utils.mjs";
2
- import s from "./lane-utils.mjs";
3
- class c {
4
- constructor(e, t, i) {
5
- this.isDirEqualReady = !1, this.road = t, this.laneSection = i, this.id = e.id, this.type = e.type, this.predecessor = e.predecessor, this.successor = e.successor;
6
- const o = n.getStdVecEntries(
7
- e.inner_border,
8
- !0
9
- );
10
- this.innerBorder = n.transformLineProjection(o);
11
- const r = n.getStdVecEntries(
12
- e.outer_border,
13
- !0
14
- );
15
- this.outerBorder = n.transformLineProjection(r), this.centerLine = this.getCenterLineFromBorder(
16
- this.innerBorder,
17
- this.outerBorder
18
- );
19
- const h = this.innerBorder.concat([...this.outerBorder].reverse());
20
- h.push(h[0]), this.ring = h;
21
- }
22
- get isDirEqual() {
23
- return this.isDirEqualReady || (this._isDirEqual = s.isLaneDirEqualDriveDir(this), this.isDirEqualReady = !0), this._isDirEqual;
24
- }
25
- /**
26
- * 车道代码:道路id_路段id_车道id
27
- */
28
- get laneCode() {
29
- return `${this.road.id}_${this.laneSection.s0}_${this.id}`;
30
- }
31
- /**
32
- * 车道边线采样后的数据
33
- */
34
- get sampledLane() {
35
- return {
36
- id: this.id,
37
- type: this.type,
38
- innerPath: this.innerBorder,
39
- outerPath: this.outerBorder
40
- };
41
- }
42
- /**
43
- * 获取路段内同方向最外侧车道
44
- */
45
- get outerMostLaneInTheSameDir() {
46
- const e = this.laneSection.allLaneIds, t = this.id > 0 ? e[e.length - 1] : e[0];
47
- return this.laneSection.getLane(t);
48
- }
49
- /**
50
- * 车道航向角
51
- * @returns
52
- */
53
- get drivingAngle() {
54
- if (!this.angle) {
55
- const e = s.getDriveAngle(this);
56
- this.angle = e;
57
- }
58
- return this.angle;
59
- }
60
- /**
61
- * 根据左右边线生成车道中心线
62
- * @param left
63
- * @param right
64
- */
65
- getCenterLineFromBorder(e, t) {
66
- const i = [], o = Math.min(e.length, t.length);
67
- for (let r = 0; r < o; r++)
68
- i.push([
69
- (e[r][0] + t[r][0]) / 2,
70
- (e[r][1] + t[r][1]) / 2
71
- ]);
72
- return i;
73
- }
74
- /**
75
- * 获取车道按行车方向的起点、终点,可选择内侧、中间、外侧
76
- * @param type
77
- * @returns
78
- */
79
- getLaneEndPoints(e = "middle") {
80
- return s.getLaneEndPoints(this, e);
81
- }
82
- /**
83
- * 获取车道的前驱车道和后继车道
84
- * @returns
85
- */
86
- getLink() {
87
- return s.getPrevAndNext(this);
88
- }
89
- // /**
90
- // * 获取车道对应的高精地图要素
91
- // * @returns
92
- // */
93
- // public getShpPolygon() {
94
- // return LaneUtils.getShpLanePolygonOfXodrLane(this);
95
- // }
96
- // public getArrowPositions() {
97
- // return LaneUtils.getArrowPositionsInLane(this);
98
- // }
99
- /**
100
- * 获取车道停止线
101
- * @returns
102
- */
103
- getStopLine() {
104
- const e = this.getLaneEndPoints("inner"), t = this.getLaneEndPoints("outer");
105
- return [e[1], t[1]];
106
- }
107
- }
108
- export {
109
- c as default
110
- };
@@ -1,62 +0,0 @@
1
- import { IRoadLink, ISampledRoad } from '../../../types';
2
- import LaneSection from './lane-section';
3
- export default class Road {
4
- id: string;
5
- name: string;
6
- length: number;
7
- junction: string;
8
- successor: IRoadLink;
9
- predecessor: IRoadLink;
10
- /** 道路上下左右的边框 */
11
- borders: {
12
- left: number[][];
13
- right: number[][];
14
- top: number[][];
15
- bottom: number[][];
16
- };
17
- /** 上下左右边框围成的多边形 */
18
- polygon: number[][];
19
- refLine: number[][];
20
- private sToLaneSection;
21
- constructor(odrRoad: any);
22
- /**
23
- * 获取一个路段
24
- * @param s0
25
- * @returns
26
- */
27
- getLaneSection(s0: number): LaneSection | undefined;
28
- /**
29
- * 获取第一个路段
30
- * @returns
31
- */
32
- getFirstLaneSection(): LaneSection;
33
- /**
34
- * 获取最后一个路段
35
- * @returns
36
- */
37
- getLastLaneSection(): LaneSection;
38
- getLaneSectionIndex(s: number): number;
39
- getLaneSectionLength(s: number): number;
40
- /**
41
- * 是否是最后一个路段的里程值
42
- * @param s
43
- * @returns
44
- */
45
- isLastLaneSection(s: number): boolean;
46
- /**
47
- * 获取下一个路段
48
- * @param s
49
- */
50
- getNextLaneSection(s: number): LaneSection | undefined;
51
- /**
52
- * 获取上一个路段
53
- * @param s
54
- * @returns
55
- */
56
- getPrevLaneSection(s: number): LaneSection | undefined;
57
- /** 获取所有路段 */
58
- get allLaneSections(): LaneSection[];
59
- get laneSectionNumber(): number;
60
- get sampledRoad(): ISampledRoad;
61
- private getBorderLine;
62
- }
@@ -1,121 +0,0 @@
1
- import h from "../common-utils.mjs";
2
- import a from "./lane-section.mjs";
3
- class S {
4
- constructor(e) {
5
- this.id = e.id, this.name = e.name, this.length = e.length, this.junction = e.junction, this.sToLaneSection = /* @__PURE__ */ new Map();
6
- const t = h.getStdVecEntries(e.ref_line, !0);
7
- this.refLine = h.transformLineProjection(t);
8
- for (const i of [!0, !1]) {
9
- const o = i ? e.predecessor : e.successor, r = {
10
- elementId: o.id,
11
- elementType: o.type,
12
- contactPoint: o.contact_point
13
- };
14
- i ? this.predecessor = r : this.successor = r;
15
- }
16
- h.getStdVecEntries(
17
- e.odr_lanesections,
18
- !0
19
- ).forEach((i) => {
20
- const o = new a(i, this);
21
- this.sToLaneSection.set(o.s0, o);
22
- }), this.borders = this.getBorderLine();
23
- const n = [];
24
- n.push(...this.borders.right), n.push(...this.borders.top), n.push(...[...this.borders.left].reverse()), n.push(...[...this.borders.bottom].reverse()), n.push(n[0]), this.polygon = n;
25
- }
26
- /**
27
- * 获取一个路段
28
- * @param s0
29
- * @returns
30
- */
31
- getLaneSection(e) {
32
- return this.sToLaneSection.get(e);
33
- }
34
- /**
35
- * 获取第一个路段
36
- * @returns
37
- */
38
- getFirstLaneSection() {
39
- const e = [...this.sToLaneSection.keys()];
40
- return e.sort((t, s) => t - s), this.sToLaneSection.get(e[0]);
41
- }
42
- /**
43
- * 获取最后一个路段
44
- * @returns
45
- */
46
- getLastLaneSection() {
47
- const e = [...this.sToLaneSection.keys()];
48
- return e.sort((t, s) => t - s), this.sToLaneSection.get(e[e.length - 1]);
49
- }
50
- getLaneSectionIndex(e) {
51
- return [...this.sToLaneSection.keys()].indexOf(e);
52
- }
53
- getLaneSectionLength(e) {
54
- const t = [...this.sToLaneSection.keys()], s = t.indexOf(e);
55
- let n = 0;
56
- return s === 0 ? t.length === 1 ? n = this.length : n = t[1] : s === t.length - 1 ? n = this.length - t[t.length - 1] : n = t[s + 1] - e, n;
57
- }
58
- /**
59
- * 是否是最后一个路段的里程值
60
- * @param s
61
- * @returns
62
- */
63
- isLastLaneSection(e) {
64
- const t = [...this.sToLaneSection.keys()];
65
- return t.sort((s, n) => s - n), e === t[t.length - 1];
66
- }
67
- /**
68
- * 获取下一个路段
69
- * @param s
70
- */
71
- getNextLaneSection(e) {
72
- const t = [...this.sToLaneSection.keys()], s = t.indexOf(e);
73
- if (s >= 0 && s < t.length - 1)
74
- return this.sToLaneSection.get(t[s + 1]);
75
- }
76
- /**
77
- * 获取上一个路段
78
- * @param s
79
- * @returns
80
- */
81
- getPrevLaneSection(e) {
82
- const t = [...this.sToLaneSection.keys()], s = t.indexOf(e);
83
- if (s > 0)
84
- return this.sToLaneSection.get(t[s - 1]);
85
- }
86
- /** 获取所有路段 */
87
- get allLaneSections() {
88
- return [...this.sToLaneSection.values()];
89
- }
90
- get laneSectionNumber() {
91
- return this.sToLaneSection.size;
92
- }
93
- get sampledRoad() {
94
- return {
95
- id: this.id,
96
- name: this.name,
97
- junction: this.junction,
98
- refLine: this.refLine,
99
- laneSections: this.allLaneSections.map(
100
- (e) => e.sampledLaneSection
101
- )
102
- };
103
- }
104
- getBorderLine() {
105
- const e = [], t = [];
106
- let s = [], n = [];
107
- const i = [...this.sToLaneSection.keys()];
108
- return i.forEach((o, r) => {
109
- const c = this.getLaneSection(o);
110
- r === 0 ? n = c.borders.bottom : r === i.length - 1 && (s = c.borders.top), e.push(...c.borders.left), t.push(...c.borders.right);
111
- }), {
112
- left: e,
113
- right: t,
114
- top: s,
115
- bottom: n
116
- };
117
- }
118
- }
119
- export {
120
- S as default
121
- };
@@ -1,108 +0,0 @@
1
- import { ILaneInfo, IResult, ISampledRoad } from '../../../types';
2
- import Junction from './junction';
3
- import Lane from './lane';
4
- import Road from './road';
5
- export default class WasmLoader {
6
- private static instance;
7
- static getInstance(): WasmLoader;
8
- roadList: Map<string, Road>;
9
- junctionList: Map<string, Junction>;
10
- private junctionTableData;
11
- private isWasmLoaded;
12
- private ModuleOpenDrive;
13
- private ModuleOpenDriveMap;
14
- private appDataStore;
15
- private FsFile;
16
- /**
17
- * 载入指定xodr文件并解析
18
- * @param filePath
19
- */
20
- load(file: string): Promise<IResult>;
21
- clear(): void;
22
- /**
23
- * 读取xodr中wasm接口不提供的数据
24
- * @param fileText
25
- */
26
- private readXodrString;
27
- /**
28
- * 解析路网
29
- */
30
- private getRoadNetwork;
31
- /**
32
- * 获取所有道路的采样结果
33
- */
34
- get allSampledRoads(): ISampledRoad[];
35
- /**
36
- * 获取路网结构
37
- */
38
- get roadNetwork(): {
39
- roadName: string;
40
- roadId: string;
41
- roadLength: number;
42
- sections: {
43
- sectionId: number;
44
- laneIds: number[];
45
- }[];
46
- }[];
47
- /**
48
- * 从车道信息获取车道对象
49
- * @param laneInfo
50
- */
51
- getLane(laneInfo: ILaneInfo): Lane | undefined;
52
- /**
53
- * 获取两个车道之间的车道功能
54
- * 左转、直行、右转、调头
55
- * @param incoming
56
- * @param outgoing
57
- */
58
- getFunctionFromIncomingToOutgoing(incoming: ILaneInfo, outgoing: ILaneInfo): IResult;
59
- /**
60
- * 获取所有路口的轮廓
61
- * @returns
62
- */
63
- getJunctionOutline(junctionId: string): IResult;
64
- /**
65
- * 获取车道的前驱车道和后继车道
66
- * @param laneInfo
67
- * @returns
68
- */
69
- getLaneLink(laneInfo: ILaneInfo): IResult;
70
- getRoadLink(roadId: string): IResult;
71
- getConnectionLink(junctionId: string): IResult;
72
- getLaneAngle(laneInfo: ILaneInfo): IResult;
73
- getTurnArrow(params: {
74
- incoming: ILaneInfo;
75
- outgoing: ILaneInfo;
76
- }): IResult;
77
- /**
78
- * 道路路段车道的轮廓
79
- * @param roadId
80
- * @param sectionId
81
- * @param laneId
82
- * @returns
83
- */
84
- getPolygon(roadId: string, sectionId?: number, laneId?: number): IResult;
85
- /**
86
- * 车道长度
87
- * @param laneInfo
88
- * @returns
89
- */
90
- getLaneLength(laneInfo: ILaneInfo): IResult;
91
- getRoadStopLine(junctionId: string): IResult;
92
- getLaneStopLine(laneInfo: ILaneInfo): IResult;
93
- getLaneCenterLine(laneInfo: ILaneInfo): IResult;
94
- getSumoEdgeInfo(sectionCode: string): {
95
- obj_id: string;
96
- obj_type: number;
97
- obj_desc: string;
98
- obj_info: {
99
- obj_id: string;
100
- length: number;
101
- from: string;
102
- to: string;
103
- numLanes: number;
104
- type: string;
105
- laneList: any[];
106
- };
107
- } | undefined;
108
- }