lasvsim-openapi 0.1.8__py3-none-any.whl
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.
- lasvsim_openapi/__init__.py +2 -0
- lasvsim_openapi/client.py +32 -0
- lasvsim_openapi/http_client.py +58 -0
- lasvsim_openapi/main.py +418 -0
- lasvsim_openapi/process_task.py +43 -0
- lasvsim_openapi/process_task_model.py +39 -0
- lasvsim_openapi/qxmap_model.py +728 -0
- lasvsim_openapi/request_model.py +25 -0
- lasvsim_openapi/resources.py +20 -0
- lasvsim_openapi/response_model.py +971 -0
- lasvsim_openapi/sim_record.py +63 -0
- lasvsim_openapi/sim_record_model.py +282 -0
- lasvsim_openapi/simulator.py +439 -0
- lasvsim_openapi/train_task.py +26 -0
- lasvsim_openapi-0.1.8.dist-info/METADATA +154 -0
- lasvsim_openapi-0.1.8.dist-info/RECORD +34 -0
- lasvsim_openapi-0.1.8.dist-info/WHEEL +5 -0
- lasvsim_openapi-0.1.8.dist-info/top_level.txt +1 -0
- qianxing_openapi/__init__.py +2 -0
- qianxing_openapi/client.py +31 -0
- qianxing_openapi/http_client.py +58 -0
- qianxing_openapi/main.py +418 -0
- qianxing_openapi/process_task.py +43 -0
- qianxing_openapi/process_task_model.py +39 -0
- qianxing_openapi/qxmap_model.py +728 -0
- qianxing_openapi/request_model.py +25 -0
- qianxing_openapi/request_struct.py +25 -0
- qianxing_openapi/resources.py +20 -0
- qianxing_openapi/response_model.py +971 -0
- qianxing_openapi/response_struct.py +898 -0
- qianxing_openapi/sim_record.py +63 -0
- qianxing_openapi/sim_record_model.py +282 -0
- qianxing_openapi/simulator.py +430 -0
- qianxing_openapi/train_task.py +26 -0
|
@@ -0,0 +1,728 @@
|
|
|
1
|
+
from lasvsim_openapi import response_model
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@dataclass
|
|
6
|
+
class Header:
|
|
7
|
+
north: float = None
|
|
8
|
+
south: float = None
|
|
9
|
+
east: float = None
|
|
10
|
+
west: float = None
|
|
11
|
+
center_point: response_model.Point = None
|
|
12
|
+
version: str = None
|
|
13
|
+
zone: float = None
|
|
14
|
+
use_bias: bool = None
|
|
15
|
+
source: int = None
|
|
16
|
+
|
|
17
|
+
def __init__(self, data: dict) -> None:
|
|
18
|
+
if data == None:
|
|
19
|
+
return
|
|
20
|
+
center_point = data.pop("center_point", None)
|
|
21
|
+
|
|
22
|
+
self.__dict__ = data
|
|
23
|
+
self.center_point = (
|
|
24
|
+
None if center_point == None else response_model.Point(
|
|
25
|
+
center_point)
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass
|
|
30
|
+
class Polygon:
|
|
31
|
+
points: list[response_model.Point] = None
|
|
32
|
+
|
|
33
|
+
def __init__(self, data: dict) -> None:
|
|
34
|
+
if data == None:
|
|
35
|
+
return
|
|
36
|
+
points = data.pop("points", None)
|
|
37
|
+
|
|
38
|
+
self.points = (
|
|
39
|
+
None
|
|
40
|
+
if points == None
|
|
41
|
+
else [response_model.Point(point) for point in points]
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@dataclass
|
|
46
|
+
class LineString:
|
|
47
|
+
points: list[response_model.Point] = None
|
|
48
|
+
|
|
49
|
+
def __init__(self, data: dict) -> None:
|
|
50
|
+
if data == None:
|
|
51
|
+
return
|
|
52
|
+
points = data.pop("points", None)
|
|
53
|
+
|
|
54
|
+
self.points = (
|
|
55
|
+
None
|
|
56
|
+
if points == None
|
|
57
|
+
else [response_model.Point(point) for point in points]
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
@dataclass
|
|
62
|
+
class Movement:
|
|
63
|
+
id: str = None
|
|
64
|
+
upstream_link_id: str = None
|
|
65
|
+
downstream_link_id: str = None
|
|
66
|
+
junction_id: str = None
|
|
67
|
+
flow_direction: int = None
|
|
68
|
+
|
|
69
|
+
def __init__(self, data: dict) -> None:
|
|
70
|
+
if data == None:
|
|
71
|
+
return
|
|
72
|
+
|
|
73
|
+
self.__dict__ = data
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
@dataclass
|
|
77
|
+
class Connection:
|
|
78
|
+
id: int = None
|
|
79
|
+
junction_id: str = None
|
|
80
|
+
movement_id: str = None
|
|
81
|
+
upstream_lane_id: str = None
|
|
82
|
+
downstream_lane_id: str = None
|
|
83
|
+
flow_direction: int = None
|
|
84
|
+
upstream_link_id: str = None
|
|
85
|
+
downstream_link_id: str = None
|
|
86
|
+
path: LineString = None
|
|
87
|
+
|
|
88
|
+
def __init__(self, data: dict) -> None:
|
|
89
|
+
if data == None:
|
|
90
|
+
return
|
|
91
|
+
path = data.pop("path", None)
|
|
92
|
+
|
|
93
|
+
self.__dict__ = data
|
|
94
|
+
self.path = None if path == None else LineString(path)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
@dataclass
|
|
98
|
+
class Crosswalk:
|
|
99
|
+
id: str = None
|
|
100
|
+
heading: float = None
|
|
101
|
+
shape: Polygon = None
|
|
102
|
+
|
|
103
|
+
def __init__(self, data: dict) -> None:
|
|
104
|
+
if data == None:
|
|
105
|
+
return
|
|
106
|
+
shape = data.pop("shape", None)
|
|
107
|
+
|
|
108
|
+
self.__dict__ = data
|
|
109
|
+
self.shape = None if shape == None else Polygon(shape)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@dataclass
|
|
113
|
+
class Width:
|
|
114
|
+
s: float = None
|
|
115
|
+
a: float = None
|
|
116
|
+
b: float = None
|
|
117
|
+
c: float = None
|
|
118
|
+
d: float = None
|
|
119
|
+
|
|
120
|
+
def __init__(self, data: dict) -> None:
|
|
121
|
+
if data == None:
|
|
122
|
+
return
|
|
123
|
+
self.__dict__ = data
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@dataclass
|
|
127
|
+
class DirectedPoint:
|
|
128
|
+
point: response_model.Point = None
|
|
129
|
+
heading: float = None
|
|
130
|
+
roll: float = None
|
|
131
|
+
patch: float = None
|
|
132
|
+
|
|
133
|
+
def __init__(self, data: dict) -> None:
|
|
134
|
+
if data == None:
|
|
135
|
+
return
|
|
136
|
+
point = data.pop("point", None)
|
|
137
|
+
|
|
138
|
+
self.__dict__ = data
|
|
139
|
+
self.point = response_model.Point(point)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
@dataclass
|
|
143
|
+
class LaneTurn:
|
|
144
|
+
position: DirectedPoint = None
|
|
145
|
+
turn_code: str = None
|
|
146
|
+
|
|
147
|
+
def __init__(self, data: dict) -> None:
|
|
148
|
+
if data == None:
|
|
149
|
+
return
|
|
150
|
+
position = data.pop("position", None)
|
|
151
|
+
|
|
152
|
+
self.__dict__ = data
|
|
153
|
+
self.position = DirectedPoint(position)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
@dataclass
|
|
157
|
+
class SpeedLimit:
|
|
158
|
+
s: float = None
|
|
159
|
+
length: float = None
|
|
160
|
+
type: int = None
|
|
161
|
+
max_value: float = None
|
|
162
|
+
min_value: float = None
|
|
163
|
+
unit: str = None
|
|
164
|
+
source: str = None
|
|
165
|
+
|
|
166
|
+
def __init__(self, data: dict) -> None:
|
|
167
|
+
if data == None:
|
|
168
|
+
return
|
|
169
|
+
self.__dict__ = data
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
@dataclass
|
|
173
|
+
class Stopline:
|
|
174
|
+
id: str = None
|
|
175
|
+
shape: LineString = None
|
|
176
|
+
|
|
177
|
+
def __init__(self, data: dict) -> None:
|
|
178
|
+
if data == None:
|
|
179
|
+
return
|
|
180
|
+
shape = data.pop("shape", None)
|
|
181
|
+
|
|
182
|
+
self.__dict__ = data
|
|
183
|
+
self.shape = LineString(shape)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
@dataclass
|
|
187
|
+
class CenterPoint:
|
|
188
|
+
s: float = None
|
|
189
|
+
heading: float = None
|
|
190
|
+
left_width: float = None
|
|
191
|
+
right_width: float = None
|
|
192
|
+
point: response_model.Point = None
|
|
193
|
+
|
|
194
|
+
def __init__(self, data: dict) -> None:
|
|
195
|
+
if data == None:
|
|
196
|
+
return
|
|
197
|
+
point = data.pop("point", None)
|
|
198
|
+
|
|
199
|
+
self.__dict__ = data
|
|
200
|
+
self.point = response_model.Point(point)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
@dataclass
|
|
204
|
+
class LaneMark:
|
|
205
|
+
s: float = None
|
|
206
|
+
length: float = None
|
|
207
|
+
is_merge: bool = None
|
|
208
|
+
style: int = None
|
|
209
|
+
color: int = None
|
|
210
|
+
width: float = None
|
|
211
|
+
styles: list[int] = None
|
|
212
|
+
colors: list[int] = None
|
|
213
|
+
|
|
214
|
+
def __init__(self, data: dict) -> None:
|
|
215
|
+
if data == None:
|
|
216
|
+
return
|
|
217
|
+
self.__dict__ = data
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
@dataclass
|
|
221
|
+
class Lane:
|
|
222
|
+
id: str = None
|
|
223
|
+
type: int = None
|
|
224
|
+
lane_num: int = None
|
|
225
|
+
link_id: int = None
|
|
226
|
+
lane_turn: LaneTurn = None
|
|
227
|
+
speed_limits: list[SpeedLimit] = None
|
|
228
|
+
stopline: Stopline = None
|
|
229
|
+
widths: list[Width] = None
|
|
230
|
+
center_line: list[CenterPoint] = None
|
|
231
|
+
upstream_lane_ids: list[str] = None
|
|
232
|
+
downstream_lane_ids: list[str] = None
|
|
233
|
+
length: float = None
|
|
234
|
+
left_lane_marks: list[LaneMark] = None
|
|
235
|
+
right_lane_marks: list[LaneMark] = None
|
|
236
|
+
left_boundary: LineString = None
|
|
237
|
+
right_boundary: LineString = None
|
|
238
|
+
width: float = None
|
|
239
|
+
|
|
240
|
+
def __init__(self, data: dict) -> None:
|
|
241
|
+
if data == None:
|
|
242
|
+
return
|
|
243
|
+
lane_turn = data.pop("lane_turn", None)
|
|
244
|
+
speed_limits = data.pop("speed_limits", None)
|
|
245
|
+
stopline = data.pop("stopline", None)
|
|
246
|
+
widths = data.pop("widths", None)
|
|
247
|
+
center_line = data.pop("center_line", None)
|
|
248
|
+
left_lane_marks = data.pop("left_lane_marks", None)
|
|
249
|
+
right_lane_marks = data.pop("right_lane_marks", None)
|
|
250
|
+
left_boundary = data.pop("left_boundary", None)
|
|
251
|
+
right_boundary = data.pop("right_boundary", None)
|
|
252
|
+
|
|
253
|
+
self.__dict__ = data
|
|
254
|
+
self.lane_turn = None if lane_turn == None else LaneTurn(lane_turn)
|
|
255
|
+
self.speed_limits = (
|
|
256
|
+
None if speed_limits == None else [
|
|
257
|
+
SpeedLimit(sl) for sl in speed_limits]
|
|
258
|
+
)
|
|
259
|
+
self.stopline = None if stopline == None else Stopline(stopline)
|
|
260
|
+
self.widths = None if widths == None else [
|
|
261
|
+
Width(width) for width in widths]
|
|
262
|
+
self.center_line = (
|
|
263
|
+
None if center_line == None else [
|
|
264
|
+
CenterPoint(cl) for cl in center_line]
|
|
265
|
+
)
|
|
266
|
+
self.left_lane_marks = (
|
|
267
|
+
None if left_lane_marks == None else [
|
|
268
|
+
LaneMark(l) for l in left_lane_marks]
|
|
269
|
+
)
|
|
270
|
+
self.right_lane_marks = (
|
|
271
|
+
None
|
|
272
|
+
if right_lane_marks == None
|
|
273
|
+
else [LaneMark(l) for l in right_lane_marks]
|
|
274
|
+
)
|
|
275
|
+
self.left_boundary = (
|
|
276
|
+
None if left_boundary == None else LineString(left_boundary)
|
|
277
|
+
)
|
|
278
|
+
self.right_boundary = (
|
|
279
|
+
None if right_boundary == None else LineString(right_boundary)
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
@dataclass
|
|
284
|
+
class ReferencePoint:
|
|
285
|
+
s: float = None
|
|
286
|
+
heading: float = None
|
|
287
|
+
point: response_model.Point = None
|
|
288
|
+
height: float = None
|
|
289
|
+
cross_slope: float = None
|
|
290
|
+
|
|
291
|
+
def __init__(self, data: dict) -> None:
|
|
292
|
+
if data == None:
|
|
293
|
+
return
|
|
294
|
+
point = data.pop("point", None)
|
|
295
|
+
|
|
296
|
+
self.__dict__ = data
|
|
297
|
+
self.point = None if point == None else response_model.Point(point)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
@dataclass
|
|
301
|
+
class Link:
|
|
302
|
+
id: str = None
|
|
303
|
+
map_id: int = None
|
|
304
|
+
name: str = None
|
|
305
|
+
type: int = None
|
|
306
|
+
pair_ids: list[str] = None
|
|
307
|
+
widths: list[Width] = None
|
|
308
|
+
ordered_lanes: list[Lane] = None
|
|
309
|
+
length: float = None
|
|
310
|
+
s_offset: float = None
|
|
311
|
+
link_num: int = None
|
|
312
|
+
parent_id: str = None
|
|
313
|
+
reference_line: list[ReferencePoint] = None
|
|
314
|
+
upstream_link_ids: list[str] = None
|
|
315
|
+
downstream_link_ids: list[str] = None
|
|
316
|
+
left_boundary: LineString = None
|
|
317
|
+
right_boundary: LineString = None
|
|
318
|
+
|
|
319
|
+
def __init__(self, data: dict) -> None:
|
|
320
|
+
if data == None:
|
|
321
|
+
return
|
|
322
|
+
widths = data.pop("widths", None)
|
|
323
|
+
ordered_lanes = data.pop("ordered_lanes", None)
|
|
324
|
+
reference_line = data.pop("reference_line", None)
|
|
325
|
+
left_boundary = data.pop("left_boundary", None)
|
|
326
|
+
right_boundary = data.pop("right_boundary", None)
|
|
327
|
+
|
|
328
|
+
self.__dict__ = data
|
|
329
|
+
self.widths = None if widths == None else [
|
|
330
|
+
Width(width) for width in widths]
|
|
331
|
+
self.ordered_lanes = (
|
|
332
|
+
None if ordered_lanes == None else [
|
|
333
|
+
Lane(ol) for ol in ordered_lanes]
|
|
334
|
+
)
|
|
335
|
+
self.reference_line = (
|
|
336
|
+
None
|
|
337
|
+
if reference_line == None
|
|
338
|
+
else [ReferencePoint(rl) for rl in reference_line]
|
|
339
|
+
)
|
|
340
|
+
self.left_boundary = (
|
|
341
|
+
None if left_boundary == None else LineString(left_boundary)
|
|
342
|
+
)
|
|
343
|
+
self.right_boundary = (
|
|
344
|
+
None if right_boundary == None else LineString(right_boundary)
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
@dataclass
|
|
349
|
+
class TrafficLight_MovementSignal_SignalOfGreen:
|
|
350
|
+
green_start: int = None
|
|
351
|
+
green_duration: int = None
|
|
352
|
+
yellow: int = None
|
|
353
|
+
redClean: int = None
|
|
354
|
+
|
|
355
|
+
def __init__(self, data: dict) -> None:
|
|
356
|
+
if data == None:
|
|
357
|
+
return
|
|
358
|
+
self.__dict__ = data
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
@dataclass
|
|
362
|
+
class SignalPlan_MovementSignal:
|
|
363
|
+
movement_id: str = None
|
|
364
|
+
traffic_light_pole_id: str = None
|
|
365
|
+
position: DirectedPoint = None
|
|
366
|
+
signal_of_green: list[TrafficLight_MovementSignal_SignalOfGreen] = None
|
|
367
|
+
|
|
368
|
+
def __init__(self, data: dict) -> None:
|
|
369
|
+
if data == None:
|
|
370
|
+
return
|
|
371
|
+
position = data.pop("position", None)
|
|
372
|
+
signal_of_green = data.pop("signal_of_green", None)
|
|
373
|
+
|
|
374
|
+
self.__dict__ = data
|
|
375
|
+
self.position = None if position == None else DirectedPoint(position)
|
|
376
|
+
self.signal_of_green = (
|
|
377
|
+
None
|
|
378
|
+
if signal_of_green == None
|
|
379
|
+
else [
|
|
380
|
+
TrafficLight_MovementSignal_SignalOfGreen(signal)
|
|
381
|
+
for signal in signal_of_green
|
|
382
|
+
]
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
@dataclass
|
|
387
|
+
class SignalPlan:
|
|
388
|
+
id: str = None
|
|
389
|
+
junction_id: str = None
|
|
390
|
+
cycle: int = None
|
|
391
|
+
offset: int = None
|
|
392
|
+
is_yellow: bool = None
|
|
393
|
+
movement_signals: dict[str, SignalPlan_MovementSignal] = None
|
|
394
|
+
|
|
395
|
+
def __init__(self, data: dict) -> None:
|
|
396
|
+
if data == None:
|
|
397
|
+
return
|
|
398
|
+
movement_signals = data.pop("movement_signals", None)
|
|
399
|
+
|
|
400
|
+
self.__dict__ = data
|
|
401
|
+
movement_signals = (
|
|
402
|
+
None
|
|
403
|
+
if movement_signals == None
|
|
404
|
+
else {
|
|
405
|
+
key: SignalPlan_MovementSignal(value)
|
|
406
|
+
for key, value in movement_signals.items()
|
|
407
|
+
}
|
|
408
|
+
)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
@dataclass
|
|
412
|
+
class Junction:
|
|
413
|
+
id: str = None
|
|
414
|
+
map_id: str = None
|
|
415
|
+
name: str = None
|
|
416
|
+
type: int = None
|
|
417
|
+
shape: Polygon = None
|
|
418
|
+
upstream_segment_ids: list[str] = None
|
|
419
|
+
downstream_segment_ids: list[str] = None
|
|
420
|
+
movements: list[Movement] = None
|
|
421
|
+
connections: list[Connection] = None
|
|
422
|
+
crosswalks: list[Crosswalk] = None
|
|
423
|
+
wait_areas: list[Link] = None
|
|
424
|
+
roundabout: list[Link] = None
|
|
425
|
+
links: list[Link] = None
|
|
426
|
+
signal_plan: SignalPlan = None
|
|
427
|
+
|
|
428
|
+
def __init__(self, data: dict) -> None:
|
|
429
|
+
if data == None:
|
|
430
|
+
return
|
|
431
|
+
shape = data.pop("shape", None)
|
|
432
|
+
movements = data.pop("movements", None)
|
|
433
|
+
connections = data.pop("connections", None)
|
|
434
|
+
crosswalks = data.pop("crosswalks", None)
|
|
435
|
+
wait_areas = data.pop("wait_areas", None)
|
|
436
|
+
roundabout = data.pop("roundabout", None)
|
|
437
|
+
links = data.pop("links", None)
|
|
438
|
+
signal_plan = data.pop("signal_plan", None)
|
|
439
|
+
|
|
440
|
+
self.__dict__ = data
|
|
441
|
+
self.shape = None if shape == None else Polygon(shape)
|
|
442
|
+
self.movements = None if movements == None else [
|
|
443
|
+
Movement(m) for m in movements]
|
|
444
|
+
self.connections = (
|
|
445
|
+
None if connections == None else [
|
|
446
|
+
Connection(c) for c in connections]
|
|
447
|
+
)
|
|
448
|
+
self.crosswalks = (
|
|
449
|
+
None if crosswalks == None else [Crosswalk(c) for c in crosswalks]
|
|
450
|
+
)
|
|
451
|
+
self.wait_areas = (
|
|
452
|
+
None if wait_areas == None else [Link(wa) for wa in wait_areas]
|
|
453
|
+
)
|
|
454
|
+
self.roundabout = (
|
|
455
|
+
None if roundabout == None else [Link(wa) for wa in roundabout]
|
|
456
|
+
)
|
|
457
|
+
self.links = None if links == None else [Link(l) for l in links]
|
|
458
|
+
self.signal_plan = None if signal_plan == None else SignalPlan(
|
|
459
|
+
signal_plan)
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
@dataclass
|
|
463
|
+
class TrafficSign:
|
|
464
|
+
id: str = None
|
|
465
|
+
type: int = None
|
|
466
|
+
position: DirectedPoint = None
|
|
467
|
+
|
|
468
|
+
def __init__(self, data: dict) -> None:
|
|
469
|
+
if data == None:
|
|
470
|
+
return
|
|
471
|
+
position = data.pop("position", None)
|
|
472
|
+
|
|
473
|
+
self.__dict__ = data
|
|
474
|
+
self.position = None if position == None else DirectedPoint(position)
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
@dataclass
|
|
478
|
+
class Segment:
|
|
479
|
+
id: str = None
|
|
480
|
+
map_id: str = None
|
|
481
|
+
name: str = None
|
|
482
|
+
start_junction_id: str = None
|
|
483
|
+
end_junction_id: str = None
|
|
484
|
+
pair_segment_ids: list[str] = None
|
|
485
|
+
s_offset: float = None
|
|
486
|
+
road_id: str = None
|
|
487
|
+
length: float = None
|
|
488
|
+
ordered_links: list[Link] = None
|
|
489
|
+
traffic_signs: list[TrafficSign] = None
|
|
490
|
+
|
|
491
|
+
def __init__(self, data: dict) -> None:
|
|
492
|
+
if data == None:
|
|
493
|
+
return
|
|
494
|
+
ordered_links = data.pop("ordered_links", None)
|
|
495
|
+
traffic_signs = data.pop("traffic_signs", None)
|
|
496
|
+
|
|
497
|
+
self.__dict__ = data
|
|
498
|
+
self.ordered_links = (
|
|
499
|
+
None if ordered_links == None else [
|
|
500
|
+
Link(ol) for ol in ordered_links]
|
|
501
|
+
)
|
|
502
|
+
self.traffic_signs = (
|
|
503
|
+
None if traffic_signs == None else [
|
|
504
|
+
TrafficSign(ts) for ts in traffic_signs]
|
|
505
|
+
)
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
@dataclass
|
|
509
|
+
class RoadPosition:
|
|
510
|
+
road_id: str = None
|
|
511
|
+
road_s: float = None
|
|
512
|
+
s: float = None
|
|
513
|
+
|
|
514
|
+
def __init__(self, data: dict) -> None:
|
|
515
|
+
if data == None:
|
|
516
|
+
return
|
|
517
|
+
self.__dict__ = data
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
@dataclass
|
|
521
|
+
class ControlPoint:
|
|
522
|
+
id: str = None
|
|
523
|
+
point: response_model.Point = None
|
|
524
|
+
|
|
525
|
+
def __init__(self, data: dict) -> None:
|
|
526
|
+
if data == None:
|
|
527
|
+
return
|
|
528
|
+
point = data.pop("point", None)
|
|
529
|
+
|
|
530
|
+
self.__dict__ = data
|
|
531
|
+
self.point = None if point == None else response_model.Point(point)
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
@dataclass
|
|
535
|
+
class Section:
|
|
536
|
+
id: str = None
|
|
537
|
+
s: float = None
|
|
538
|
+
length: float = None
|
|
539
|
+
start_junction_id: str = None
|
|
540
|
+
end_junction_id: str = None
|
|
541
|
+
left_segment_id: str = None
|
|
542
|
+
right_segment_id: str = None
|
|
543
|
+
|
|
544
|
+
def __init__(self, data: dict) -> None:
|
|
545
|
+
if data == None:
|
|
546
|
+
return
|
|
547
|
+
|
|
548
|
+
self.__dict__ = data
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
@dataclass
|
|
552
|
+
class JunctionPosition:
|
|
553
|
+
id: str = None
|
|
554
|
+
junction_id: str = None
|
|
555
|
+
s: float = None
|
|
556
|
+
length: float = None
|
|
557
|
+
|
|
558
|
+
def __init__(self, data: dict) -> None:
|
|
559
|
+
if data == None:
|
|
560
|
+
return
|
|
561
|
+
|
|
562
|
+
self.__dict__ = data
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
@dataclass
|
|
566
|
+
class Road:
|
|
567
|
+
id: str = None
|
|
568
|
+
map_id: str = None
|
|
569
|
+
name: str = None
|
|
570
|
+
type: int = None
|
|
571
|
+
length: float = None
|
|
572
|
+
neighbors: list[RoadPosition] = None
|
|
573
|
+
control_points: list[ControlPoint] = None
|
|
574
|
+
reference_line: list[ReferencePoint] = None
|
|
575
|
+
sections: list[Section] = None
|
|
576
|
+
junction_positions: list[JunctionPosition] = None
|
|
577
|
+
|
|
578
|
+
def __init__(self, data: dict) -> None:
|
|
579
|
+
if data == None:
|
|
580
|
+
return
|
|
581
|
+
|
|
582
|
+
neighbors = data.pop("neighbors", None)
|
|
583
|
+
control_points = data.pop("control_points", None)
|
|
584
|
+
reference_line = data.pop("reference_line", None)
|
|
585
|
+
sections = data.pop("sections", None)
|
|
586
|
+
junction_positions = data.pop("junction_positions", None)
|
|
587
|
+
|
|
588
|
+
self.__dict__ = data
|
|
589
|
+
self.neighbors = (
|
|
590
|
+
None if neighbors == None else [RoadPosition(n) for n in neighbors]
|
|
591
|
+
)
|
|
592
|
+
self.control_points = (
|
|
593
|
+
None
|
|
594
|
+
if control_points == None
|
|
595
|
+
else [ControlPoint(cp) for cp in control_points]
|
|
596
|
+
)
|
|
597
|
+
self.reference_line = (
|
|
598
|
+
None
|
|
599
|
+
if reference_line == None
|
|
600
|
+
else [ReferencePoint(n) for n in reference_line]
|
|
601
|
+
)
|
|
602
|
+
self.sections = None if sections == None else [
|
|
603
|
+
Section(s) for s in sections]
|
|
604
|
+
self.junction_positions = (
|
|
605
|
+
None
|
|
606
|
+
if junction_positions == None
|
|
607
|
+
else [JunctionPosition(jp) for jp in junction_positions]
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
@dataclass
|
|
612
|
+
class Mapper:
|
|
613
|
+
id: str = None
|
|
614
|
+
map_id: str = None
|
|
615
|
+
origin_xpath: str = None
|
|
616
|
+
origin_elem_id: str = None
|
|
617
|
+
origin_elem_type: str = None
|
|
618
|
+
target_xpath: str = None
|
|
619
|
+
target_elem_id: str = None
|
|
620
|
+
target_elem_type: str = None
|
|
621
|
+
|
|
622
|
+
def __init__(self, data: dict) -> None:
|
|
623
|
+
if data == None:
|
|
624
|
+
return
|
|
625
|
+
self.__dict__ = data
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
@dataclass
|
|
629
|
+
class Building:
|
|
630
|
+
id: str = None
|
|
631
|
+
pos: response_model.Point = None
|
|
632
|
+
shape: Polygon = None
|
|
633
|
+
heading: float = None
|
|
634
|
+
height: float = None
|
|
635
|
+
width: float = None
|
|
636
|
+
length: float = None
|
|
637
|
+
s: float = None
|
|
638
|
+
t: float = None
|
|
639
|
+
|
|
640
|
+
def __init__(self, data: dict) -> None:
|
|
641
|
+
if data == None:
|
|
642
|
+
return
|
|
643
|
+
pos = data.pop("pos", None)
|
|
644
|
+
shape = data.pop("shape", None)
|
|
645
|
+
|
|
646
|
+
self.__dict__ = data
|
|
647
|
+
self.pos = None if pos == None else response_model.Point(pos)
|
|
648
|
+
self.shape = None if shape == None else Polygon(shape)
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
@dataclass
|
|
652
|
+
class Tree:
|
|
653
|
+
id: str = None
|
|
654
|
+
pos: response_model.Point = None
|
|
655
|
+
heading: float = None
|
|
656
|
+
height: float = None
|
|
657
|
+
width: float = None
|
|
658
|
+
length: float = None
|
|
659
|
+
s: float = None
|
|
660
|
+
t: float = None
|
|
661
|
+
|
|
662
|
+
def __init__(self, data: dict) -> None:
|
|
663
|
+
if data == None:
|
|
664
|
+
return
|
|
665
|
+
pos = data.pop("pos", None)
|
|
666
|
+
|
|
667
|
+
self.__dict__ = data
|
|
668
|
+
self.pos = None if pos == None else response_model.Point(pos)
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
@dataclass
|
|
672
|
+
class Lamp:
|
|
673
|
+
id: str = None
|
|
674
|
+
pos: response_model.Point = None
|
|
675
|
+
heading: float = None
|
|
676
|
+
height: float = None
|
|
677
|
+
width: float = None
|
|
678
|
+
length: float = None
|
|
679
|
+
s: float = None
|
|
680
|
+
t: float = None
|
|
681
|
+
|
|
682
|
+
def __init__(self, data: dict) -> None:
|
|
683
|
+
if data == None:
|
|
684
|
+
return
|
|
685
|
+
pos = data.pop("pos", None)
|
|
686
|
+
|
|
687
|
+
self.__dict__ = data
|
|
688
|
+
self.pos = None if pos == None else response_model.Point(pos)
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
@dataclass
|
|
692
|
+
class Qxmap:
|
|
693
|
+
id: str = None
|
|
694
|
+
digest: str = None
|
|
695
|
+
header: Header = None
|
|
696
|
+
junctions: list[Junction] = None
|
|
697
|
+
segments: list[Segment] = None
|
|
698
|
+
roads: list[Road] = None
|
|
699
|
+
mappers: list[Mapper] = None
|
|
700
|
+
buildings: list[Building] = None
|
|
701
|
+
trees: list[Tree] = None
|
|
702
|
+
lamps: list[Lamp] = None
|
|
703
|
+
|
|
704
|
+
def __init__(self, data: dict) -> None:
|
|
705
|
+
if data == None:
|
|
706
|
+
return
|
|
707
|
+
header = data.pop("header", None)
|
|
708
|
+
junctions = data.pop("junctions", None)
|
|
709
|
+
segments = data.pop("segments", None)
|
|
710
|
+
roads = data.pop("roads", None)
|
|
711
|
+
mappers = data.pop("mappers", None)
|
|
712
|
+
buildings = data.pop("buildings", None)
|
|
713
|
+
trees = data.pop("trees", None)
|
|
714
|
+
lamps = data.pop("lamps", None)
|
|
715
|
+
|
|
716
|
+
self.__dict__ = data
|
|
717
|
+
self.header = None if header == None else Header(header)
|
|
718
|
+
self.junctions = None if junctions == None else [
|
|
719
|
+
Junction(j) for j in junctions]
|
|
720
|
+
self.segments = None if segments == None else [
|
|
721
|
+
Segment(s) for s in segments]
|
|
722
|
+
self.roads = None if roads == None else [Road(r) for r in roads]
|
|
723
|
+
self.mappers = None if mappers == None else [
|
|
724
|
+
Mapper(m) for m in mappers]
|
|
725
|
+
self.buildings = None if buildings == None else [
|
|
726
|
+
Building(m) for m in buildings]
|
|
727
|
+
self.trees = None if trees == None else [Tree(t) for t in trees]
|
|
728
|
+
self.lamps = None if lamps == None else [Lamp(l) for l in lamps]
|