@powsybl/network-map-layers 2.0.0
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/dist/index.d.cts +647 -0
- package/dist/index.d.ts +647 -0
- package/dist/powsybl-network-map-layers.cjs +4034 -0
- package/dist/powsybl-network-map-layers.js +4034 -0
- package/package.json +57 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
import { Color } from 'deck.gl';
|
|
2
|
+
import { Color as Color_2 } from '@deck.gl/core';
|
|
3
|
+
import { CompositeLayer } from 'deck.gl';
|
|
4
|
+
import { CompositeLayerProps } from 'deck.gl';
|
|
5
|
+
import { DefaultProps } from '@deck.gl/core';
|
|
6
|
+
import { Layer } from 'deck.gl';
|
|
7
|
+
import { LayerContext } from 'deck.gl';
|
|
8
|
+
import { Position } from 'deck.gl';
|
|
9
|
+
import { UpdateParameters } from 'deck.gl';
|
|
10
|
+
|
|
11
|
+
declare type ActivePower = {
|
|
12
|
+
p: number | undefined;
|
|
13
|
+
printPosition: Position;
|
|
14
|
+
offset: [number, number];
|
|
15
|
+
line: MapAnyLine;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare type Arrow = {
|
|
19
|
+
line: MapAnyLineWithType;
|
|
20
|
+
distance: number;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare enum ArrowDirection {
|
|
24
|
+
NONE = "none",
|
|
25
|
+
FROM_SIDE_1_TO_SIDE_2 = "fromSide1ToSide2",
|
|
26
|
+
FROM_SIDE_2_TO_SIDE_1 = "fromSide2ToSide1"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare type CompositeData = {
|
|
30
|
+
nominalV: number;
|
|
31
|
+
mapOriginDestination?: Map<string, Set<MapAnyLineWithType>>;
|
|
32
|
+
lines: MapAnyLineWithType[];
|
|
33
|
+
lineMap?: Map<string, CompositeDataLine>;
|
|
34
|
+
activePower: ActivePower[];
|
|
35
|
+
operatingStatus: OperatingStatus[];
|
|
36
|
+
arrows: Arrow[];
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
declare type CompositeDataLine = {
|
|
40
|
+
nominalV: number;
|
|
41
|
+
lines: MapAnyLine[];
|
|
42
|
+
arrows: Arrow[];
|
|
43
|
+
positions: LonLat[];
|
|
44
|
+
cumulativeDistances: number[];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export declare type Coordinate = {
|
|
48
|
+
lon: number;
|
|
49
|
+
lat: number;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export declare enum Country {
|
|
53
|
+
AF = "AFGHANISTAN",
|
|
54
|
+
AX = "\u00C5LAND ISLANDS",
|
|
55
|
+
AL = "ALBANIA",
|
|
56
|
+
DZ = "ALGERIA",
|
|
57
|
+
AS = "AMERICAN SAMOA",
|
|
58
|
+
AD = "ANDORRA",
|
|
59
|
+
AO = "ANGOLA",
|
|
60
|
+
AI = "ANGUILLA",
|
|
61
|
+
AQ = "ANTARCTICA",
|
|
62
|
+
AG = "ANTIGUA AND BARBUDA",
|
|
63
|
+
AR = "ARGENTINA",
|
|
64
|
+
AM = "ARMENIA",
|
|
65
|
+
AW = "ARUBA",
|
|
66
|
+
AU = "AUSTRALIA",
|
|
67
|
+
AT = "AUSTRIA",
|
|
68
|
+
AZ = "AZERBAIJAN",
|
|
69
|
+
BS = "BAHAMAS",
|
|
70
|
+
BH = "BAHRAIN",
|
|
71
|
+
BD = "BANGLADESH",
|
|
72
|
+
BB = "BARBADOS",
|
|
73
|
+
BY = "BELARUS",
|
|
74
|
+
BE = "BELGIUM",
|
|
75
|
+
BZ = "BELIZE",
|
|
76
|
+
BJ = "BENIN",
|
|
77
|
+
BM = "BERMUDA",
|
|
78
|
+
BT = "BHUTAN",
|
|
79
|
+
BO = "BOLIVIA, PLURINATIONAL STATE OF",
|
|
80
|
+
BQ = "BONAIRE, SINT EUSTATIUS AND SABA",
|
|
81
|
+
BA = "BOSNIA AND HERZEGOVINA",
|
|
82
|
+
BW = "BOTSWANA",
|
|
83
|
+
BV = "BOUVET ISLAND",
|
|
84
|
+
BR = "BRAZIL",
|
|
85
|
+
IO = "BRITISH INDIAN OCEAN TERRITORY",
|
|
86
|
+
BN = "BRUNEI DARUSSALAM",
|
|
87
|
+
BG = "BULGARIA",
|
|
88
|
+
BF = "BURKINA FASO",
|
|
89
|
+
BI = "BURUNDI",
|
|
90
|
+
KH = "CAMBODIA",
|
|
91
|
+
CM = "CAMEROON",
|
|
92
|
+
CA = "CANADA",
|
|
93
|
+
CV = "CAPE VERDE",
|
|
94
|
+
KY = "CAYMAN ISLANDS",
|
|
95
|
+
CF = "CENTRAL AFRICAN REPUBLIC",
|
|
96
|
+
TD = "CHAD",
|
|
97
|
+
CL = "CHILE",
|
|
98
|
+
CN = "CHINA",
|
|
99
|
+
CX = "CHRISTMAS ISLAND",
|
|
100
|
+
CC = "COCOS (KEELING) ISLANDS",
|
|
101
|
+
CO = "COLOMBIA",
|
|
102
|
+
KM = "COMOROS",
|
|
103
|
+
CG = "CONGO",
|
|
104
|
+
CD = "CONGO, THE DEMOCRATIC REPUBLIC OF THE",
|
|
105
|
+
CK = "COOK ISLANDS",
|
|
106
|
+
CR = "COSTA RICA",
|
|
107
|
+
CI = "C\u00D4TE D'IVOIRE",
|
|
108
|
+
HR = "CROATIA",
|
|
109
|
+
CU = "CUBA",
|
|
110
|
+
CW = "CURA\u00C7AO",
|
|
111
|
+
CY = "CYPRUS",
|
|
112
|
+
CZ = "CZECH REPUBLIC",
|
|
113
|
+
DK = "DENMARK",
|
|
114
|
+
DJ = "DJIBOUTI",
|
|
115
|
+
DM = "DOMINICA",
|
|
116
|
+
DO = "DOMINICAN REPUBLIC",
|
|
117
|
+
EC = "ECUADOR",
|
|
118
|
+
EG = "EGYPT",
|
|
119
|
+
SV = "EL SALVADOR",
|
|
120
|
+
GQ = "EQUATORIAL GUINEA",
|
|
121
|
+
ER = "ERITREA",
|
|
122
|
+
EE = "ESTONIA",
|
|
123
|
+
ET = "ETHIOPIA",
|
|
124
|
+
FK = "FALKLAND ISLANDS (MALVINAS)",
|
|
125
|
+
FO = "FAROE ISLANDS",
|
|
126
|
+
FJ = "FIJI",
|
|
127
|
+
FI = "FINLAND",
|
|
128
|
+
FR = "FRANCE",
|
|
129
|
+
GF = "FRENCH GUIANA",
|
|
130
|
+
PF = "FRENCH POLYNESIA",
|
|
131
|
+
TF = "FRENCH SOUTHERN TERRITORIES",
|
|
132
|
+
GA = "GABON",
|
|
133
|
+
GM = "GAMBIA",
|
|
134
|
+
GE = "GEORGIA",
|
|
135
|
+
DE = "GERMANY",
|
|
136
|
+
GH = "GHANA",
|
|
137
|
+
GI = "GIBRALTAR",
|
|
138
|
+
GR = "GREECE",
|
|
139
|
+
GL = "GREENLAND",
|
|
140
|
+
GD = "GRENADA",
|
|
141
|
+
GP = "GUADELOUPE",
|
|
142
|
+
GU = "GUAM",
|
|
143
|
+
GT = "GUATEMALA",
|
|
144
|
+
GG = "GUERNSEY",
|
|
145
|
+
GN = "GUINEA",
|
|
146
|
+
GW = "GUINEA-BISSAU",
|
|
147
|
+
GY = "GUYANA",
|
|
148
|
+
HT = "HAITI",
|
|
149
|
+
HM = "HEARD ISLAND AND MCDONALD ISLANDS",
|
|
150
|
+
VA = "HOLY SEE (VATICAN CITY STATE)",
|
|
151
|
+
HN = "HONDURAS",
|
|
152
|
+
HK = "HONG KONG",
|
|
153
|
+
HU = "HUNGARY",
|
|
154
|
+
IS = "ICELAND",
|
|
155
|
+
IN = "INDIA",
|
|
156
|
+
ID = "INDONESIA",
|
|
157
|
+
IR = "IRAN, ISLAMIC REPUBLIC OF",
|
|
158
|
+
IQ = "IRAQ",
|
|
159
|
+
IE = "IRELAND",
|
|
160
|
+
IM = "ISLE OF MAN",
|
|
161
|
+
IL = "ISRAEL",
|
|
162
|
+
IT = "ITALY",
|
|
163
|
+
JM = "JAMAICA",
|
|
164
|
+
JP = "JAPAN",
|
|
165
|
+
JE = "JERSEY",
|
|
166
|
+
JO = "JORDAN",
|
|
167
|
+
KZ = "KAZAKHSTAN",
|
|
168
|
+
KE = "KENYA",
|
|
169
|
+
KI = "KIRIBATI",
|
|
170
|
+
KP = "KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF",
|
|
171
|
+
KR = "KOREA, REPUBLIC OF",
|
|
172
|
+
XK = "KOSOVO",
|
|
173
|
+
KW = "KUWAIT",
|
|
174
|
+
KG = "KYRGYZSTAN",
|
|
175
|
+
LA = "LAO PEOPLE'S DEMOCRATIC REPUBLIC",
|
|
176
|
+
LV = "LATVIA",
|
|
177
|
+
LB = "LEBANON",
|
|
178
|
+
LS = "LESOTHO",
|
|
179
|
+
LR = "LIBERIA",
|
|
180
|
+
LY = "LIBYA",
|
|
181
|
+
LI = "LIECHTENSTEIN",
|
|
182
|
+
LT = "LITHUANIA",
|
|
183
|
+
LU = "LUXEMBOURG",
|
|
184
|
+
MO = "MACAO",
|
|
185
|
+
MK = "MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF",
|
|
186
|
+
MG = "MADAGASCAR",
|
|
187
|
+
MW = "MALAWI",
|
|
188
|
+
MY = "MALAYSIA",
|
|
189
|
+
MV = "MALDIVES",
|
|
190
|
+
ML = "MALI",
|
|
191
|
+
MT = "MALTA",
|
|
192
|
+
MH = "MARSHALL ISLANDS",
|
|
193
|
+
MQ = "MARTINIQUE",
|
|
194
|
+
MR = "MAURITANIA",
|
|
195
|
+
MU = "MAURITIUS",
|
|
196
|
+
YT = "MAYOTTE",
|
|
197
|
+
MX = "MEXICO",
|
|
198
|
+
FM = "MICRONESIA, FEDERATED STATES OF",
|
|
199
|
+
MD = "MOLDOVA, REPUBLIC OF",
|
|
200
|
+
MC = "MONACO",
|
|
201
|
+
MN = "MONGOLIA",
|
|
202
|
+
ME = "MONTENEGRO",
|
|
203
|
+
MS = "MONTSERRAT",
|
|
204
|
+
MA = "MOROCCO",
|
|
205
|
+
MZ = "MOZAMBIQUE",
|
|
206
|
+
MM = "MYANMAR",
|
|
207
|
+
NA = "NAMIBIA",
|
|
208
|
+
NR = "NAURU",
|
|
209
|
+
NP = "NEPAL",
|
|
210
|
+
NL = "NETHERLANDS",
|
|
211
|
+
NC = "NEW CALEDONIA",
|
|
212
|
+
NZ = "NEW ZEALAND",
|
|
213
|
+
NI = "NICARAGUA",
|
|
214
|
+
NE = "NIGER",
|
|
215
|
+
NG = "NIGERIA",
|
|
216
|
+
NU = "NIUE",
|
|
217
|
+
NF = "NORFOLK ISLAND",
|
|
218
|
+
MP = "NORTHERN MARIANA ISLANDS",
|
|
219
|
+
NO = "NORWAY",
|
|
220
|
+
OM = "OMAN",
|
|
221
|
+
PK = "PAKISTAN",
|
|
222
|
+
PW = "PALAU",
|
|
223
|
+
PS = "PALESTINE, STATE OF",
|
|
224
|
+
PA = "PANAMA",
|
|
225
|
+
PG = "PAPUA NEW GUINEA",
|
|
226
|
+
PY = "PARAGUAY",
|
|
227
|
+
PE = "PERU",
|
|
228
|
+
PH = "PHILIPPINES",
|
|
229
|
+
PN = "PITCAIRN",
|
|
230
|
+
PL = "POLAND",
|
|
231
|
+
PT = "PORTUGAL",
|
|
232
|
+
PR = "PUERTO RICO",
|
|
233
|
+
QA = "QATAR",
|
|
234
|
+
RE = "R\u00C9UNION",
|
|
235
|
+
RO = "ROMANIA",
|
|
236
|
+
RU = "RUSSIAN FEDERATION",
|
|
237
|
+
RW = "RWANDA",
|
|
238
|
+
BL = "SAINT BARTH\u00C9LEMY",
|
|
239
|
+
SH = "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA",
|
|
240
|
+
KN = "SAINT KITTS AND NEVIS",
|
|
241
|
+
LC = "SAINT LUCIA",
|
|
242
|
+
MF = "SAINT MARTIN (FRENCH PART)",
|
|
243
|
+
PM = "SAINT PIERRE AND MIQUELON",
|
|
244
|
+
VC = "SAINT VINCENT AND THE GRENADINES",
|
|
245
|
+
WS = "SAMOA",
|
|
246
|
+
SM = "SAN MARINO",
|
|
247
|
+
ST = "SAO TOME AND PRINCIPE",
|
|
248
|
+
SA = "SAUDI ARABIA",
|
|
249
|
+
SN = "SENEGAL",
|
|
250
|
+
RS = "SERBIA",
|
|
251
|
+
SC = "SEYCHELLES",
|
|
252
|
+
SL = "SIERRA LEONE",
|
|
253
|
+
SG = "SINGAPORE",
|
|
254
|
+
SX = "SINT MAARTEN (DUTCH PART)",
|
|
255
|
+
SK = "SLOVAKIA",
|
|
256
|
+
SI = "SLOVENIA",
|
|
257
|
+
SB = "SOLOMON ISLANDS",
|
|
258
|
+
SO = "SOMALIA",
|
|
259
|
+
ZA = "SOUTH AFRICA",
|
|
260
|
+
GS = "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS",
|
|
261
|
+
SS = "SOUTH SUDAN",
|
|
262
|
+
ES = "SPAIN",
|
|
263
|
+
LK = "SRI LANKA",
|
|
264
|
+
SD = "SUDAN",
|
|
265
|
+
SR = "SURINAME",
|
|
266
|
+
SJ = "SVALBARD AND JAN MAYEN",
|
|
267
|
+
SZ = "SWAZILAND",
|
|
268
|
+
SE = "SWEDEN",
|
|
269
|
+
CH = "SWITZERLAND",
|
|
270
|
+
SY = "SYRIAN ARAB REPUBLIC",
|
|
271
|
+
TW = "TAIWAN, PROVINCE OF CHINA",
|
|
272
|
+
TJ = "TAJIKISTAN",
|
|
273
|
+
TZ = "TANZANIA, UNITED REPUBLIC OF",
|
|
274
|
+
TH = "THAILAND",
|
|
275
|
+
TL = "TIMOR-LESTE",
|
|
276
|
+
TG = "TOGO",
|
|
277
|
+
TK = "TOKELAU",
|
|
278
|
+
TO = "TONGA",
|
|
279
|
+
TT = "TRINIDAD AND TOBAGO",
|
|
280
|
+
TN = "TUNISIA",
|
|
281
|
+
TR = "TURKEY",
|
|
282
|
+
TM = "TURKMENISTAN",
|
|
283
|
+
TC = "TURKS AND CAICOS ISLANDS",
|
|
284
|
+
TV = "TUVALU",
|
|
285
|
+
UG = "UGANDA",
|
|
286
|
+
UA = "UKRAINE",
|
|
287
|
+
AE = "UNITED ARAB EMIRATES",
|
|
288
|
+
GB = "UNITED KINGDOM",
|
|
289
|
+
US = "UNITED STATES",
|
|
290
|
+
UM = "UNITED STATES MINOR OUTLYING ISLANDS",
|
|
291
|
+
UY = "URUGUAY",
|
|
292
|
+
UZ = "UZBEKISTAN",
|
|
293
|
+
VU = "VANUATU",
|
|
294
|
+
VE = "VENEZUELA, BOLIVARIAN REPUBLIC OF",
|
|
295
|
+
VN = "VIET NAM",
|
|
296
|
+
VG = "VIRGIN ISLANDS, BRITISH",
|
|
297
|
+
VI = "VIRGIN ISLANDS, U.S.",
|
|
298
|
+
WF = "WALLIS AND FUTUNA",
|
|
299
|
+
EH = "WESTERN SAHARA",
|
|
300
|
+
YE = "YEMEN",
|
|
301
|
+
ZM = "ZAMBIA",
|
|
302
|
+
ZW = "ZIMBABWE"
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
declare type CurrentLimits = {
|
|
306
|
+
permanentLimit: number;
|
|
307
|
+
temporaryLimits?: TemporaryLimits[];
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
export declare enum EQUIPMENT_TYPES {
|
|
311
|
+
SUBSTATION = "SUBSTATION",
|
|
312
|
+
VOLTAGE_LEVEL = "VOLTAGE_LEVEL",
|
|
313
|
+
LINE = "LINE",
|
|
314
|
+
TWO_WINDINGS_TRANSFORMER = "TWO_WINDINGS_TRANSFORMER",
|
|
315
|
+
THREE_WINDINGS_TRANSFORMER = "THREE_WINDINGS_TRANSFORMER",
|
|
316
|
+
HVDC_LINE = "HVDC_LINE",
|
|
317
|
+
GENERATOR = "GENERATOR",
|
|
318
|
+
BATTERY = "BATTERY",
|
|
319
|
+
LOAD = "LOAD",
|
|
320
|
+
SHUNT_COMPENSATOR = "SHUNT_COMPENSATOR",
|
|
321
|
+
TIE_LINE = "TIE_LINE",
|
|
322
|
+
DANGLING_LINE = "DANGLING_LINE",
|
|
323
|
+
STATIC_VAR_COMPENSATOR = "STATIC_VAR_COMPENSATOR",
|
|
324
|
+
HVDC_CONVERTER_STATION = "HVDC_CONVERTER_STATION",
|
|
325
|
+
VSC_CONVERTER_STATION = "VSC_CONVERTER_STATION",
|
|
326
|
+
LCC_CONVERTER_STATION = "LCC_CONVERTER_STATION",
|
|
327
|
+
SWITCH = "SWITCH"
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
export declare class GeoData {
|
|
331
|
+
substationPositionsById: Map<string, Coordinate>;
|
|
332
|
+
linePositionsById: Map<string, Coordinate[]>;
|
|
333
|
+
constructor(substationPositionsById: GeoData['substationPositionsById'], linePositionsById: GeoData['linePositionsById']);
|
|
334
|
+
setSubstationPositions(positions: GeoDataSubstation[]): void;
|
|
335
|
+
updateSubstationPositions(substationIdsToUpdate: string[], fetchedPositions: GeoDataSubstation[]): void;
|
|
336
|
+
getSubstationPosition(substationId: string): LonLat;
|
|
337
|
+
setLinePositions(positions: GeoDataLine[]): void;
|
|
338
|
+
updateLinePositions(lineIdsToUpdate: string[], fetchedPositions: GeoDataLine[]): void;
|
|
339
|
+
/**
|
|
340
|
+
* Get line positions always ordered from side 1 to side 2.
|
|
341
|
+
*/
|
|
342
|
+
getLinePositions(network: MapEquipments, line: MapAnyLine, detailed?: boolean): LonLat[];
|
|
343
|
+
getLineDistances(positions: LonLat[]): number[] | null;
|
|
344
|
+
/**
|
|
345
|
+
* Find the segment in which we reach the wanted distance and return the segment
|
|
346
|
+
* along with the remaining distance to travel on this segment to be at the exact wanted distance
|
|
347
|
+
* (implemented using a binary search)
|
|
348
|
+
*/
|
|
349
|
+
findSegment(positions: LonLat[], cumulativeDistances: number[], wantedDistance: number): {
|
|
350
|
+
idx: number;
|
|
351
|
+
segment: LonLat[];
|
|
352
|
+
remainingDistance: number;
|
|
353
|
+
};
|
|
354
|
+
labelDisplayPosition(positions: LonLat[], cumulativeDistances: number[], arrowPosition: number, arrowDirection: ArrowDirection, lineParallelIndex: number, lineAngle: number, proximityAngle: number, distanceBetweenLines: number, proximityFactor: number): {
|
|
355
|
+
position: {
|
|
356
|
+
latitude: number;
|
|
357
|
+
longitude: number;
|
|
358
|
+
};
|
|
359
|
+
angle: number;
|
|
360
|
+
offset: [number, number];
|
|
361
|
+
} | null;
|
|
362
|
+
getLabelOffset(angle: number, offsetDistance: number, arrowDirection: ArrowDirection): [number, number];
|
|
363
|
+
getMapAngle(point1: LonLat, point2: LonLat): number;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export declare type GeoDataEquipment = {
|
|
367
|
+
id: string;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
export declare type GeoDataLine = GeoDataEquipment & {
|
|
371
|
+
country1?: Country;
|
|
372
|
+
country2?: Country;
|
|
373
|
+
substationStart?: string;
|
|
374
|
+
substationEnd?: string;
|
|
375
|
+
coordinates: Coordinate[];
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
export declare type GeoDataSubstation = GeoDataEquipment & {
|
|
379
|
+
country?: Country;
|
|
380
|
+
coordinate: Coordinate;
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
export declare function getNominalVoltageColor(nominalVoltage: number): Color_2;
|
|
384
|
+
|
|
385
|
+
declare type LineConnection = {
|
|
386
|
+
terminal1Connected: boolean;
|
|
387
|
+
terminal2Connected: boolean;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export declare enum LineFlowColorMode {
|
|
391
|
+
NOMINAL_VOLTAGE = "nominalVoltage",
|
|
392
|
+
OVERLOADS = "overloads"
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export declare enum LineFlowMode {
|
|
396
|
+
STATIC_ARROWS = "staticArrows",
|
|
397
|
+
ANIMATED_ARROWS = "animatedArrows",
|
|
398
|
+
FEEDERS = "feeders"
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export declare class LineLayer extends CompositeLayer<Required<_LineLayerProps>> {
|
|
402
|
+
static readonly layerName = "LineLayer";
|
|
403
|
+
static readonly defaultProps: DefaultProps<LineLayerProps>;
|
|
404
|
+
state: {
|
|
405
|
+
compositeData: CompositeData[];
|
|
406
|
+
linesConnection: Map<string, LineConnection>;
|
|
407
|
+
linesStatus: Map<string, LinesStatus>;
|
|
408
|
+
};
|
|
409
|
+
initializeState(context: LayerContext): void;
|
|
410
|
+
getVoltageLevelIndex(voltageLevelId: string): number;
|
|
411
|
+
updateState({ props, oldProps, changeFlags }: UpdateParameters<this>): void;
|
|
412
|
+
genLineKey(line: MapAnyLine): string;
|
|
413
|
+
recomputeParallelLinesIndex(compositeData: CompositeData[], props: this['props']): void;
|
|
414
|
+
recomputeForkLines(compositeData: CompositeData[], props: this['props']): void;
|
|
415
|
+
getProximityFactor(firstPosition: LonLat, secondPosition: LonLat): number;
|
|
416
|
+
computeAngle(props: this['props'], position1: LonLat, position2: LonLat): number;
|
|
417
|
+
renderLayers(): Layer<{}>[];
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export declare type LineLayerProps = _LineLayerProps & CompositeLayerProps;
|
|
421
|
+
|
|
422
|
+
declare type _LineLayerProps = {
|
|
423
|
+
data: MapAnyLineWithType[];
|
|
424
|
+
network?: MapEquipments;
|
|
425
|
+
geoData?: GeoData;
|
|
426
|
+
getNominalVoltageColor?: (voltage: number) => Color;
|
|
427
|
+
disconnectedLineColor?: Color;
|
|
428
|
+
filteredNominalVoltages?: number[];
|
|
429
|
+
lineFlowMode?: LineFlowMode;
|
|
430
|
+
lineFlowColorMode?: LineFlowColorMode;
|
|
431
|
+
lineFlowAlertThreshold?: number;
|
|
432
|
+
showLineFlow?: boolean;
|
|
433
|
+
lineFullPath?: boolean;
|
|
434
|
+
lineParallelPath?: boolean;
|
|
435
|
+
labelSize?: number;
|
|
436
|
+
iconSize?: number;
|
|
437
|
+
distanceBetweenLines?: number;
|
|
438
|
+
maxParallelOffset?: number;
|
|
439
|
+
minParallelOffset?: number;
|
|
440
|
+
substationRadius?: number;
|
|
441
|
+
substationMaxPixel?: number;
|
|
442
|
+
minSubstationRadiusPixel?: number;
|
|
443
|
+
areFlowsValid: boolean;
|
|
444
|
+
updatedLines: MapAnyLineWithType[];
|
|
445
|
+
labelsVisible: boolean;
|
|
446
|
+
labelColor: Color;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
declare type LinesStatus = {
|
|
450
|
+
operatingStatus: LineStatus_2;
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Copyright (c) 2023, RTE (http://www.rte-france.com)
|
|
455
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
456
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
457
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
458
|
+
*/
|
|
459
|
+
declare type LineStatus = any;
|
|
460
|
+
|
|
461
|
+
declare enum LineStatus_2 {
|
|
462
|
+
PLANNED_OUTAGE = "PLANNED_OUTAGE",
|
|
463
|
+
FORCED_OUTAGE = "FORCED_OUTAGE",
|
|
464
|
+
IN_OPERATION = "IN_OPERATION"
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export declare type LonLat = [number, number];
|
|
468
|
+
|
|
469
|
+
export declare type MapAnyLine = MapLine | MapTieLine | MapHvdcLine;
|
|
470
|
+
|
|
471
|
+
export declare type MapAnyLineWithType = (MapLineWithType | MapTieLineWithType | MapHvdcLineWithType) & {
|
|
472
|
+
origin?: LonLat;
|
|
473
|
+
end?: LonLat;
|
|
474
|
+
substationIndexStart?: number;
|
|
475
|
+
substationIndexEnd?: number;
|
|
476
|
+
angle?: number;
|
|
477
|
+
angleStart?: number;
|
|
478
|
+
angleEnd?: number;
|
|
479
|
+
proximityFactorStart?: number;
|
|
480
|
+
proximityFactorEnd?: number;
|
|
481
|
+
parallelIndex?: number;
|
|
482
|
+
cumulativeDistances?: number[];
|
|
483
|
+
positions?: LonLat[];
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
export declare type MapEquipment = MapVoltageLevel | MapSubstation | MapAnyLine;
|
|
487
|
+
|
|
488
|
+
export declare class MapEquipments {
|
|
489
|
+
substations: MapSubstation[];
|
|
490
|
+
substationsById: Map<string, MapSubstation>;
|
|
491
|
+
lines: MapLine[];
|
|
492
|
+
linesById: Map<string, MapLine>;
|
|
493
|
+
tieLines: MapTieLine[];
|
|
494
|
+
tieLinesById: Map<string, MapTieLine>;
|
|
495
|
+
hvdcLines: MapHvdcLine[];
|
|
496
|
+
hvdcLinesById: Map<string, MapHvdcLine>;
|
|
497
|
+
voltageLevels: MapVoltageLevel[];
|
|
498
|
+
voltageLevelsById: Map<string, MapVoltageLevel>;
|
|
499
|
+
nominalVoltages: number[];
|
|
500
|
+
constructor();
|
|
501
|
+
newMapEquipmentForUpdate(): typeof MapEquipments;
|
|
502
|
+
checkAndGetValues<T extends MapEquipment>(equipments: T[] | null | undefined): T[];
|
|
503
|
+
completeSubstationsInfos(equipmentsToIndex: MapSubstation[]): void;
|
|
504
|
+
updateEquipments<T extends MapEquipment>(currentEquipments: T[], newEquipments: T[]): T[];
|
|
505
|
+
updateSubstations(substations: MapSubstation[], fullReload: boolean): void;
|
|
506
|
+
completeLinesInfos(equipmentsToIndex: MapLine[]): void;
|
|
507
|
+
completeTieLinesInfos(equipmentsToIndex: MapTieLine[]): void;
|
|
508
|
+
updateLines(lines: MapLine[], fullReload: boolean): void;
|
|
509
|
+
updateTieLines(tieLines: MapTieLine[], fullReload: boolean): void;
|
|
510
|
+
updateHvdcLines(hvdcLines: MapHvdcLine[], fullReload: boolean): void;
|
|
511
|
+
completeHvdcLinesInfos(equipmentsToIndex: MapHvdcLine[]): void;
|
|
512
|
+
removeBranchesOfVoltageLevel(branchesList: MapLine[], voltageLevelId: string): MapLine[];
|
|
513
|
+
removeEquipment(equipmentType: EQUIPMENT_TYPES, equipmentId: string): void;
|
|
514
|
+
getVoltageLevels(): MapVoltageLevel[];
|
|
515
|
+
getVoltageLevel(id: string): MapVoltageLevel | undefined;
|
|
516
|
+
getSubstations(): MapSubstation[];
|
|
517
|
+
getSubstation(id: string): MapSubstation | undefined;
|
|
518
|
+
getNominalVoltages(): number[];
|
|
519
|
+
getLines(): MapLine[];
|
|
520
|
+
getLine(id: string): MapLine | undefined;
|
|
521
|
+
getHvdcLines(): MapHvdcLine[];
|
|
522
|
+
getHvdcLine(id: string): MapHvdcLine | undefined;
|
|
523
|
+
getTieLines(): MapTieLine[];
|
|
524
|
+
getTieLine(id: string): MapTieLine | undefined;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export declare type MapHvdcLine = {
|
|
528
|
+
id: string;
|
|
529
|
+
voltageLevelId1: string;
|
|
530
|
+
voltageLevelId2: string;
|
|
531
|
+
terminal1Connected: boolean;
|
|
532
|
+
terminal2Connected: boolean;
|
|
533
|
+
p1: number;
|
|
534
|
+
p2: number;
|
|
535
|
+
hvdcType: string;
|
|
536
|
+
currentLimits1?: CurrentLimits;
|
|
537
|
+
currentLimits2?: CurrentLimits;
|
|
538
|
+
i1?: number;
|
|
539
|
+
i2?: number;
|
|
540
|
+
operatingStatus?: LineStatus;
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
export declare type MapHvdcLineWithType = MapHvdcLine & {
|
|
544
|
+
equipmentType: EQUIPMENT_TYPES.HVDC_LINE;
|
|
545
|
+
};
|
|
546
|
+
|
|
547
|
+
export declare type MapLine = {
|
|
548
|
+
id: string;
|
|
549
|
+
voltageLevelId1: string;
|
|
550
|
+
voltageLevelId2: string;
|
|
551
|
+
name?: string;
|
|
552
|
+
terminal1Connected: boolean;
|
|
553
|
+
terminal2Connected: boolean;
|
|
554
|
+
p1: number;
|
|
555
|
+
p2: number;
|
|
556
|
+
i1?: number;
|
|
557
|
+
i2?: number;
|
|
558
|
+
operatingStatus?: LineStatus;
|
|
559
|
+
currentLimits1?: CurrentLimits;
|
|
560
|
+
currentLimits2?: CurrentLimits;
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
export declare type MapLineWithType = MapLine & {
|
|
564
|
+
equipmentType: EQUIPMENT_TYPES.LINE;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
export declare type MapSubstation = {
|
|
568
|
+
id: string;
|
|
569
|
+
name?: string;
|
|
570
|
+
voltageLevels: MapVoltageLevel[];
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
export declare type MapTieLine = {
|
|
574
|
+
id: string;
|
|
575
|
+
voltageLevelId1: string;
|
|
576
|
+
voltageLevelId2: string;
|
|
577
|
+
terminal1Connected: boolean;
|
|
578
|
+
terminal2Connected: boolean;
|
|
579
|
+
currentLimits1: CurrentLimits;
|
|
580
|
+
currentLimits2: CurrentLimits;
|
|
581
|
+
p1?: number;
|
|
582
|
+
p2?: number;
|
|
583
|
+
i1?: number;
|
|
584
|
+
i2?: number;
|
|
585
|
+
operatingStatus?: LineStatus;
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
export declare type MapTieLineWithType = MapTieLine & {
|
|
589
|
+
equipmentType: EQUIPMENT_TYPES.TIE_LINE;
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
export declare type MapVoltageLevel = {
|
|
593
|
+
id: string;
|
|
594
|
+
nominalV: number;
|
|
595
|
+
substationId: string;
|
|
596
|
+
substationName?: string;
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
declare type MetaVoltageLevel = {
|
|
600
|
+
nominalVoltageIndex: number;
|
|
601
|
+
voltageLevels: MapVoltageLevel[];
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
declare type MetaVoltageLevelsByNominalVoltage = {
|
|
605
|
+
nominalV: number;
|
|
606
|
+
metaVoltageLevels: MetaVoltageLevel[];
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
declare type OperatingStatus = {
|
|
610
|
+
status: LineStatus_2;
|
|
611
|
+
printPosition: Position;
|
|
612
|
+
offset: [number, number];
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
export declare class SubstationLayer extends CompositeLayer<Required<_SubstationLayerProps>> {
|
|
616
|
+
static readonly layerName = "SubstationLayer";
|
|
617
|
+
static readonly defaultProps: DefaultProps<SubstationLayerProps>;
|
|
618
|
+
state: {
|
|
619
|
+
compositeData: unknown[];
|
|
620
|
+
substationsLabels: MapSubstation[];
|
|
621
|
+
metaVoltageLevelsByNominalVoltage: MetaVoltageLevelsByNominalVoltage[];
|
|
622
|
+
};
|
|
623
|
+
initializeState(context: LayerContext): void;
|
|
624
|
+
updateState({ props, oldProps, changeFlags }: UpdateParameters<this>): void;
|
|
625
|
+
renderLayers(): Layer<{}>[];
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
declare type SubstationLayerProps = _SubstationLayerProps & CompositeLayerProps;
|
|
629
|
+
|
|
630
|
+
declare type _SubstationLayerProps = {
|
|
631
|
+
data: MapSubstation[];
|
|
632
|
+
network: MapEquipments;
|
|
633
|
+
geoData: GeoData;
|
|
634
|
+
getNominalVoltageColor: (nominalV: number) => Color;
|
|
635
|
+
filteredNominalVoltages: number[] | null;
|
|
636
|
+
labelsVisible: boolean;
|
|
637
|
+
labelColor: Color;
|
|
638
|
+
labelSize: number;
|
|
639
|
+
getNameOrId: (infos: MapSubstation) => string | null;
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
declare type TemporaryLimits = {
|
|
643
|
+
name: string;
|
|
644
|
+
value: number;
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
export { }
|