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.
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/src/gis-map/gis-map.vue.d.ts +17 -0
- package/es/src/gis-map/gis-map.vue.mjs +118 -113
- package/es/src/gis-map/index.d.ts +17 -0
- package/es/src/gis-map/utils/components/sketch-tool.vue.d.ts +18 -0
- package/es/src/gis-map/utils/components/sketch-tool.vue.mjs +7 -0
- package/es/src/gis-map/utils/components/sketch-tool.vue2.mjs +48 -0
- package/es/src/gis-map/utils/components/sketch-tool.vue3.mjs +4 -0
- package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +2 -1
- package/es/src/gis-map/utils/open-drive-renderer/index.mjs +18 -16
- package/es/src/gis-map/utils/signal-control-area-controller/district-controller.d.ts +1 -0
- package/es/src/gis-map/utils/signal-control-area-controller/district-controller.mjs +5 -4
- package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +2 -1
- package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +52 -24
- package/es/style.css +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
- package/lib/src/gis-map/gis-map.vue.d.ts +17 -0
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +17 -0
- package/lib/src/gis-map/utils/components/sketch-tool.vue.d.ts +18 -0
- package/lib/src/gis-map/utils/components/sketch-tool.vue.js +1 -0
- package/lib/src/gis-map/utils/components/sketch-tool.vue2.js +1 -0
- package/lib/src/gis-map/utils/components/sketch-tool.vue3.js +1 -0
- package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +2 -1
- package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/district-controller.d.ts +1 -0
- package/lib/src/gis-map/utils/signal-control-area-controller/district-controller.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +2 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
- package/package.json +1 -1
- package/es/src/gis-map/utils/open-drive-renderer/draw-bezier.d.ts +0 -17
- package/es/src/gis-map/utils/open-drive-renderer/draw-bezier.mjs +0 -49
- package/es/src/gis-map/utils/open-drive-renderer/junction.d.ts +0 -51
- package/es/src/gis-map/utils/open-drive-renderer/junction.mjs +0 -151
- package/es/src/gis-map/utils/open-drive-renderer/lane-section.d.ts +0 -48
- package/es/src/gis-map/utils/open-drive-renderer/lane-section.mjs +0 -82
- package/es/src/gis-map/utils/open-drive-renderer/lane-utils.d.ts +0 -29
- package/es/src/gis-map/utils/open-drive-renderer/lane-utils.mjs +0 -265
- package/es/src/gis-map/utils/open-drive-renderer/lane.d.ts +0 -77
- package/es/src/gis-map/utils/open-drive-renderer/lane.mjs +0 -110
- package/es/src/gis-map/utils/open-drive-renderer/road.d.ts +0 -62
- package/es/src/gis-map/utils/open-drive-renderer/road.mjs +0 -121
- package/es/src/gis-map/utils/open-drive-renderer/wasm-loader.d.ts +0 -108
- package/es/src/gis-map/utils/open-drive-renderer/wasm-loader.mjs +0 -425
- package/lib/src/gis-map/utils/open-drive-renderer/draw-bezier.d.ts +0 -17
- package/lib/src/gis-map/utils/open-drive-renderer/draw-bezier.js +0 -1
- package/lib/src/gis-map/utils/open-drive-renderer/junction.d.ts +0 -51
- package/lib/src/gis-map/utils/open-drive-renderer/junction.js +0 -1
- package/lib/src/gis-map/utils/open-drive-renderer/lane-section.d.ts +0 -48
- package/lib/src/gis-map/utils/open-drive-renderer/lane-section.js +0 -1
- package/lib/src/gis-map/utils/open-drive-renderer/lane-utils.d.ts +0 -29
- package/lib/src/gis-map/utils/open-drive-renderer/lane-utils.js +0 -1
- package/lib/src/gis-map/utils/open-drive-renderer/lane.d.ts +0 -77
- package/lib/src/gis-map/utils/open-drive-renderer/lane.js +0 -1
- package/lib/src/gis-map/utils/open-drive-renderer/road.d.ts +0 -62
- package/lib/src/gis-map/utils/open-drive-renderer/road.js +0 -1
- package/lib/src/gis-map/utils/open-drive-renderer/wasm-loader.d.ts +0 -108
- package/lib/src/gis-map/utils/open-drive-renderer/wasm-loader.js +0 -1
|
@@ -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 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../common-utils.js"),h=require("./lane-section.js");class l{constructor(e){this.id=e.id,this.name=e.name,this.length=e.length,this.junction=e.junction,this.sToLaneSection=new Map;const t=a.default.getStdVecEntries(e.ref_line,!0);this.refLine=a.default.transformLineProjection(t);for(const i of[!0,!1]){const o=i?e.predecessor:e.successor,r={elementId:o.id,elementType:o.type,contactPoint:o.contact_point};i?this.predecessor=r:this.successor=r}a.default.getStdVecEntries(e.odr_lanesections,!0).forEach(i=>{const o=new h.default(i,this);this.sToLaneSection.set(o.s0,o)}),this.borders=this.getBorderLine();const n=[];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}getLaneSection(e){return this.sToLaneSection.get(e)}getFirstLaneSection(){const e=[...this.sToLaneSection.keys()];return e.sort((t,s)=>t-s),this.sToLaneSection.get(e[0])}getLastLaneSection(){const e=[...this.sToLaneSection.keys()];return e.sort((t,s)=>t-s),this.sToLaneSection.get(e[e.length-1])}getLaneSectionIndex(e){return[...this.sToLaneSection.keys()].indexOf(e)}getLaneSectionLength(e){const t=[...this.sToLaneSection.keys()],s=t.indexOf(e);let n=0;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}isLastLaneSection(e){const t=[...this.sToLaneSection.keys()];return t.sort((s,n)=>s-n),e===t[t.length-1]}getNextLaneSection(e){const t=[...this.sToLaneSection.keys()],s=t.indexOf(e);if(s>=0&&s<t.length-1)return this.sToLaneSection.get(t[s+1])}getPrevLaneSection(e){const t=[...this.sToLaneSection.keys()],s=t.indexOf(e);if(s>0)return this.sToLaneSection.get(t[s-1])}get allLaneSections(){return[...this.sToLaneSection.values()]}get laneSectionNumber(){return this.sToLaneSection.size}get sampledRoad(){return{id:this.id,name:this.name,junction:this.junction,refLine:this.refLine,laneSections:this.allLaneSections.map(e=>e.sampledLaneSection)}}getBorderLine(){const e=[],t=[];let s=[],n=[];const i=[...this.sToLaneSection.keys()];return i.forEach((o,r)=>{const c=this.getLaneSection(o);r===0?n=c.borders.bottom:r===i.length-1&&(s=c.borders.top),e.push(...c.borders.left),t.push(...c.borders.right)}),{left:e,right:t,top:s,bottom:n}}}exports.default=l;
|
|
@@ -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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("fast-xml-parser"),L=require("../../stores/index.js"),g=require("../common-utils.js"),p=require("./junction.js"),S=require("./road.js");class c{constructor(){this.roadList=new Map,this.junctionList=new Map,this.junctionTableData=new Map,this.isWasmLoaded=!1,this.appDataStore=L.default.useAppDataStore,this.FsFile="data.xodr"}static getInstance(){return c.instance||(c.instance=new c),c.instance}async load(o){if(!this.isWasmLoaded){const r=window.libOpenDrive;this.ModuleOpenDrive=await r(),this.isWasmLoaded=!0}console.time("加载用时");const t=await(await fetch(o)).text();this.readXodrString(t);const n=new TextEncoder().encode(t);try{this.ModuleOpenDrive.FS_unlink(`./${this.FsFile}`)}catch{}this.ModuleOpenDrive.FS_createDataFile(".",this.FsFile,n,!0,!0);const i={with_lateralProfile:!0,with_laneHeight:!0,with_road_objects:!1,center_map:!1,abs_z_for_for_local_road_obj_outline:!0};return this.ModuleOpenDriveMap=new this.ModuleOpenDrive.OpenDriveMap(`./${this.FsFile}`,i),console.timeEnd("加载用时"),this.getRoadNetwork()}clear(){this.roadList.clear(),this.junctionList.clear();try{this.ModuleOpenDrive.FS_unlink(`./${this.FsFile}`)}catch{}}readXodrString(o){const t=new m.XMLParser({ignoreAttributes:!1,allowBooleanAttributes:!0}).parse(o),s=t.OpenDRIVE.header.geoReference,n=t.OpenDRIVE.header.offset;if(n){const r=Number(n["@_x"])||0,a=Number(n["@_y"])||0;g.default.setGeoData(s,r,a)}const i=t.OpenDRIVE.junction;for(const r of i){const a=JSON.parse(r.userData.tableData);this.junctionTableData.set(a.id,a)}}getRoadNetwork(){this.roadList.clear(),this.junctionList.clear();let o;try{console.time("采样用时"),o=this.ModuleOpenDrive.get_odr_road_network(this.ModuleOpenDriveMap,.5)}catch(s){return{status:-1,message:`解析路网失败, ${s}`}}finally{console.timeEnd("采样用时")}console.time("投影转换用时");try{g.default.getStdVecEntries(o.roads,!0).forEach(n=>{const i=new S.default(n);this.roadList.set(i.id,i)})}catch(s){return{status:-1,message:`解析道路失败, ${s}`}}try{g.default.getStdVecEntries(o.junctions,!0).forEach(n=>{const i=new p.default(n);i.tableData=this.junctionTableData.get(i.id),this.junctionList.set(n.id,i)})}catch(s){return{status:-1,message:`解析路口失败, ${s}`}}console.timeEnd("投影转换用时");const e=[];this.roadList.forEach(s=>{const n=s.allLaneSections.map(i=>{const r=i.allLanes.map(a=>({id:a.id,type:a.type,innerPath:a.innerBorder,outerPath:a.outerBorder,centerLine:a.centerLine}));return{id:i.s0,lanePaths:r}});e.push({id:s.id,name:s.name,laneSections:n,junction:s.junction,refLine:s.refLine})});const t=[];return this.junctionList.forEach(s=>{s.tableData&&t.push(s.tableData)}),{status:0,message:"ok",result:{roads:e,junctions:t}}}get allSampledRoads(){return[...this.roadList.values()].map(o=>o.sampledRoad)}get roadNetwork(){return[...this.roadList.values()].map(e=>{const t=e.allLaneSections.map(s=>{const n=s.allLaneIds.filter(i=>i!==0);return{sectionId:s.s0,laneIds:n}});return{roadName:e.name,roadId:e.id,roadLength:e.length,sections:t}})}getLane(o){const e=this.roadList.get(o.roadId),t=e==null?void 0:e.getLaneSection(o.sectionId);return t==null?void 0:t.getLane(o.laneId)}getFunctionFromIncomingToOutgoing(o,e){const t=this.getLane(o),s=this.getLane(e);if(!t||!s||!t.drivingAngle||!s.drivingAngle)return{status:-1,message:"车道信息错误"};let n=s.drivingAngle-t.drivingAngle;n>180?n-=360:n<-180&&(n+=360);let i="";return-45<n&&n<45?i="s":45<=n&&n<=135?i="r":-135<=n&&n<=-45?i="l":i="t",{status:0,result:i,message:"ok"}}getJunctionOutline(o){const e=[];if(o!==""){const t=this.junctionList.get(o);if(t){const s=t.getJunctionOutline();e.push({junctionId:o,name:t.name,outline:s})}}else for(const t of this.junctionList){const s=t[0],n=t[1],i=n.getJunctionOutline();i.length<=4?console.log(i,s):e.push({junctionId:s,name:n.name,outline:i})}return{status:0,result:e,message:"ok"}}getLaneLink(o){const e=this.getLane(o);return e?{status:0,result:e.getLink(),message:"ok"}:{status:-1,message:"车道信息错误"}}getRoadLink(o){const e=[];if(o!==""){const t=this.roadList.get(o);t&&e.push({roadId:o,successor:t.successor,predecessor:t.predecessor})}else[...this.roadList.values()].forEach(s=>{e.push({roadId:o,successor:s.successor,predecessor:s.predecessor})});return{status:0,result:e,message:"ok"}}getConnectionLink(o){const e=[];for(const t of this.junctionList){const s=t[0],n=t[1];if((o===""||s===o)&&(e.push({id:s,name:n.name,links:n.laneLinks}),o!==""))break}return{status:0,result:e,message:"ok"}}getLaneAngle(o){const e=this.getLane(o);if(e){const t=e.drivingAngle;if(t)return{status:0,result:t,message:"ok"}}return{status:-1,message:"车道信息错误"}}getTurnArrow(o){const e=this.getLane(o.incoming);if(!e)return{status:-1,message:"进口道信息错误"};const t=e.drivingAngle;if(!t)return{status:-1,message:"进口道信息错误"};const s=this.getLane(o.outgoing);if(!s)return{status:-1,message:"出口道信息错误"};const n=s.drivingAngle;if(!n)return{status:-1,message:"出口道信息错误"};let i=n-t;i>180?i-=360:i<-180&&(i+=360);let r="";return-45<i&&i<45?r="s":45<=i&&i<=135?r="r":-135<=i&&i<=-45?r="l":r="t",{status:0,message:"ok",result:{incomingAngle:t,outgoingAngle:n,direction:r}}}getPolygon(o,e,t){const s=this.roadList.get(o);if(!s)return{status:-1,message:"道路id错误"};if(e!==void 0&&t!==void 0&&!isNaN(e)&&!isNaN(t)){const n=this.getLane({roadId:o,sectionId:e,laneId:t});return n?{status:0,message:"ok",result:n.ring}:{status:-1,message:"车道信息错误"}}else if(e!==void 0&&!isNaN(e)){const n=s.getLaneSection(e);return n?{status:0,message:"ok",result:n.polygon}:{status:-1,message:"路段信息错误"}}else return{status:0,message:"ok",result:s.polygon}}getLaneLength(o){const e=this.getLane(o);if(e){let t=0;return e.road.isLastLaneSection(e.laneSection.s0)?t=e.road.length-e.laneSection.s0:t=e.road.getNextLaneSection(e.laneSection.s0).s0-e.laneSection.s0,{status:0,message:"ok",result:Number(t.toFixed(2))}}else return{status:-1,message:"车道信息错误"}}getRoadStopLine(o){const e=[];for(const t of this.junctionList){const s=t[0],n=t[1];if(s===o){const i=n.getRoadStopLine();e.push({junctionId:s,stopLines:i});break}else if(o===""){const i=n.getRoadStopLine();e.push({junctionId:s,stopLines:i})}}return{status:0,message:"ok",result:e}}getLaneStopLine(o){const e=this.getLane(o);return e?{status:0,message:"ok",result:e.getStopLine()}:{status:-1,message:"车道信息错误"}}getLaneCenterLine(o){const e=this.getLane(o);return e?{status:0,message:"ok",result:e.getLaneEndPoints("middle")}:{status:-1,message:"车道信息错误"}}getSumoEdgeInfo(o){const e=o.split("+"),t=e[0],s=Number(e[1]),n=this.roadList.get(t);if(!n)return;let i="";if(n.laneSectionNumber===1)i=`-${t}`;else{const u=n.getLaneSectionIndex(s);if(u===-1)return;i=`-${t}#${u}`}const r=n.predecessor.elementId,a=n.successor.elementId,l=n.getLaneSection(s);if(!l)return;const d=[],f=l.laneNumber-1;for(const u of l.allLanes){if(u.id===0)continue;const h=f-Math.abs(u.id);d.push({obj_id:`${i}_${h}`})}return{obj_id:i,obj_type:1,obj_desc:"edge",obj_info:{obj_id:i,length:n.getLaneSectionLength(s),from:r,to:a,numLanes:f,type:"driving",laneList:d}}}}exports.default=c;
|