@armyc2.c5isr.renderer/mil-sym-ts-web 2.2.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/LICENSE +201 -0
- package/README.md +57 -0
- package/buildNode.bat +2 -0
- package/buildWeb.bat +2 -0
- package/dist/C5Ren.d.ts +6970 -0
- package/dist/C5Ren.js +2 -0
- package/dist/C5Ren.js.map +1 -0
- package/dist/LICENSE +201 -0
- package/dist/README.md +57 -0
- package/dist/armyc2.c5isr.renderer-mil-sym-ts-web-2.2.0.tgz +0 -0
- package/dist/manifest.json +4 -0
- package/dist/package.json +16 -0
- package/index.ts +169 -0
- package/package.bak +50 -0
- package/package.json +40 -0
- package/package.node.json +43 -0
- package/package.pack.json +19 -0
- package/package.packWeb.json +16 -0
- package/package.web.json +40 -0
- package/src/main/ts/android/graphics/Bitmap.ts +7 -0
- package/src/main/ts/android/graphics/Paint.ts +26 -0
- package/src/main/ts/android/graphics/Path.ts +78 -0
- package/src/main/ts/android/graphics/PointF.ts +14 -0
- package/src/main/ts/android/graphics/Rect.ts +18 -0
- package/src/main/ts/android/graphics/RectF.ts +50 -0
- package/src/main/ts/android/graphics/Region.ts +36 -0
- package/src/main/ts/android/graphics/Typeface.ts +11 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/BasicShapes.ts +99 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/CChannelPoints2.ts +34 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/CELineArray.ts +193 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/Channels.ts +2971 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/DISMSupport.ts +4008 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/POINT2.ts +93 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/Shape2.ts +89 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/TacticalLines.ts +515 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/arraysupport.ts +5403 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/countsupport.ts +1084 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/flot.ts +2173 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/lineutility.ts +4934 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/ref.ts +7 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/Modifier2.ts +5601 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/P1.ts +14 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/TGLight.ts +648 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsChannelUtility.ts +647 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsMETOC.ts +2994 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsUtility.ts +2663 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/mdlGeodesic.ts +669 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsClipPolygon2.ts +971 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsClipQuad.ts +871 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsRenderer.ts +3507 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsRenderer2.ts +500 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtility.ts +1089 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtilityCPOF.ts +2656 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtilityGE.ts +1419 -0
- package/src/main/ts/armyc2/c5isr/data/genc.json +1407 -0
- package/src/main/ts/armyc2/c5isr/data/msd.json +17311 -0
- package/src/main/ts/armyc2/c5isr/data/mse.json +18500 -0
- package/src/main/ts/armyc2/c5isr/data/svgd.json +31214 -0
- package/src/main/ts/armyc2/c5isr/data/svge.json +30558 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/AffineTransform.ts +10 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Area.ts +437 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/BasicStroke.ts +429 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/BasicTypes.ts +7 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/BufferedImage.ts +35 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Font.ts +111 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/FontMetrics.ts +29 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/FontRenderContext.ts +18 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/GeneralPath.ts +211 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Graphics2D.ts +80 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/IPathIterator.ts +33 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/ImageIO.ts +16 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Line2D.ts +726 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/PathIterator.ts +141 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Point.ts +112 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Point2D.ts +261 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Polygon.ts +391 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Rectangle.ts +567 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Rectangle2D.ts +445 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Shape.ts +31 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Stroke.ts +18 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/TextLayout.ts +45 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/TexturePaint.ts +25 -0
- package/src/main/ts/armyc2/c5isr/renderer/IIconRenderer.ts +15 -0
- package/src/main/ts/armyc2/c5isr/renderer/IconRenderer.ts +22 -0
- package/src/main/ts/armyc2/c5isr/renderer/MilStdIconRenderer.ts +269 -0
- package/src/main/ts/armyc2/c5isr/renderer/ModifierRenderer.ts +9882 -0
- package/src/main/ts/armyc2/c5isr/renderer/PatternFillRenderer.ts +146 -0
- package/src/main/ts/armyc2/c5isr/renderer/SinglePointSVGRenderer.ts +1265 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/arc.ts +64 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/bcurve.ts +95 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/ellipse.ts +93 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/line.ts +114 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/path.ts +555 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/pathiterator.ts +62 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/point.ts +120 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/rectangle.ts +431 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/roundedrectangle.ts +99 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/types.ts +25 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/utilities.ts +203 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/AffiliationColors.ts +104 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/Color.ts +481 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/DistanceUnit.ts +40 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/DrawRules.ts +1323 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/EntityCode.ts +51 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/ErrorLogger.ts +736 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/GENCLookup.ts +106 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/GeoPixelConversion3D.ts +84 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/IMultiPointRenderer.ts +87 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/IPointConversion.ts +34 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/ImageInfo.ts +324 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/LRUCache.ts +127 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/LRUEntry.ts +18 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/LogLevel.ts +111 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MODrawRules.ts +219 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MSInfo.ts +1008 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MSLookup.ts +882 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MilStdAttributes.ts +380 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MilStdSymbol.ts +797 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/Modifiers.ts +1699 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConversion.ts +178 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConversionDummy.ts +45 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConverter3D.ts +126 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/RectUtilities.ts +118 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererException.ts +11 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererSettings.ts +1201 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererUtilities.ts +591 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGInfo.ts +29 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGLookup.ts +753 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGSymbolInfo.ts +137 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGTextInfo.ts +438 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsChangedEvent.ts +19 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsChangedEventListener.ts +10 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsEventListener.ts +5 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/Shape2SVG.ts +404 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/ShapeInfo.ts +525 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/ShapeUtilities.ts +55 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolDimensionInfo.ts +36 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolID.ts +1055 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolUtilities.ts +2085 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/TextInfo.ts +157 -0
- package/src/main/ts/armyc2/c5isr/web/render/GeoPixelConversion.ts +86 -0
- package/src/main/ts/armyc2/c5isr/web/render/MultiPointHandler.ts +3798 -0
- package/src/main/ts/armyc2/c5isr/web/render/MultiPointHandlerSVG.ts +412 -0
- package/src/main/ts/armyc2/c5isr/web/render/PointConverter.ts +124 -0
- package/src/main/ts/armyc2/c5isr/web/render/SymbolModifiers.ts +26 -0
- package/src/main/ts/armyc2/c5isr/web/render/WebRenderer.ts +677 -0
- package/src/main/ts/armyc2/c5isr/web/render/utilities/JavaRendererUtilities.ts +484 -0
- package/src/main/ts/armyc2/c5isr/web/render/utilities/LineInfo.ts +62 -0
- package/src/main/ts/armyc2/c5isr/web/render/utilities/SymbolInfo.ts +46 -0
- package/src/main/ts/armyc2/c5isr/web/render/utilities/TextInfo.ts +51 -0
- package/src/main/ts/org/gavaghan/geodesy/Angle.ts +31 -0
- package/src/main/ts/org/gavaghan/geodesy/Ellipsoid.ts +71 -0
- package/src/main/ts/org/gavaghan/geodesy/GeodeticCalculator.ts +200 -0
- package/src/main/ts/org/gavaghan/geodesy/GeodeticCurve.ts +55 -0
- package/src/main/ts/org/gavaghan/geodesy/GeodeticMeasurement.ts +68 -0
- package/src/main/ts/org/gavaghan/geodesy/GlobalCoordinates.ts +103 -0
- package/src/main/ts/org/gavaghan/geodesy/GlobalPosition.ts +90 -0
- package/test/ExportSPImages.js +692 -0
- package/test/MPWW.html +556 -0
- package/test/MPWorker.js +318 -0
- package/test/SPWorker.js +233 -0
- package/test/SVGWW.html +363 -0
- package/test/singlePointTester3.html +751 -0
- package/tsconfig.json +54 -0
- package/typedoc.json +30 -0
- package/updateVersion.js +21 -0
- package/webpack.config.js +34 -0
- package/webpackn.config.js +28 -0
- package/webpackr.config.js +47 -0
- package/webpackw.config.js +23 -0
|
@@ -0,0 +1,1008 @@
|
|
|
1
|
+
import { DrawRules } from "../../renderer/utilities/DrawRules"
|
|
2
|
+
import { MODrawRules } from "../../renderer/utilities/MODrawRules"
|
|
3
|
+
import { MSLookup } from "../../renderer/utilities/MSLookup"
|
|
4
|
+
import { SymbolID } from "../../renderer/utilities/SymbolID"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* This class holds information about the MilStd Symbol.
|
|
9
|
+
* Name, geometry, point count, Draw Rule, etc...
|
|
10
|
+
* Can be retrived from {@link MSLookup}.
|
|
11
|
+
*/
|
|
12
|
+
export class MSInfo {
|
|
13
|
+
|
|
14
|
+
private _Version: number = 0;
|
|
15
|
+
private _Name: string;
|
|
16
|
+
private _Path: string;
|
|
17
|
+
private _SymbolSet: string;
|
|
18
|
+
|
|
19
|
+
private _SymbolSetInt: number = 0;
|
|
20
|
+
private _EntityCode: string;
|
|
21
|
+
private _Geometry: string = "point";
|
|
22
|
+
private _Modifiers: Array<string>;
|
|
23
|
+
private _MinPointCount: number = 0;
|
|
24
|
+
private _MaxPointCount: number = 0;
|
|
25
|
+
private _DrawRule: number = 0;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @param version SymbolID.Version_2525Dch1 (11), SymbolID.Version_2525E (13)
|
|
29
|
+
* @param symbolSet the 5th & 6th character in the symbol Code, represents Battle Dimension
|
|
30
|
+
* @param entity descriptor
|
|
31
|
+
* @param entityType descriptor
|
|
32
|
+
* @param entitySubType descriptor
|
|
33
|
+
* @param entityCode characters 11 - 16 in the symbol code
|
|
34
|
+
* @param modifiers String[] of modifier codes
|
|
35
|
+
*/
|
|
36
|
+
public constructor(version: number, symbolSet: string, entity: string, entityType: string, entitySubType: string, entityCode: string, modifiers: Array<string>);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @param version SymbolID.Version_2525Dch1 (11), SymbolID.Version_2525E (13)
|
|
40
|
+
* @param symbolSet the 5th & 6th character in the symbol Code, represents Battle Dimension
|
|
41
|
+
* @param entity descriptor
|
|
42
|
+
* @param entityType descriptor
|
|
43
|
+
* @param entitySubType descriptor
|
|
44
|
+
* @param entityCode characters 11 - 16 in the symbol code
|
|
45
|
+
* @param geometry "point", "line", "area"
|
|
46
|
+
* @param drawRule as defined in 2525D for Control Measures and METOC (i.e. "Point1")
|
|
47
|
+
* @param modifiers ArrayList of modifiers that are allowed for this symbol
|
|
48
|
+
*/
|
|
49
|
+
public constructor(version: number, symbolSet: string, entity: string, entityType: string, entitySubType: string, entityCode: string, geometry: string, drawRule: string, modifiers: Array<string>);
|
|
50
|
+
public constructor(...args: unknown[]) {
|
|
51
|
+
switch (args.length) {
|
|
52
|
+
case 7: {
|
|
53
|
+
const [version, symbolSet, entity, entityType, entitySubType, entityCode, modifiers] = args as [number, string, string, string, string, string, Array<string>];
|
|
54
|
+
this._Version = version;
|
|
55
|
+
this._SymbolSetInt = parseInt(symbolSet);
|
|
56
|
+
this._SymbolSet = MSInfo.parseSymbolSetName(symbolSet, this._Version);
|
|
57
|
+
if (entitySubType != null && entitySubType !== "") {
|
|
58
|
+
this._Name = entitySubType;
|
|
59
|
+
this._Path = this._SymbolSet + " / " + entity + " / " + entityType + " / ";
|
|
60
|
+
}
|
|
61
|
+
if (entityType != null && entityType !== "") {
|
|
62
|
+
if (this._Name == null) {
|
|
63
|
+
this._Name = entityType;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (this._Path == null) {
|
|
67
|
+
|
|
68
|
+
this._Path = this._SymbolSet + " / " + entity + " / ";
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
if (entity != null && entity !== "") {
|
|
73
|
+
if (this._Name == null) {
|
|
74
|
+
|
|
75
|
+
this._Name = entity;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (this._Path == null) {
|
|
79
|
+
|
|
80
|
+
this._Path = this._SymbolSet + " / ";
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
if (entityCode != null && entityCode.length === 6) {
|
|
85
|
+
|
|
86
|
+
this._EntityCode = entityCode;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
this._Geometry = "point";
|
|
91
|
+
|
|
92
|
+
//Only Control Measures and METOC categories have draw rules so everything else shows up in here if we
|
|
93
|
+
//here if we don't check for them.
|
|
94
|
+
if (entityCode !== "000000" &&
|
|
95
|
+
!(this._SymbolSetInt === SymbolID.SymbolSet_ControlMeasure ||
|
|
96
|
+
this._SymbolSetInt === SymbolID.SymbolSet_Atmospheric ||
|
|
97
|
+
this._SymbolSetInt === SymbolID.SymbolSet_Oceanographic ||
|
|
98
|
+
this._SymbolSetInt === SymbolID.SymbolSet_MeteorologicalSpace)) {
|
|
99
|
+
this._DrawRule = DrawRules.POINT2;
|
|
100
|
+
this._MinPointCount = 1;
|
|
101
|
+
this._MaxPointCount = 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
this._Modifiers = modifiers;
|
|
106
|
+
/*if(getSymbolSetInt() != SymbolID.SymbolSet_ControlMeasure)
|
|
107
|
+
{//values come from files during MSLookup load for Control Measures
|
|
108
|
+
_Modifiers = populateModifierListD();
|
|
109
|
+
}*/
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
case 9: {
|
|
116
|
+
const [version, symbolSet, entity, entityType, entitySubType, entityCode, geometry, drawRule, modifiers] = args as [number, string, string, string, string, string, string, string, Array<string>];
|
|
117
|
+
this._Version = version;
|
|
118
|
+
this._SymbolSetInt = parseInt(symbolSet);
|
|
119
|
+
this._SymbolSet = MSInfo.parseSymbolSetName(symbolSet, this._Version);
|
|
120
|
+
if (entitySubType != null && entitySubType !== "") {
|
|
121
|
+
this._Name = entitySubType;
|
|
122
|
+
this._Path = this._SymbolSet + " / " + entity + " / " + entityType + " / ";
|
|
123
|
+
}
|
|
124
|
+
if (entityType != null && entityType !== "") {
|
|
125
|
+
if (this._Name == null) {
|
|
126
|
+
this._Name = entityType;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (this._Path == null) {
|
|
130
|
+
this._Path = this._SymbolSet + " / " + entity + " / ";
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
}
|
|
134
|
+
if (entity != null && entity !== "") {
|
|
135
|
+
if (this._Name == null) {
|
|
136
|
+
this._Name = entity;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (this._Path == null) {
|
|
140
|
+
this._Path = this._SymbolSet + " / ";
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
if (entityCode != null && entityCode.length === 6) {
|
|
145
|
+
this._EntityCode = entityCode;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
this._Geometry = geometry;
|
|
149
|
+
|
|
150
|
+
this._DrawRule = this.parseDrawRule(drawRule);
|
|
151
|
+
|
|
152
|
+
let pointCounts: number[] = [0, 0];
|
|
153
|
+
if (symbolSet === "25") {
|
|
154
|
+
pointCounts = MSInfo.getMinMaxPointsFromDrawRule(this._DrawRule, version);
|
|
155
|
+
}
|
|
156
|
+
else if (symbolSet === "45" || symbolSet === "46") {//Atmospheric, Oceanographic, Meteorological Space (last one has no symbols so not included)
|
|
157
|
+
pointCounts = MSInfo.getMinMaxPointsFromMODrawRule(this._DrawRule);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
this._MinPointCount = pointCounts[0];
|
|
161
|
+
this._MaxPointCount = pointCounts[1];
|
|
162
|
+
|
|
163
|
+
this._Modifiers = modifiers;
|
|
164
|
+
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
default: {
|
|
169
|
+
throw Error(`Invalid number of arguments`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
private parseDrawRule(drawRule: string): number {
|
|
176
|
+
let dr: string = drawRule.toLowerCase();
|
|
177
|
+
let idr: number = 0;
|
|
178
|
+
switch (dr) {
|
|
179
|
+
case "area1": {
|
|
180
|
+
idr = DrawRules.AREA1;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
case "area2": {
|
|
185
|
+
idr = DrawRules.AREA2;
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
case "area3": {
|
|
190
|
+
idr = DrawRules.AREA3;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
case "area4": {
|
|
195
|
+
idr = DrawRules.AREA4;
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
case "area5": {
|
|
200
|
+
idr = DrawRules.AREA5;
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
case "area6": {
|
|
205
|
+
idr = DrawRules.AREA6;
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
case "area7": {
|
|
210
|
+
idr = DrawRules.AREA7;
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
case "area8": {
|
|
215
|
+
idr = DrawRules.AREA8;
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
case "area9": {
|
|
220
|
+
idr = DrawRules.AREA9;
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
case "area10": {
|
|
225
|
+
idr = DrawRules.AREA10;
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
case "area11": {
|
|
230
|
+
idr = DrawRules.AREA11;
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
case "area12": {
|
|
235
|
+
idr = DrawRules.AREA12;
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
case "area13": {
|
|
240
|
+
idr = DrawRules.AREA13;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
case "area14": {
|
|
245
|
+
idr = DrawRules.AREA14;
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
case "area15": {
|
|
250
|
+
idr = DrawRules.AREA15;
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
case "area16": {
|
|
255
|
+
idr = DrawRules.AREA16;
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
case "area17": {
|
|
260
|
+
idr = DrawRules.AREA17;
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
case "area18": {
|
|
265
|
+
idr = DrawRules.AREA18;
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
case "area19": {
|
|
270
|
+
idr = DrawRules.AREA19;
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
case "area20": {
|
|
275
|
+
idr = DrawRules.AREA20;
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
case "area21": {
|
|
280
|
+
idr = DrawRules.AREA21;
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
case "area22": {
|
|
285
|
+
idr = DrawRules.AREA22;
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
case "area23": {
|
|
290
|
+
idr = DrawRules.AREA23;
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
case "area24": {
|
|
295
|
+
idr = DrawRules.AREA24;
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
case "area25": {
|
|
300
|
+
idr = DrawRules.AREA25;
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
case "area26": {
|
|
305
|
+
idr = DrawRules.AREA26;
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
case "point1": {
|
|
310
|
+
idr = DrawRules.POINT1;
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
case "point2": {
|
|
315
|
+
idr = DrawRules.POINT2;
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
case "point3": {
|
|
320
|
+
idr = DrawRules.POINT3;
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
case "point4": {
|
|
325
|
+
idr = DrawRules.POINT4;
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
case "point5": {
|
|
330
|
+
idr = DrawRules.POINT5;
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
case "point6": {
|
|
335
|
+
idr = DrawRules.POINT6;
|
|
336
|
+
break;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
case "point7": {
|
|
340
|
+
idr = DrawRules.POINT7;
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
case "point8": {
|
|
345
|
+
idr = DrawRules.POINT8;
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
case "point9": {
|
|
350
|
+
idr = DrawRules.POINT9;
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
case "point10": {
|
|
355
|
+
idr = DrawRules.POINT10;
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
case "point11": {
|
|
360
|
+
idr = DrawRules.POINT11;
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
case "point12": {
|
|
365
|
+
idr = DrawRules.POINT12;
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
case "point13": {
|
|
370
|
+
idr = DrawRules.POINT13;
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
case "point14": {
|
|
375
|
+
idr = DrawRules.POINT14;
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
case "point15": {
|
|
380
|
+
idr = DrawRules.POINT15;
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
case "point16": {
|
|
385
|
+
idr = DrawRules.POINT16;
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
case "point17": {
|
|
390
|
+
idr = DrawRules.POINT17;
|
|
391
|
+
break;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
case "point18": {
|
|
395
|
+
idr = DrawRules.POINT18;
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
case "line1": {
|
|
400
|
+
idr = DrawRules.LINE1;
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
case "line2": {
|
|
405
|
+
idr = DrawRules.LINE2;
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
case "line3": {
|
|
410
|
+
idr = DrawRules.LINE3;
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
case "line4": {
|
|
415
|
+
idr = DrawRules.LINE4;
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
case "line5": {
|
|
420
|
+
idr = DrawRules.LINE5;
|
|
421
|
+
break;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
case "line6": {
|
|
425
|
+
idr = DrawRules.LINE6;
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
case "line7": {
|
|
430
|
+
idr = DrawRules.LINE7;
|
|
431
|
+
break;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
case "line8": {
|
|
435
|
+
idr = DrawRules.LINE8;
|
|
436
|
+
break;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
case "line9": {
|
|
440
|
+
idr = DrawRules.LINE9;
|
|
441
|
+
break;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
case "line10": {
|
|
445
|
+
idr = DrawRules.LINE10;
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
case "line11": {
|
|
450
|
+
idr = DrawRules.LINE11;
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
case "line12": {
|
|
455
|
+
idr = DrawRules.LINE12;
|
|
456
|
+
break;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
case "line13": {
|
|
460
|
+
idr = DrawRules.LINE13;
|
|
461
|
+
break;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
case "line14": {
|
|
465
|
+
idr = DrawRules.LINE14;
|
|
466
|
+
break;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
case "line16": {
|
|
470
|
+
idr = DrawRules.LINE16;
|
|
471
|
+
break;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
case "line17": {
|
|
475
|
+
idr = DrawRules.LINE17;
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
case "line18": {
|
|
480
|
+
idr = DrawRules.LINE18;
|
|
481
|
+
break;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
case "line19": {
|
|
485
|
+
idr = DrawRules.LINE19;
|
|
486
|
+
break;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
case "line20": {
|
|
490
|
+
idr = DrawRules.LINE20;
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
case "line21": {
|
|
495
|
+
idr = DrawRules.LINE21;
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
case "line22": {
|
|
500
|
+
idr = DrawRules.LINE22;
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
case "line23": {
|
|
505
|
+
idr = DrawRules.LINE23;
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
case "line24": {
|
|
510
|
+
idr = DrawRules.LINE24;
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
case "line25": {
|
|
515
|
+
idr = DrawRules.LINE25;
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
case "line26": {
|
|
520
|
+
idr = DrawRules.LINE26;
|
|
521
|
+
break;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
case "line27": {
|
|
525
|
+
idr = DrawRules.LINE27;
|
|
526
|
+
break;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
case "line28": {
|
|
530
|
+
idr = DrawRules.LINE28;
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
case "line29": {
|
|
535
|
+
idr = DrawRules.LINE29;
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
case "corridor1": {
|
|
540
|
+
idr = DrawRules.CORRIDOR1;
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
case "axis1": {
|
|
545
|
+
idr = DrawRules.AXIS1;
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
case "axis2": {
|
|
550
|
+
idr = DrawRules.AXIS2;
|
|
551
|
+
break;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
case "polyline1": {
|
|
555
|
+
idr = DrawRules.POLYLINE1;
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
case "ellipse1": {
|
|
560
|
+
idr = DrawRules.ELLIPSE1;
|
|
561
|
+
break;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
case "rectangular1": {
|
|
565
|
+
idr = DrawRules.RECTANGULAR1;
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
case "rectangular2": {
|
|
570
|
+
idr = DrawRules.RECTANGULAR2;
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
case "rectangular3": {
|
|
575
|
+
idr = DrawRules.RECTANGULAR3;
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
case "circular1": {
|
|
580
|
+
idr = DrawRules.CIRCULAR1;
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
case "circular2": {
|
|
585
|
+
idr = DrawRules.CIRCULAR2;
|
|
586
|
+
break;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
case "arc1": {
|
|
590
|
+
idr = DrawRules.ARC1;
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
case "":
|
|
594
|
+
default: {
|
|
595
|
+
idr = DrawRules.DONOTDRAW;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
}
|
|
599
|
+
return idr;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
public static parseSymbolSetName(symbolID: string): string;
|
|
603
|
+
public static parseSymbolSetName(ss: string, version: number): string;
|
|
604
|
+
public static parseSymbolSetName(...args: unknown[]): string {
|
|
605
|
+
switch (args.length) {
|
|
606
|
+
case 1: {
|
|
607
|
+
const [symbolID] = args as [string];
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
return MSInfo.parseSymbolSetName(symbolID.substring(4, 6), SymbolID.getVersion(symbolID));
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
case 2: {
|
|
617
|
+
const [ss, version] = args as [string, number];
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
let name: string;
|
|
621
|
+
switch (ss) {
|
|
622
|
+
case "01": {
|
|
623
|
+
name = "Air";
|
|
624
|
+
break;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
case "02": {
|
|
628
|
+
name = "Air Missile";
|
|
629
|
+
break;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
case "05": {
|
|
633
|
+
name = "Space";
|
|
634
|
+
break;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
case "06": {
|
|
638
|
+
name = "Space Missile";
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
case "10": {
|
|
643
|
+
name = "Land Unit";
|
|
644
|
+
break;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
case "11": {
|
|
648
|
+
name = "Land Civilian Unit-Org";
|
|
649
|
+
break;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
case "15": {
|
|
653
|
+
name = "Land Equipment";
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
case "20": {
|
|
658
|
+
name = "Land Installations";
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
case "25": {
|
|
663
|
+
name = "Control Measure";
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
case "27": {
|
|
668
|
+
name = "Dismounted Individuals";
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
case "30": {
|
|
673
|
+
name = "Sea Surface";
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
case "35": {
|
|
678
|
+
name = "Sea Subsurface";
|
|
679
|
+
break;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
case "36": {
|
|
683
|
+
name = "Mine Warfare";
|
|
684
|
+
break;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
case "40": {
|
|
688
|
+
name = "Activities";
|
|
689
|
+
break;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
case "45": {
|
|
693
|
+
name = "Atmospheric";
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
case "46": {
|
|
698
|
+
name = "Oceanographic";
|
|
699
|
+
break;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
case "47": {
|
|
703
|
+
name = "Meteorological Space";
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
case "50": {
|
|
708
|
+
if (version < SymbolID.Version_2525E) {
|
|
709
|
+
|
|
710
|
+
name = "Space SIGINT";
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
else {
|
|
714
|
+
|
|
715
|
+
name = "SIGINT";
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
case "51": {
|
|
722
|
+
name = "Air SIGINT";
|
|
723
|
+
break;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
case "52": {
|
|
727
|
+
name = "Land SIGINT";
|
|
728
|
+
break;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
case "53": {
|
|
732
|
+
name = "Sea Surface SIGINT";
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
case "54": {
|
|
737
|
+
name = "Sea Subsurface SIGINT";
|
|
738
|
+
break;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
case "60": {
|
|
742
|
+
name = "Cyberspace";
|
|
743
|
+
break;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
default: {
|
|
747
|
+
name = "UNKNOWN";
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
}
|
|
751
|
+
return name;
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
break;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
default: {
|
|
758
|
+
throw Error(`Invalid number of arguments`);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
*
|
|
766
|
+
* @param drawRule - Like DrawRules.CIRCULAR2
|
|
767
|
+
* @return int[] where the first index is the minimum required points and
|
|
768
|
+
* the next index is the maximum allowed points
|
|
769
|
+
*/
|
|
770
|
+
private static getMinMaxPointsFromDrawRule(drawRule: number, version: number): number[] {
|
|
771
|
+
let points: number[] = [1, 1];
|
|
772
|
+
|
|
773
|
+
switch (drawRule) {
|
|
774
|
+
case DrawRules.AREA1:
|
|
775
|
+
case DrawRules.AREA2:
|
|
776
|
+
case DrawRules.AREA3:
|
|
777
|
+
case DrawRules.AREA4:
|
|
778
|
+
case DrawRules.AREA9:
|
|
779
|
+
case DrawRules.AREA20:
|
|
780
|
+
case DrawRules.AREA23: {
|
|
781
|
+
points[0] = 3;
|
|
782
|
+
points[1] = Number.MAX_VALUE;
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
case DrawRules.AREA5:
|
|
787
|
+
case DrawRules.AREA7:
|
|
788
|
+
case DrawRules.AREA11:
|
|
789
|
+
case DrawRules.AREA12:
|
|
790
|
+
case DrawRules.AREA17:
|
|
791
|
+
case DrawRules.AREA21:
|
|
792
|
+
case DrawRules.AREA24:
|
|
793
|
+
case DrawRules.AREA25:
|
|
794
|
+
case DrawRules.POINT12:
|
|
795
|
+
case DrawRules.LINE3:
|
|
796
|
+
case DrawRules.LINE6://doesn't seem to be used
|
|
797
|
+
case DrawRules.LINE10:
|
|
798
|
+
case DrawRules.LINE12:
|
|
799
|
+
case DrawRules.LINE17:
|
|
800
|
+
case DrawRules.LINE22:
|
|
801
|
+
case DrawRules.LINE23:
|
|
802
|
+
case DrawRules.LINE24:
|
|
803
|
+
case DrawRules.LINE29://Ambush
|
|
804
|
+
case DrawRules.POLYLINE1: {
|
|
805
|
+
points[0] = 3;
|
|
806
|
+
points[1] = 3;
|
|
807
|
+
break;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
case DrawRules.AREA6:
|
|
811
|
+
case DrawRules.AREA13:
|
|
812
|
+
case DrawRules.AREA15:
|
|
813
|
+
case DrawRules.AREA16:
|
|
814
|
+
case DrawRules.AREA19:
|
|
815
|
+
case DrawRules.LINE4:
|
|
816
|
+
case DrawRules.LINE5:
|
|
817
|
+
case DrawRules.LINE9:
|
|
818
|
+
case DrawRules.LINE14:
|
|
819
|
+
case DrawRules.LINE18:
|
|
820
|
+
case DrawRules.LINE19:
|
|
821
|
+
case DrawRules.LINE20:
|
|
822
|
+
case DrawRules.LINE25:
|
|
823
|
+
case DrawRules.LINE28:
|
|
824
|
+
case DrawRules.RECTANGULAR1://requires AM
|
|
825
|
+
case DrawRules.RECTANGULAR3: {//requires AM
|
|
826
|
+
points[0] = 2;
|
|
827
|
+
points[1] = 2;
|
|
828
|
+
break;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
case DrawRules.AREA8:
|
|
832
|
+
case DrawRules.AREA18:
|
|
833
|
+
case DrawRules.LINE11:
|
|
834
|
+
case DrawRules.LINE16: {
|
|
835
|
+
points[0] = 4;
|
|
836
|
+
points[1] = 4;
|
|
837
|
+
break;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
case DrawRules.AREA10: {
|
|
841
|
+
points[0] = 3;
|
|
842
|
+
points[1] = 6;
|
|
843
|
+
break;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
case DrawRules.AREA14: {
|
|
847
|
+
points[0] = 3;
|
|
848
|
+
if (version == SymbolID.Version_2525D)
|
|
849
|
+
points[1] = 4;
|
|
850
|
+
else
|
|
851
|
+
points[1] = 3;
|
|
852
|
+
break;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
case DrawRules.LINE1:
|
|
856
|
+
case DrawRules.LINE2:
|
|
857
|
+
case DrawRules.LINE7:
|
|
858
|
+
case DrawRules.LINE13:
|
|
859
|
+
case DrawRules.LINE21:
|
|
860
|
+
case DrawRules.CORRIDOR1: {//Airspace Control Corridors
|
|
861
|
+
points[0] = 2;
|
|
862
|
+
points[1] = Number.MAX_VALUE;
|
|
863
|
+
break;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
case DrawRules.AREA26: {
|
|
867
|
+
//Min 6, no Max but number of points has to be even
|
|
868
|
+
points[0] = 6;
|
|
869
|
+
points[1] = Number.MAX_VALUE;
|
|
870
|
+
break;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
case DrawRules.LINE8: {
|
|
874
|
+
points[0] = 2;
|
|
875
|
+
points[1] = 300;
|
|
876
|
+
break;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
case DrawRules.LINE26:
|
|
880
|
+
case DrawRules.LINE27: {
|
|
881
|
+
if (version >= SymbolID.Version_2525E) {
|
|
882
|
+
|
|
883
|
+
points[0] = 4;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
else {
|
|
887
|
+
|
|
888
|
+
points[0] = 3;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
points[1] = 4;
|
|
892
|
+
break;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
case DrawRules.AXIS1:
|
|
896
|
+
case DrawRules.AXIS2: {
|
|
897
|
+
points[0] = 3;
|
|
898
|
+
points[1] = 50;
|
|
899
|
+
break;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
case 0: {//do not draw
|
|
903
|
+
points[0] = 0;
|
|
904
|
+
points[1] = 0;
|
|
905
|
+
break;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
//Rest are single points
|
|
909
|
+
case DrawRules.AREA22://Basic Defense Zone (BDZ) requires AM for radius
|
|
910
|
+
case DrawRules.POINT17://requires AM & AM1
|
|
911
|
+
case DrawRules.POINT18://requires AM & AN values
|
|
912
|
+
case DrawRules.ELLIPSE1://required AM, AM1, AN
|
|
913
|
+
case DrawRules.RECTANGULAR2://requires AM, AM1, AN
|
|
914
|
+
default:
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
return points;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
private static getMinMaxPointsFromMODrawRule(drawRule: number): number[] {
|
|
921
|
+
let points: number[] = [1, 1];
|
|
922
|
+
|
|
923
|
+
switch (drawRule) {
|
|
924
|
+
case MODrawRules.AREA1:
|
|
925
|
+
case MODrawRules.AREA2:
|
|
926
|
+
case MODrawRules.LINE5: {
|
|
927
|
+
points[0] = 3;
|
|
928
|
+
points[1] = Number.MAX_VALUE;
|
|
929
|
+
break;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
case MODrawRules.POINT5:
|
|
933
|
+
case MODrawRules.LINE1:
|
|
934
|
+
case MODrawRules.LINE2:
|
|
935
|
+
case MODrawRules.LINE3:
|
|
936
|
+
case MODrawRules.LINE4:
|
|
937
|
+
case MODrawRules.LINE6:
|
|
938
|
+
case MODrawRules.LINE7:
|
|
939
|
+
case MODrawRules.LINE8: {
|
|
940
|
+
points[0] = 2;
|
|
941
|
+
points[1] = Number.MAX_VALUE;
|
|
942
|
+
break;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
case 0: {//do not draw
|
|
946
|
+
points[0] = 0;
|
|
947
|
+
points[1] = 0;
|
|
948
|
+
break;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
//Rest are single points
|
|
952
|
+
default:
|
|
953
|
+
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
return points;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
public getVersion(): number {
|
|
960
|
+
return this._Version;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
public getName(): string {
|
|
964
|
+
return this._Name;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
public getPath(): string {
|
|
968
|
+
return this._Path;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
public getGeometry(): string {
|
|
972
|
+
return this._Geometry;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
public getDrawRule(): number {
|
|
976
|
+
return this._DrawRule;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
public getSymbolSet(): number {
|
|
980
|
+
return this._SymbolSetInt;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
public getEntityCode(): number {
|
|
984
|
+
return Number.parseInt(this._EntityCode);
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
public getBasicSymbolID(): string
|
|
988
|
+
{
|
|
989
|
+
if(this._SymbolSetInt < 10)
|
|
990
|
+
return "0" + this._SymbolSetInt + this._EntityCode;
|
|
991
|
+
else
|
|
992
|
+
return "" + this._SymbolSetInt + this._EntityCode;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
public getMinPointCount(): number {
|
|
996
|
+
return this._MinPointCount;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
public getMaxPointCount(): number {
|
|
1000
|
+
return this._MaxPointCount;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
public getModifiers(): Array<string> {
|
|
1004
|
+
return this._Modifiers;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
}
|