@itwin/core-common 5.2.0-dev.5 → 5.2.0-dev.8
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/CHANGELOG.md +8 -1
- package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
- package/lib/cjs/AnalysisStyle.js +2 -0
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/BlobReader.d.ts.map +1 -1
- package/lib/cjs/BlobReader.js +10 -2
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/FeatureIndex.d.ts.map +1 -1
- package/lib/cjs/FeatureIndex.js +2 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/GeometryParams.d.ts.map +1 -1
- package/lib/cjs/GeometryParams.js +6 -0
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/Gradient.d.ts.map +1 -1
- package/lib/cjs/Gradient.js +5 -0
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/HiddenLine.d.ts.map +1 -1
- package/lib/cjs/HiddenLine.js +4 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/IModel.d.ts.map +1 -1
- package/lib/cjs/IModel.js +7 -7
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/Localization.d.ts.map +1 -1
- package/lib/cjs/Localization.js +3 -0
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/TextureMapping.js +2 -2
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/ThematicDisplay.d.ts.map +1 -1
- package/lib/cjs/ThematicDisplay.js +3 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Tween.d.ts +1 -1
- package/lib/cjs/Tween.d.ts.map +1 -1
- package/lib/cjs/Tween.js +4 -2
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.d.ts.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js +1 -0
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.d.ts.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js +13 -0
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js +7 -0
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js +19 -10
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.d.ts.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js +1 -0
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.d.ts.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js +7 -0
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.d.ts.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js +2 -2
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.d.ts.map +1 -1
- package/lib/cjs/geometry/LineStyle.js +3 -0
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.d.ts.map +1 -1
- package/lib/cjs/geometry/Placement.js +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.d.ts +0 -3
- package/lib/cjs/rpc/core/RpcConfiguration.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js +10 -2
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/AnalysisStyle.d.ts.map +1 -1
- package/lib/esm/AnalysisStyle.js +2 -0
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/BlobReader.d.ts.map +1 -1
- package/lib/esm/BlobReader.js +10 -2
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/esm/DisplayStyleSettings.js +2 -2
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlTypes.js +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/FeatureIndex.d.ts.map +1 -1
- package/lib/esm/FeatureIndex.js +2 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/GeometryParams.d.ts.map +1 -1
- package/lib/esm/GeometryParams.js +6 -0
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/Gradient.d.ts.map +1 -1
- package/lib/esm/Gradient.js +5 -0
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/HiddenLine.d.ts.map +1 -1
- package/lib/esm/HiddenLine.js +4 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/IModel.d.ts.map +1 -1
- package/lib/esm/IModel.js +8 -8
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/Localization.d.ts.map +1 -1
- package/lib/esm/Localization.js +3 -0
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/TextureMapping.js +3 -3
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/ThematicDisplay.d.ts.map +1 -1
- package/lib/esm/ThematicDisplay.js +3 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Tween.d.ts +1 -1
- package/lib/esm/Tween.d.ts.map +1 -1
- package/lib/esm/Tween.js +4 -2
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.d.ts.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js +1 -0
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.d.ts.map +1 -1
- package/lib/esm/geometry/AreaPattern.js +13 -0
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js +7 -0
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js +20 -11
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.d.ts.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js +1 -0
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.d.ts.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js +7 -0
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.d.ts.map +1 -1
- package/lib/esm/geometry/GeometryStream.js +3 -3
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/LineStyle.d.ts.map +1 -1
- package/lib/esm/geometry/LineStyle.js +3 -0
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.d.ts.map +1 -1
- package/lib/esm/geometry/Placement.js +2 -2
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js +2 -2
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.d.ts +0 -3
- package/lib/esm/rpc/core/RpcConfiguration.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js +10 -2
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js +2 -2
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/package.json +6 -6
|
@@ -88,54 +88,67 @@ export var AreaPattern;
|
|
|
88
88
|
return false;
|
|
89
89
|
if ((this.color === undefined) !== (other.color === undefined))
|
|
90
90
|
return false;
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
91
92
|
if (this.color && !this.color.equals(other.color))
|
|
92
93
|
return false;
|
|
93
94
|
if ((this.angle1 === undefined) !== (other.angle1 === undefined))
|
|
94
95
|
return false;
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
95
97
|
if (this.angle1 && !this.angle1.isAlmostEqualNoPeriodShift(other.angle1))
|
|
96
98
|
return false;
|
|
97
99
|
if ((this.angle2 === undefined) !== (other.angle2 === undefined))
|
|
98
100
|
return false;
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
99
102
|
if (this.angle2 && !this.angle2.isAlmostEqualNoPeriodShift(other.angle2))
|
|
100
103
|
return false;
|
|
101
104
|
if ((this.origin === undefined) !== (other.origin === undefined))
|
|
102
105
|
return false;
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
103
107
|
if (this.origin && !this.origin.isAlmostEqual(other.origin))
|
|
104
108
|
return false;
|
|
105
109
|
if ((this.rotation === undefined) !== (other.rotation === undefined))
|
|
106
110
|
return false;
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
107
112
|
if (this.rotation && !this.rotation.isAlmostEqual(other.rotation))
|
|
108
113
|
return false;
|
|
109
114
|
if ((this.symbolId === undefined) !== (other.symbolId === undefined))
|
|
110
115
|
return false;
|
|
116
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
111
117
|
if (this.symbolId && !(this.symbolId === other.symbolId))
|
|
112
118
|
return false;
|
|
113
119
|
if ((this.defLines === undefined) !== (other.defLines === undefined))
|
|
114
120
|
return false;
|
|
115
121
|
if (this.defLines) {
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
116
123
|
if (this.defLines.length !== other.defLines.length)
|
|
117
124
|
return false;
|
|
118
125
|
for (let i = 0; i < this.defLines.length; ++i) {
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
119
127
|
const otherLine = other.defLines[i];
|
|
120
128
|
const thisLine = this.defLines[i];
|
|
121
129
|
if ((thisLine.angle === undefined) !== (otherLine.angle === undefined))
|
|
122
130
|
return false;
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
123
132
|
if (thisLine.angle && !thisLine.angle.isAlmostEqualNoPeriodShift(otherLine.angle))
|
|
124
133
|
return false;
|
|
125
134
|
if ((thisLine.through === undefined) !== (otherLine.through === undefined))
|
|
126
135
|
return false;
|
|
136
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
127
137
|
if (thisLine.through && !thisLine.through.isAlmostEqual(otherLine.through))
|
|
128
138
|
return false;
|
|
129
139
|
if ((thisLine.offset === undefined) !== (otherLine.offset === undefined))
|
|
130
140
|
return false;
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
131
142
|
if (thisLine.offset && !thisLine.offset.isAlmostEqual(otherLine.offset))
|
|
132
143
|
return false;
|
|
133
144
|
if ((thisLine.dashes === undefined) !== (otherLine.dashes === undefined))
|
|
134
145
|
return false;
|
|
146
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
135
147
|
if (thisLine.dashes && thisLine.dashes.length !== otherLine.dashes.length)
|
|
136
148
|
return false;
|
|
137
149
|
if (thisLine.dashes) {
|
|
138
150
|
for (let dash = 0; dash < thisLine.dashes.length; ++dash) {
|
|
151
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
139
152
|
if (!Geometry.isSameCoordinate(thisLine.dashes[dash], otherLine.dashes[dash]))
|
|
140
153
|
return false;
|
|
141
154
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaPattern.js","sourceRoot":"","sources":["../../../src/geometry/AreaPattern.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,KAAK,EAAc,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAgC,kBAAkB,GAC1G,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAiB,MAAM,aAAa,CAAC;AAEtD,cAAc;AACd,MAAM,KAAW,WAAW,CA0Q3B;AA1QD,WAAiB,WAAW;IAa1B,MAAa,YAAY;QAChB,KAAK,CAAS;QACd,OAAO,CAAW;QAClB,MAAM,CAAW;QACjB,MAAM,CAAY;QAEzB,YAAmB,IAAuB;YACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CA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M,CAAC,qBAAqB,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC7F,CAAC;YAED,MAAM,GAAG,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAC3C,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACxD,MAAM,UAAU,GAAG,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;YAC7D,IAAI,CAAC,UAAU;gBACb,OAAO,KAAK,CAAC;YACf,MAAM,WAAW,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;YACtE,IAAI,SAAS,KAAK,WAAW;gBAC3B,OAAO,KAAK,CAAC;YACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC;KACF;IAzMY,kBAAM,SAyMlB,CAAA;AACH,CAAC,EA1QgB,WAAW,KAAX,WAAW,QA0Q3B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport {\n Angle, AngleProps, Geometry, Matrix3d, Point2d, Point3d, Transform, XYProps, XYZProps, YawPitchRollAngles, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\n\n/** @public */\nexport namespace AreaPattern {\n /** Single hatch line definition */\n export interface HatchDefLineProps {\n /** Angle of hatch line, 0.0 if undefined */\n angle?: AngleProps;\n /** Origin point (relative to placement) the hatch passes through, 0.0,0.0 if undefined */\n through?: XYProps;\n /** Offset of successive lines. X offset staggers dashes (ignored for solid lines) and Y offset controls the distance between both solid and dashed lines, 0.0,0.0 if undefined */\n offset?: XYProps;\n /** Array of gap and dash lengths for creating non-solid hatch lines, max of 20. A positive value denotes dash, a negative value a gap, solid line if undefined */\n dashes?: number[];\n }\n\n export class HatchDefLine implements HatchDefLineProps {\n public angle?: Angle;\n public through?: Point2d;\n public offset?: Point2d;\n public dashes?: number[];\n\n public constructor(json: HatchDefLineProps) {\n this.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n this.through = json.through ? Point2d.fromJSON(json.through) : undefined;\n this.offset = json.offset ? Point2d.fromJSON(json.offset) : undefined;\n if (json.dashes) {\n const dashes: number[] = [];\n json.dashes.forEach((dash) => dashes.push(dash));\n this.dashes = dashes;\n }\n }\n }\n\n /** Definition of a hatch, cross-hatch, or area pattern that can be applied to the interior of a planar region.\n * @see [[GeometryStreamEntryProps]]\n */\n export interface ParamsProps {\n /** Pattern offset (relative to placement), 0.0,0.0,0.0 if undefined */\n origin?: XYZProps;\n /** Pattern orientation (relative to placement), 0.0,0.0,0.0 if undefined */\n rotation?: YawPitchRollProps;\n /** Spacing of first set of parallel lines in a hatch pattern, or row spacing between area pattern tiles, 0.0 if undefined */\n space1?: number;\n /** Spacing of second set of parallel lines in a cross-hatch (leave undefined or 0 for a hatch), or column spacing between area pattern tiles, 0.0 if undefined */\n space2?: number;\n /** Angle of first set of parallel lines in a hatch pattern or area pattern tile direction, 0.0 if undefined */\n angle1?: AngleProps;\n /** Angle of second set of parallel lines in a cross-hatch, 0.0 if undefined */\n angle2?: AngleProps;\n /** Scale to apply to area pattern symbol, 1.0 if undefined */\n scale?: number;\n /** Pattern color, leave undefined to inherit color from parent element. For area patterns, does not override explicit colors stored in symbol */\n color?: ColorDefProps;\n /** Pattern weight, leave undefined to inherit weight from parent element. For area patterns, does not override explicit weights stored in symbol */\n weight?: number;\n /** Set to inhibit display of pattern boundary, not applicable when boundary is also filled, false if undefined */\n invisibleBoundary?: boolean;\n /** Set to allow snapping to pattern geometry, false if undefined */\n snappable?: boolean;\n /** [[GeometryPart]] id to use for tiled area pattern display */\n symbolId?: Id64String;\n /** Define an area pattern by supplying hatch line definitions instead of using a [[GeometryPart]] */\n defLines?: HatchDefLineProps[];\n }\n\n /** Defines a hatch, cross hatch, or area pattern. */\n export class Params {\n public origin?: Point3d;\n public rotation?: YawPitchRollAngles;\n public space1?: number;\n public space2?: number;\n public angle1?: Angle;\n public angle2?: Angle;\n public scale?: number;\n public color?: ColorDef;\n public weight?: number;\n public invisibleBoundary?: boolean;\n public snappable?: boolean;\n public symbolId?: Id64String;\n public defLines?: HatchDefLine[];\n\n /** create an AreaPattern.Params from a json object. */\n public static fromJSON(json?: ParamsProps) {\n const result = new Params();\n if (!json)\n return result;\n result.origin = json.origin ? Point3d.fromJSON(json.origin) : undefined;\n result.rotation = json.rotation ? YawPitchRollAngles.fromJSON(json.rotation) : undefined;\n result.space1 = json.space1;\n result.space2 = json.space2;\n result.angle1 = json.angle1 ? Angle.fromJSON(json.angle1) : undefined;\n result.angle2 = json.angle2 ? Angle.fromJSON(json.angle2) : undefined;\n result.scale = json.scale;\n result.color = json.color ? ColorDef.fromJSON(json.color) : undefined;\n result.weight = json.weight;\n result.invisibleBoundary = json.invisibleBoundary;\n result.snappable = json.snappable;\n result.symbolId = json.symbolId ? Id64.fromJSON(json.symbolId) : undefined;\n if (!json.defLines)\n return result;\n const defLines: HatchDefLine[] = [];\n json.defLines.forEach((defLine) => defLines.push(new HatchDefLine(defLine)));\n result.defLines = defLines;\n return result;\n }\n\n public toJSON(): ParamsProps {\n return {\n ...this,\n color: this.color?.toJSON(),\n };\n }\n\n public clone(): Params {\n return Params.fromJSON(this.toJSON());\n }\n\n public equals(other: Params): boolean {\n if (this === other)\n return true; // Same pointer\n\n if (this.scale !== other.scale ||\n this.space1 !== other.space1 ||\n this.space2 !== other.space2 ||\n this.weight !== other.weight ||\n this.invisibleBoundary !== other.invisibleBoundary ||\n this.snappable !== other.snappable)\n return false;\n\n if ((this.color === undefined) !== (other.color === undefined))\n return false;\n if (this.color && !this.color.equals(other.color!))\n return false;\n\n if ((this.angle1 === undefined) !== (other.angle1 === undefined))\n return false;\n if (this.angle1 && !this.angle1.isAlmostEqualNoPeriodShift(other.angle1!))\n return false;\n\n if ((this.angle2 === undefined) !== (other.angle2 === undefined))\n return false;\n if (this.angle2 && !this.angle2.isAlmostEqualNoPeriodShift(other.angle2!))\n return false;\n\n if ((this.origin === undefined) !== (other.origin === undefined))\n return false;\n if (this.origin && !this.origin.isAlmostEqual(other.origin!))\n return false;\n\n if ((this.rotation === undefined) !== (other.rotation === undefined))\n return false;\n if (this.rotation && !this.rotation.isAlmostEqual(other.rotation!))\n return false;\n\n if ((this.symbolId === undefined) !== (other.symbolId === undefined))\n return false;\n if (this.symbolId && !(this.symbolId === other.symbolId!))\n return false;\n\n if ((this.defLines === undefined) !== (other.defLines === undefined))\n return false;\n if (this.defLines) {\n if (this.defLines.length !== other.defLines!.length)\n return false;\n\n for (let i = 0; i < this.defLines.length; ++i) {\n const otherLine = other.defLines![i];\n const thisLine = this.defLines[i];\n\n if ((thisLine.angle === undefined) !== (otherLine.angle === undefined))\n return false;\n if (thisLine.angle && !thisLine.angle.isAlmostEqualNoPeriodShift(otherLine.angle!))\n return false;\n\n if ((thisLine.through === undefined) !== (otherLine.through === undefined))\n return false;\n if (thisLine.through && !thisLine.through.isAlmostEqual(otherLine.through!))\n return false;\n\n if ((thisLine.offset === undefined) !== (otherLine.offset === undefined))\n return false;\n if (thisLine.offset && !thisLine.offset.isAlmostEqual(otherLine.offset!))\n return false;\n\n if ((thisLine.dashes === undefined) !== (otherLine.dashes === undefined))\n return false;\n if (thisLine.dashes && thisLine.dashes.length !== otherLine.dashes!.length)\n return false;\n if (thisLine.dashes) {\n for (let dash = 0; dash < thisLine.dashes.length; ++dash) {\n if (!Geometry.isSameCoordinate(thisLine.dashes[dash], otherLine.dashes![dash]))\n return false;\n }\n }\n }\n }\n return true;\n }\n\n public static transformPatternSpace(transform: Transform, oldSpace: number, patRot: Matrix3d, angle?: Angle): number {\n let tmpRot: Matrix3d;\n if (angle && !angle.isAlmostZero) {\n const yprTriple = new YawPitchRollAngles(angle);\n const angRot = yprTriple.toMatrix3d();\n tmpRot = patRot.multiplyMatrixMatrix(angRot);\n } else {\n tmpRot = patRot;\n }\n const yDir = tmpRot.getColumn(1);\n yDir.scale(oldSpace, yDir);\n transform.multiplyVector(yDir, yDir);\n return yDir.magnitude();\n }\n\n public static getTransformPatternScale(transform: Transform): number {\n const xDir = transform.matrix.getColumn(0);\n const mag = xDir.magnitude();\n return (mag > 1.0e-10) ? mag : 1.0;\n }\n\n public applyTransform(transform: Transform): boolean {\n if (transform.isIdentity)\n return true;\n let origin = this.origin ? this.origin : Point3d.createZero();\n const rMatrix = this.rotation ? this.rotation.toMatrix3d() : Matrix3d.createIdentity();\n if (this.symbolId !== undefined) {\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\n this.space2 = Params.transformPatternSpace(transform, this.space2 ? this.space2 : 0.0, rMatrix, this.angle2);\n const scale = Params.getTransformPatternScale(transform);\n this.scale = this.scale ? this.scale * scale : scale;\n } else if (this.defLines) {\n const scale = Params.getTransformPatternScale(transform);\n if (!Geometry.isSameCoordinate(scale, 1.0)) {\n this.scale = this.scale ? this.scale * scale : scale;\n for (const line of this.defLines) {\n if (line.through) {\n line.through.x *= scale;\n line.through.y *= scale;\n }\n if (line.offset) {\n line.offset.x *= scale;\n line.offset.y *= scale;\n }\n if (line.dashes) {\n for (let iDash = 0; iDash < line.dashes.length; iDash++)\n line.dashes[iDash] *= scale;\n }\n }\n }\n } else {\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\n if (this.space2 && 0 !== this.space2)\n this.space2 = Params.transformPatternSpace(transform, this.space2, rMatrix, this.angle2);\n }\n\n origin = transform.multiplyPoint3d(origin);\n rMatrix.multiplyMatrixMatrix(transform.matrix, rMatrix);\n const normalized = Matrix3d.createRigidFromMatrix3d(rMatrix);\n if (!normalized)\n return false;\n const newRotation = YawPitchRollAngles.createFromMatrix3d(normalized);\n if (undefined === newRotation)\n return false;\n this.origin = origin;\n this.rotation = newRotation;\n return true;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AreaPattern.js","sourceRoot":"","sources":["../../../src/geometry/AreaPattern.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,KAAK,EAAc,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAgC,kBAAkB,GAC1G,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAiB,MAAM,aAAa,CAAC;AAEtD,cAAc;AACd,MAAM,KAAW,WAAW,CAuR3B;AAvRD,WAAiB,WAAW;IAa1B,MAAa,YAAY;QAChB,KAAK,CAAS;QACd,OAAO,CAAW;QAClB,MAAM,CAAW;QACjB,MAAM,CAAY;QAEzB,YAAmB,IAAuB;YACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACzE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACtE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChB,MAAM,MAAM,GAAa,EAAE,CAAC;gBAC5B,IAAI,CAAC,MAAM,CAAC,OA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AC,CAAC;YAC7F,CAAC;YAED,MAAM,GAAG,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAC3C,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACxD,MAAM,UAAU,GAAG,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;YAC7D,IAAI,CAAC,UAAU;gBACb,OAAO,KAAK,CAAC;YACf,MAAM,WAAW,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;YACtE,IAAI,SAAS,KAAK,WAAW;gBAC3B,OAAO,KAAK,CAAC;YACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC;KACF;IAtNY,kBAAM,SAsNlB,CAAA;AACH,CAAC,EAvRgB,WAAW,KAAX,WAAW,QAuR3B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport {\n Angle, AngleProps, Geometry, Matrix3d, Point2d, Point3d, Transform, XYProps, XYZProps, YawPitchRollAngles, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\n\n/** @public */\nexport namespace AreaPattern {\n /** Single hatch line definition */\n export interface HatchDefLineProps {\n /** Angle of hatch line, 0.0 if undefined */\n angle?: AngleProps;\n /** Origin point (relative to placement) the hatch passes through, 0.0,0.0 if undefined */\n through?: XYProps;\n /** Offset of successive lines. X offset staggers dashes (ignored for solid lines) and Y offset controls the distance between both solid and dashed lines, 0.0,0.0 if undefined */\n offset?: XYProps;\n /** Array of gap and dash lengths for creating non-solid hatch lines, max of 20. A positive value denotes dash, a negative value a gap, solid line if undefined */\n dashes?: number[];\n }\n\n export class HatchDefLine implements HatchDefLineProps {\n public angle?: Angle;\n public through?: Point2d;\n public offset?: Point2d;\n public dashes?: number[];\n\n public constructor(json: HatchDefLineProps) {\n this.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n this.through = json.through ? Point2d.fromJSON(json.through) : undefined;\n this.offset = json.offset ? Point2d.fromJSON(json.offset) : undefined;\n if (json.dashes) {\n const dashes: number[] = [];\n json.dashes.forEach((dash) => dashes.push(dash));\n this.dashes = dashes;\n }\n }\n }\n\n /** Definition of a hatch, cross-hatch, or area pattern that can be applied to the interior of a planar region.\n * @see [[GeometryStreamEntryProps]]\n */\n export interface ParamsProps {\n /** Pattern offset (relative to placement), 0.0,0.0,0.0 if undefined */\n origin?: XYZProps;\n /** Pattern orientation (relative to placement), 0.0,0.0,0.0 if undefined */\n rotation?: YawPitchRollProps;\n /** Spacing of first set of parallel lines in a hatch pattern, or row spacing between area pattern tiles, 0.0 if undefined */\n space1?: number;\n /** Spacing of second set of parallel lines in a cross-hatch (leave undefined or 0 for a hatch), or column spacing between area pattern tiles, 0.0 if undefined */\n space2?: number;\n /** Angle of first set of parallel lines in a hatch pattern or area pattern tile direction, 0.0 if undefined */\n angle1?: AngleProps;\n /** Angle of second set of parallel lines in a cross-hatch, 0.0 if undefined */\n angle2?: AngleProps;\n /** Scale to apply to area pattern symbol, 1.0 if undefined */\n scale?: number;\n /** Pattern color, leave undefined to inherit color from parent element. For area patterns, does not override explicit colors stored in symbol */\n color?: ColorDefProps;\n /** Pattern weight, leave undefined to inherit weight from parent element. For area patterns, does not override explicit weights stored in symbol */\n weight?: number;\n /** Set to inhibit display of pattern boundary, not applicable when boundary is also filled, false if undefined */\n invisibleBoundary?: boolean;\n /** Set to allow snapping to pattern geometry, false if undefined */\n snappable?: boolean;\n /** [[GeometryPart]] id to use for tiled area pattern display */\n symbolId?: Id64String;\n /** Define an area pattern by supplying hatch line definitions instead of using a [[GeometryPart]] */\n defLines?: HatchDefLineProps[];\n }\n\n /** Defines a hatch, cross hatch, or area pattern. */\n export class Params {\n public origin?: Point3d;\n public rotation?: YawPitchRollAngles;\n public space1?: number;\n public space2?: number;\n public angle1?: Angle;\n public angle2?: Angle;\n public scale?: number;\n public color?: ColorDef;\n public weight?: number;\n public invisibleBoundary?: boolean;\n public snappable?: boolean;\n public symbolId?: Id64String;\n public defLines?: HatchDefLine[];\n\n /** create an AreaPattern.Params from a json object. */\n public static fromJSON(json?: ParamsProps) {\n const result = new Params();\n if (!json)\n return result;\n result.origin = json.origin ? Point3d.fromJSON(json.origin) : undefined;\n result.rotation = json.rotation ? YawPitchRollAngles.fromJSON(json.rotation) : undefined;\n result.space1 = json.space1;\n result.space2 = json.space2;\n result.angle1 = json.angle1 ? Angle.fromJSON(json.angle1) : undefined;\n result.angle2 = json.angle2 ? Angle.fromJSON(json.angle2) : undefined;\n result.scale = json.scale;\n result.color = json.color ? ColorDef.fromJSON(json.color) : undefined;\n result.weight = json.weight;\n result.invisibleBoundary = json.invisibleBoundary;\n result.snappable = json.snappable;\n result.symbolId = json.symbolId ? Id64.fromJSON(json.symbolId) : undefined;\n if (!json.defLines)\n return result;\n const defLines: HatchDefLine[] = [];\n json.defLines.forEach((defLine) => defLines.push(new HatchDefLine(defLine)));\n result.defLines = defLines;\n return result;\n }\n\n public toJSON(): ParamsProps {\n return {\n ...this,\n color: this.color?.toJSON(),\n };\n }\n\n public clone(): Params {\n return Params.fromJSON(this.toJSON());\n }\n\n public equals(other: Params): boolean {\n if (this === other)\n return true; // Same pointer\n\n if (this.scale !== other.scale ||\n this.space1 !== other.space1 ||\n this.space2 !== other.space2 ||\n this.weight !== other.weight ||\n this.invisibleBoundary !== other.invisibleBoundary ||\n this.snappable !== other.snappable)\n return false;\n\n if ((this.color === undefined) !== (other.color === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.color && !this.color.equals(other.color!))\n return false;\n\n if ((this.angle1 === undefined) !== (other.angle1 === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.angle1 && !this.angle1.isAlmostEqualNoPeriodShift(other.angle1!))\n return false;\n\n if ((this.angle2 === undefined) !== (other.angle2 === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.angle2 && !this.angle2.isAlmostEqualNoPeriodShift(other.angle2!))\n return false;\n\n if ((this.origin === undefined) !== (other.origin === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.origin && !this.origin.isAlmostEqual(other.origin!))\n return false;\n\n if ((this.rotation === undefined) !== (other.rotation === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.rotation && !this.rotation.isAlmostEqual(other.rotation!))\n return false;\n\n if ((this.symbolId === undefined) !== (other.symbolId === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.symbolId && !(this.symbolId === other.symbolId!))\n return false;\n\n if ((this.defLines === undefined) !== (other.defLines === undefined))\n return false;\n if (this.defLines) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.defLines.length !== other.defLines!.length)\n return false;\n\n for (let i = 0; i < this.defLines.length; ++i) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const otherLine = other.defLines![i];\n const thisLine = this.defLines[i];\n\n if ((thisLine.angle === undefined) !== (otherLine.angle === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (thisLine.angle && !thisLine.angle.isAlmostEqualNoPeriodShift(otherLine.angle!))\n return false;\n\n if ((thisLine.through === undefined) !== (otherLine.through === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (thisLine.through && !thisLine.through.isAlmostEqual(otherLine.through!))\n return false;\n\n if ((thisLine.offset === undefined) !== (otherLine.offset === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (thisLine.offset && !thisLine.offset.isAlmostEqual(otherLine.offset!))\n return false;\n\n if ((thisLine.dashes === undefined) !== (otherLine.dashes === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (thisLine.dashes && thisLine.dashes.length !== otherLine.dashes!.length)\n return false;\n if (thisLine.dashes) {\n for (let dash = 0; dash < thisLine.dashes.length; ++dash) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (!Geometry.isSameCoordinate(thisLine.dashes[dash], otherLine.dashes![dash]))\n return false;\n }\n }\n }\n }\n return true;\n }\n\n public static transformPatternSpace(transform: Transform, oldSpace: number, patRot: Matrix3d, angle?: Angle): number {\n let tmpRot: Matrix3d;\n if (angle && !angle.isAlmostZero) {\n const yprTriple = new YawPitchRollAngles(angle);\n const angRot = yprTriple.toMatrix3d();\n tmpRot = patRot.multiplyMatrixMatrix(angRot);\n } else {\n tmpRot = patRot;\n }\n const yDir = tmpRot.getColumn(1);\n yDir.scale(oldSpace, yDir);\n transform.multiplyVector(yDir, yDir);\n return yDir.magnitude();\n }\n\n public static getTransformPatternScale(transform: Transform): number {\n const xDir = transform.matrix.getColumn(0);\n const mag = xDir.magnitude();\n return (mag > 1.0e-10) ? mag : 1.0;\n }\n\n public applyTransform(transform: Transform): boolean {\n if (transform.isIdentity)\n return true;\n let origin = this.origin ? this.origin : Point3d.createZero();\n const rMatrix = this.rotation ? this.rotation.toMatrix3d() : Matrix3d.createIdentity();\n if (this.symbolId !== undefined) {\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\n this.space2 = Params.transformPatternSpace(transform, this.space2 ? this.space2 : 0.0, rMatrix, this.angle2);\n const scale = Params.getTransformPatternScale(transform);\n this.scale = this.scale ? this.scale * scale : scale;\n } else if (this.defLines) {\n const scale = Params.getTransformPatternScale(transform);\n if (!Geometry.isSameCoordinate(scale, 1.0)) {\n this.scale = this.scale ? this.scale * scale : scale;\n for (const line of this.defLines) {\n if (line.through) {\n line.through.x *= scale;\n line.through.y *= scale;\n }\n if (line.offset) {\n line.offset.x *= scale;\n line.offset.y *= scale;\n }\n if (line.dashes) {\n for (let iDash = 0; iDash < line.dashes.length; iDash++)\n line.dashes[iDash] *= scale;\n }\n }\n }\n } else {\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\n if (this.space2 && 0 !== this.space2)\n this.space2 = Params.transformPatternSpace(transform, this.space2, rMatrix, this.angle2);\n }\n\n origin = transform.multiplyPoint3d(origin);\n rMatrix.multiplyMatrixMatrix(transform.matrix, rMatrix);\n const normalized = Matrix3d.createRigidFromMatrix3d(rMatrix);\n if (!normalized)\n return false;\n const newRotation = YawPitchRollAngles.createFromMatrix3d(normalized);\n if (undefined === newRotation)\n return false;\n this.origin = origin;\n this.rotation = newRotation;\n return true;\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoordinateReferenceSystem.d.ts","sourceRoot":"","sources":["../../../src/geometry/CoordinateReferenceSystem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtF;;;EAGE;AACF,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,mBAAmB,GAAG,cAAc,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEjG;;;EAGE;AACF,MAAM,WAAW,wBAAwB;IACvC,uGAAuG;IACvG,SAAS,EAAE,mBAAmB,CAAC;IAC/B;;;;+CAI2C;IAC3C,SAAS,EAAE,mBAAmB,CAA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,IAAI,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB;IAClB,SAAgB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrC,wCAAwC;IACxC,SAAgB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,SAAgB,UAAU,EAAE,OAAO,CAAC;IACpC,oFAAoF;IACpF,SAAgB,IAAI,CAAC,EAAE,MAAM,CAAC;IAC9B,gGAAgG;IAChG,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,SAAgB,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtC;;MAEE;IACF,SAAgB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrC;;;MAGE;IACF,SAAgB,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9C,yCAAyC;IACzC,SAAgB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChC,kDAAkD;IAClD,SAAgB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxC,gEAAgE;IAChE,SAAgB,MAAM,CAAC,EAAE,mBAAmB,CAAC;gBAE1B,KAAK,CAAC,EAAE,kBAAkB;IAoB7C;iBACa;WACC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,GAAG,aAAa;IAI/D;iBACa;IACN,MAAM,IAAI,kBAAkB;IA4BnC;;kBAEc;IACP,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"CoordinateReferenceSystem.d.ts","sourceRoot":"","sources":["../../../src/geometry/CoordinateReferenceSystem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,EAAE,mBAAmB,E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AO,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,iBAAiB,CAAC;CACrE;AAED;;;;;;EAME;AACF,qBAAa,WAAY,YAAW,gBAAgB;IAClD;;;;;;;;;MASE;IACF,SAAgB,EAAE,EAAE,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,iBAAiB,CAAC;gBAEjE,IAAI,CAAC,EAAE,gBAAgB;IAM1C;iBACa;WACC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW;IAI3D;iBACa;IACN,MAAM,IAAI,gBAAgB;IAIjC;kBACc;IACP,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;CAG3C;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,4EAA4E;IAC5E,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,oFAAoF;IACpF,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;CAChD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BE;AACF,qBAAa,aAAc,YAAW,kBAAkB;IACtD,4EAA4E;IAC5E,SAAgB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9C,0EAA0E;IAC1E,SAAgB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1C,oFAAoF;IACpF,SAAgB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;gBAEvC,IAAI,CAAC,EAAE,kBAAkB;IAQ5C;iBACa;WACC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,GAAG,aAAa;IAI/D;iBACa;IACN,MAAM,IAAI,kBAAkB;IAcnC;;;;OAIG;IACI,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;CAwB7C"}
|
|
@@ -177,18 +177,22 @@ export class HorizontalCRS {
|
|
|
177
177
|
return false;
|
|
178
178
|
if ((this.datum === undefined) !== (other.datum === undefined))
|
|
179
179
|
return false;
|
|
180
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
180
181
|
if (this.datum && !this.datum.equals(other.datum))
|
|
181
182
|
return false;
|
|
182
183
|
if ((this.ellipsoid === undefined) !== (other.ellipsoid === undefined))
|
|
183
184
|
return false;
|
|
185
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
184
186
|
if (this.ellipsoid && !this.ellipsoid.equals(other.ellipsoid))
|
|
185
187
|
return false;
|
|
186
188
|
if ((this.projection === undefined) !== (other.projection === undefined))
|
|
187
189
|
return false;
|
|
190
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
188
191
|
if (this.projection && !this.projection.equals(other.projection))
|
|
189
192
|
return false;
|
|
190
193
|
if ((this.extent === undefined) !== (other.extent === undefined))
|
|
191
194
|
return false;
|
|
195
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
192
196
|
if (this.extent && !this.extent.equals(other.extent))
|
|
193
197
|
return false;
|
|
194
198
|
return true;
|
|
@@ -300,14 +304,17 @@ export class GeographicCRS {
|
|
|
300
304
|
equals(other) {
|
|
301
305
|
if ((this.horizontalCRS === undefined) !== (other.horizontalCRS === undefined))
|
|
302
306
|
return false;
|
|
307
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
303
308
|
if (this.horizontalCRS && !this.horizontalCRS.equals(other.horizontalCRS))
|
|
304
309
|
return false;
|
|
305
310
|
if ((this.verticalCRS === undefined) !== (other.verticalCRS === undefined))
|
|
306
311
|
return false;
|
|
312
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
307
313
|
if (this.verticalCRS && !this.verticalCRS.equals(other.verticalCRS))
|
|
308
314
|
return false;
|
|
309
315
|
if ((this.additionalTransform === undefined) !== (other.additionalTransform === undefined))
|
|
310
316
|
return false;
|
|
317
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
311
318
|
if (this.additionalTransform && !this.additionalTransform.equals(other.additionalTransform))
|
|
312
319
|
return false;
|
|
313
320
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoordinateReferenceSystem.js","sourceRoot":"","sources":["../../../src/geometry/CoordinateReferenceSystem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,0CAA0C;AAE1C,OAAO,EAAE,aAAa,EAAsB,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAA0B,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAuB,UAAU,EAAmB,MAAM,cAAc,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAA4B,MAAM,uBAAuB,CAAC;AAsBtF;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAC9B,8EAA8E;IAC9D,SAAS,CAAiB;IAC1C;;;;+CAI2C;IAC3B,SAAS,CAAiB;IAE1C,YAAmB,IAA+B;QAChD,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACzD,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACzD,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ;gBACnD,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,SAAS,GAAG,IAAI,cAAc,EAAE,CAAC;YACtC,IAAI,CAAC,SAAS,GAAG,IAAI,cAAc,EAAE,CAAC;QACxC,CAAC;IACH,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA8B;QACnD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EA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,EAAE,CAAC;QAEnD,IAAI,IAAI,CAAC,WAAW;YAClB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAE/C,IAAI,IAAI,CAAC,mBAAmB;YAC1B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC;QAE/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,KAAoB;QAChC,IAAI,CAAC,IAAI,CAAC,aAAa,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC;YAC5E,OAAO,KAAK,CAAC;QAEf,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,aAAc,CAAC;YACxE,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC;YACxE,OAAO,KAAK,CAAC;QAEf,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,WAAY,CAAC;YAClE,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,mBAAmB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,KAAK,SAAS,CAAC;YACxF,OAAO,KAAK,CAAC;QAEf,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAoB,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n// cspell:ignore NAVD, NGVD, NSRS, Helmert\n\nimport { GeodeticDatum, GeodeticDatumProps } from \"./GeodeticDatum\";\nimport { GeodeticEllipsoid, GeodeticEllipsoidProps } from \"./GeodeticEllipsoid\";\nimport { Carto2DDegrees, Carto2DDegreesProps, Projection, ProjectionProps } from \"./Projection\";\nimport { AdditionalTransform, AdditionalTransformProps } from \"./AdditionalTransform\";\n/** This type indicates possible linear and angular units supported.\n * @public\n * @extensions\n*/\nexport type UnitType = \"Meter\" | \"InternationalFoot\" | \"USSurveyFoot\" | \"Degree\" | \"Unsupported\";\n\n/** The extent in latitude, longitude bounds where a horizontal CRS is applicable\n * @public\n * @extensions\n*/\nexport interface HorizontalCRSExtentProps {\n /** The South West point in latitude and longitude in degrees for the user-defined extent of the CRS */\n southWest: Carto2DDegreesProps;\n /** The North East point in latitude in longitude in degrees for the user-defined extent of the CRS.\n The latitude of the North East must be greater or equal to the latitude of the South West point\n It is possible, however, for the longitude of the South West corner to have greater value than the\n longitude of the North East point such as when the west longitude is located on the other side\n of the -180/180 degree longitude line.*/\n northEast: Carto2DDegreesProps;\n}\n\n/** The extent in latitude, longitude bounds where a horizontal CRS is applicable\n * @public\n */\nexport class HorizontalCRSExtent implements HorizontalCRSExtentProps {\n /** The latitude minimum and maximum for the user-defined extent of the CRS */\n public readonly southWest: Carto2DDegrees;\n /** The North East point in latitude in longitude in degrees for the user-defined extent of the CRS.\n The latitude of the North East must be greater or equal to the latitude of the South West point\n It is possible, however, for the longitude of the South West corner to have greater value than the\n longitude of the North East point such as when the west longitude is located on the other side\n of the -180/180 degree longitude line.*/\n public readonly northEast: Carto2DDegrees;\n\n public constructor(data?: HorizontalCRSExtentProps) {\n if (data) {\n this.southWest = Carto2DDegrees.fromJSON(data.southWest);\n this.northEast = Carto2DDegrees.fromJSON(data.northEast);\n if (this.northEast.latitude < this.southWest.latitude)\n this.northEast.latitude = this.southWest.latitude;\n } else {\n this.southWest = new Carto2DDegrees();\n this.northEast = new Carto2DDegrees();\n }\n }\n\n /** Creates an extent object from JSON representation.\n * @public */\n public static fromJSON(data: HorizontalCRSExtentProps): HorizontalCRSExtent {\n return new HorizontalCRSExtent(data);\n }\n\n /** Creates a JSON from the Extent definition\n * @public */\n public toJSON(): HorizontalCRSExtentProps {\n return { southWest: this.southWest.toJSON(), northEast: this.northEast.toJSON() };\n }\n\n /** Compares two Extents. It applies a minuscule tolerance to comparing numbers.\n * @public */\n public equals(other: HorizontalCRSExtent): boolean {\n return this.southWest.equals(other.southWest) && this.northEast.equals(other.northEast);\n }\n}\n\n/** Horizontal Geographic Coordinate Reference System definition\n * @public\n * @extensions\n */\nexport interface HorizontalCRSProps {\n /** The identifier of the horizontal CRS as stored in the dictionary or the service database */\n id?: string;\n /** Used only for user-defined definitions that will typically use a GUID as id. A display name for the CRS that allows\n * a human to understand the nature of the definition\n */\n name?: string;\n /** Description */\n description?: string;\n /** A textual description of the source of the CRS definition. */\n source?: string;\n /** If true then indicates the definition is deprecated. It should then be used for backward compatibility only.\n * If false or undefined then the definition is not deprecated.\n */\n deprecated?: boolean;\n /** The EPSG code of the CRS. If undefined then there is no EPSG code associated. */\n epsg?: number;\n /** The identifier of the geodetic datum as stored in the dictionary or the service database. */\n datumId?: string;\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\n * in either service or dictionary.\n */\n datum?: GeodeticDatumProps;\n /** The identifier of the geodetic ellipsoid as stored in the dictionary or the service database. This property is exclusive\n * of having datumId and datum properties undefined.\n */\n ellipsoidId?: string;\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\n * in either service or dictionary\n */\n ellipsoid?: GeodeticEllipsoidProps;\n /** The text indicating the unit used. */\n unit?: UnitType;\n /** Projection including projection parameters. */\n projection?: ProjectionProps;\n /** Extent representing the domain of application of the CRS. */\n extent?: HorizontalCRSExtentProps;\n}\n\n/** Horizontal Geographic Coordinate reference System implementation.\n * An horizontal CRS defines the portion which is horizontal to the Earth surface (within the deformation brought by the projection process).\n * There are two major classes of Horizontal Coordinate Reference Systems:\n * - The projected CRS which rely on a projection to flatten the coordinate system space into axises using linear\n * units (meter, US Survey Feet, ...) relative to some origin.\n * - The non projected CRS (also named geographic CRS by EPSG nomenclature) that does\n * not require a projection (projection method = None) and horizontal coordinates are expressed\n * as longitude and latitude (see [[Cartographic]])\n * Horizontal Coordinate Systems rely on a projection to flatten the surface of an ellipsoid (see [[GeodeticEllipsoid]]) which is\n * the mathematical model of the Earth surface.\n * Explanations in more details of the various concepts can be obtained from other sources including the page on the subject\n * on itwinJS.org (see https://www.itwinjs.org/learning/geolocation/?term=coordinate+system).\n * A few details are still required to grasp the model. Geographic Coordinate Reference Systems rely on the concept of geodetic datums\n * (see [[GeodeticDatum]]) to convert latitude/longitude from one frame of reference to another. Such geodetic datum will bind the ellipsoid\n * and possibly define transformation steps required to convert from the currently used geodetic datum to the common datum WGS84\n * used for worldwide data (such as most popular imagery data sources). If there are no rules established to convert to WGS84\n * or if those rules are secret then the horizontal CRS can be datum-less and must make direct use of the ellipsoid\n * to define the earth surface.\n * For this purpose either the geodetic datum must be specified using either datumId or datum properties or both. If\n * both these values are undefined then it is possible to define the ellipsoid using properties ellipsoidId or ellipsoid or both.\n * These two pairs of properties are mutually exclusive with datum related properties having precedence. If a datum or datumId is set then\n * ellipsoid properties will automatically be undefined. If datumId or datum is defined then attempts to set ellipsoidId or ellipsoid\n * will fail silently, the values remaining undefined. The ellipsoidId will not be a repeat of the ellipsoidId property part of the\n * geodetic datum definition.\n * @public\n */\nexport class HorizontalCRS implements HorizontalCRSProps {\n /** The identifier of the horizontal CRS as stored in the dictionary or the service database */\n public readonly id?: string;\n /** Used only for user-defined definitions that will typically use a GUID as id. A display name for the CRS that allows\n ** a human to understand the nature of the definition\n */\n public readonly name?: string;\n /** Description */\n public readonly description?: string;\n /** The source of the CRS definition. */\n public readonly source?: string;\n /** If true then indicates the definition is deprecated. It should then be used for backward compatibility only.\n * If false then the definition is not deprecated. Default is false.\n */\n public readonly deprecated: boolean;\n /** The EPSG code of the CRS. If undefined then there is no EPSG code associated. */\n public readonly epsg?: number;\n /** The identifier of the geodetic datum as stored in the dictionary or the service database. */\n public readonly datumId?: string;\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\n * in either service or dictionary.\n */\n public readonly datum?: GeodeticDatum;\n\n /** The identifier of the geodetic ellipsoid as stored in the dictionary or the service database. This property is exclusive\n * of having datumId and datum properties undefined.\n */\n public readonly ellipsoidId?: string;\n /** The complete definition of the geodetic ellipsoid referred to by ellipsoidId. It can also be used if the ellipsoid is not stored\n * in either service or dictionary. This property is exclusive\n * of having datumId and datum properties undefined.\n */\n public readonly ellipsoid?: GeodeticEllipsoid;\n /** The text indicating the unit used. */\n public readonly unit?: UnitType;\n /** Projection including projection parameters. */\n public readonly projection?: Projection;\n /** Extent representing the domain of application of the CRS. */\n public readonly extent?: HorizontalCRSExtent;\n\n public constructor(_data?: HorizontalCRSProps) {\n this.deprecated = false;\n if (_data) {\n this.id = _data.id;\n this.description = _data.description;\n this.source = _data.source;\n this.deprecated = _data.deprecated ?? false;\n this.epsg = _data.epsg;\n this.datumId = _data.datumId;\n this.datum = _data.datum ? GeodeticDatum.fromJSON(_data.datum) : undefined;\n if (!this.datumId && !this.datum) {\n this.ellipsoidId = _data.ellipsoidId;\n this.ellipsoid = _data.ellipsoid ? GeodeticEllipsoid.fromJSON(_data.ellipsoid) : undefined;\n }\n this.unit = _data.unit;\n this.projection = _data.projection ? Projection.fromJSON(_data.projection) : undefined;\n this.extent = _data.extent ? HorizontalCRSExtent.fromJSON(_data.extent) : undefined;\n }\n }\n\n /** Creates an Horizontal CRS from JSON representation.\n * @public */\n public static fromJSON(data: HorizontalCRSProps): HorizontalCRS {\n return new HorizontalCRS(data);\n }\n\n /** Creates a JSON from the Horizontal CRS definition\n * @public */\n public toJSON(): HorizontalCRSProps {\n const data: HorizontalCRSProps = {};\n data.id = this.id;\n data.description = this.description;\n data.source = this.source;\n /* We prefer to use the default undef instead of false value for deprecated in Json */\n if (this.deprecated)\n data.deprecated = true;\n\n data.epsg = this.epsg;\n data.datumId = this.datumId;\n if (this.datum)\n data.datum = this.datum.toJSON();\n\n data.ellipsoidId = this.ellipsoidId;\n if (this.ellipsoid)\n data.ellipsoid = this.ellipsoid.toJSON();\n\n data.unit = this.unit;\n if (this.projection)\n data.projection = this.projection.toJSON();\n\n if (this.extent)\n data.extent = this.extent.toJSON();\n\n return data;\n }\n\n /** Compares two horizontal CRS. It is not an equivalence test as descriptive properties are also compared\n * but number compares are applied a minuscule tolerance.\n * @public */\n public equals(other: HorizontalCRS): boolean {\n if (this.id !== other.id ||\n this.description !== other.description ||\n this.source !== other.source ||\n this.deprecated !== other.deprecated ||\n this.epsg !== other.epsg ||\n this.datumId !== other.datumId ||\n this.ellipsoidId !== other.ellipsoidId ||\n this.unit !== other.unit)\n return false;\n\n if ((this.datum === undefined) !== (other.datum === undefined))\n return false;\n\n if (this.datum && !this.datum.equals(other.datum!))\n return false;\n\n if ((this.ellipsoid === undefined) !== (other.ellipsoid === undefined))\n return false;\n\n if (this.ellipsoid && !this.ellipsoid.equals(other.ellipsoid!))\n return false;\n\n if ((this.projection === undefined) !== (other.projection === undefined))\n return false;\n\n if (this.projection && !this.projection.equals(other.projection!))\n return false;\n\n if ((this.extent === undefined) !== (other.extent === undefined))\n return false;\n\n if (this.extent && !this.extent.equals(other.extent!))\n return false;\n\n return true;\n }\n}\n\n/** Vertical Geographic Coordinate reference System definition\n * @public\n * @extensions\n */\nexport interface VerticalCRSProps {\n /** Vertical CRS Key name.\n * @see [[VerticalCRS.id]]\n */\n id: \"GEOID\" | \"ELLIPSOID\" | \"NGVD29\" | \"NAVD88\" | \"LOCAL_ELLIPSOID\";\n}\n\n/** Vertical Coordinate reference System implementation.\n * The VerticalCRS contains currently a single identifier property of string type. Although\n * we currently only support five distinct key values \"GEOID\", \"ELLIPSOID\", \"NAVD88\", \"NGVD29\" and \"LOCAL_ELLIPSOID\"\n * we expect to support a broader set in the future including, eventually, user defined vertical CRS\n * which will require additional parameters to be added.\n * @public\n*/\nexport class VerticalCRS implements VerticalCRSProps {\n /** Vertical CRS Key name. The only supported values are currently \"GEOID\", \"ELLIPSOID\", \"NAVD88\", \"NGVD29\" and \"LOCAL_ELLIPSOID\".\n * GEOID indicates elevations are to be interpreted relative to the local Geoid of the dataset. It can also be considered to be Mean Sea Level.\n * NAVD88 is the local geoid model for the USA. This vertical datum can only be used if the horizontal portion is based on a\n * datum variation of NAD83, NAD27, NSRS2007 and NSRS2011.\n * NGVD29 is the former local geoid model for the USA. This vertical datum can only be used if the horizontal portion is based on a\n * datum variation of NAD83, NAD27, NSRS2007 and NSRS2011.\n * ELLIPSOID indicates that elevations are relative to the surface of the WGS84(or current coincident) ellipsoid.\n * LOCAL_ELLIPSOID indicates that elevations are relative to the surface of the local ellipsoid used by the horizontal CRS. It can only\n * be used for datums that are not considered coincident vertically with WGS84. Use of this vertical datum is strongly discouraged.\n */\n public readonly id: \"GEOID\" | \"ELLIPSOID\" | \"NGVD29\" | \"NAVD88\" | \"LOCAL_ELLIPSOID\";\n\n public constructor(data?: VerticalCRSProps) {\n this.id = \"GEOID\";\n if (data)\n this.id = data.id;\n }\n\n /** Creates a Vertical CRS from JSON representation.\n * @public */\n public static fromJSON(data: VerticalCRSProps): VerticalCRS {\n return new VerticalCRS(data);\n }\n\n /** Creates a JSON from the Vertical CRS definition\n * @public */\n public toJSON(): VerticalCRSProps {\n return { id: this.id };\n }\n\n /** Compares two vertical CRS.\n * @public */\n public equals(other: VerticalCRS): boolean {\n return (this.id === other.id);\n }\n}\n\n/** Geographic Coordinate Reference System definition that includes the horizontal and vertical definitions as well as an optional\n * additional transformation.\n * @see [[GeographicCRS]].\n * @public\n * @extensions\n */\nexport interface GeographicCRSProps {\n /** The horizontal portion of the geographic coordinate reference system. */\n horizontalCRS?: HorizontalCRSProps;\n /** The vertical portion of the geographic coordinate reference system. */\n verticalCRS?: VerticalCRSProps;\n /** The optional additional transform the geographic coordinate reference system. */\n additionalTransform?: AdditionalTransformProps;\n}\n\n/** Geographic Coordinate Reference System implementation. This is the class that indicates the definition of a Geographic\n * coordinate reference system comprised of three components: Horizontal and Vertical and an optional additional transform.\n * The vertical component (see [[VerticalCRS]]) is the simplest portion containing a simple identifier as a string.\n * The optional additional transform of which, currently, only the type Helmert 2D with Z offset [[Helmert2DWithZOffset]] is supported\n * defines a transformation of x,y, and z cartesian coordinate of the projection to the final\n * Geographic Coordinate Reference System cartesian coordinates.\n * The horizontal component contains a list of identification and documentation properties as well as\n * defining details possibly including the projection with method and parameters, the definition of the datum, ellipsoid, extent and so on.\n * The principle of describing a Geographic CRS is that the definition may be incomplete. The whole set of classes related to geographic\n * coordinate reference system classes ([[GeodeticEllipsoid]], [[GeodeticDatum]], [[Projection]], [[GeodeticTransform]], ...) are designed\n * so that they can be parsed from incomplete JSON fragments, or produce incomplete JSON fragments such as would be\n * generated from a request to a REST API to a server when select OData clauses are used.\n * Often GeographicCRS would knowingly be created incomplete but with sufficient information to perform conversion from some\n * reprojection engine (the present set of classes do not provide any GeographicCRS conversion).\n * For example the following definitions are quite sufficient to request conversion to or from by a reprojection engine:\n * { horizontalCRS: {id: \"LL84\"}, verticalCRS: {id:\"GEOID\"}\n * or\n * { horizontalCRS: {datumId: \"WGS84\", projection: {method: \"None\"}}, verticalCRS: \"ELLIPSOID\"}\n * The reprojection engine will use the engine internal dictionary to obtain the details if it can.\n * Some definitions will originate from other sources (a parsed WKT for example) and the reprojection engine will require\n * all mathematical and operational details to perform any conversion (descriptive information are ignored in the conversion process).\n * @note see important detailed explanation in the [[HorizontalCRS]], [[VerticalCRS]] and [[AdditionalTransform]] documentation.\n * @note Earth Centered, Earth Fixed coordinate system (ECEF) is a full 3D cartesian system that unambiguously\n * expressed coordinates relative to the Earth Center. Since there is no horizontal portion independent from\n * the vertical portion this system cannot be represented by a GeographicCRS and remains a separate concept.\n * @public\n*/\nexport class GeographicCRS implements GeographicCRSProps {\n /** The horizontal portion of the geographic coordinate reference system. */\n public readonly horizontalCRS?: HorizontalCRS;\n /** The vertical portion of the geographic coordinate reference system. */\n public readonly verticalCRS?: VerticalCRS;\n /** The optional additional transform the geographic coordinate reference system. */\n public readonly additionalTransform?: AdditionalTransform;\n\n public constructor(data?: GeographicCRSProps) {\n if (data) {\n this.horizontalCRS = data.horizontalCRS ? HorizontalCRS.fromJSON(data.horizontalCRS) : undefined;\n this.verticalCRS = data.verticalCRS ? VerticalCRS.fromJSON(data.verticalCRS) : undefined;\n this.additionalTransform = data.additionalTransform ? AdditionalTransform.fromJSON(data.additionalTransform) : undefined;\n }\n }\n\n /** Creates a Geographic CRS from JSON representation.\n * @public */\n public static fromJSON(data: GeographicCRSProps): GeographicCRS {\n return new GeographicCRS(data);\n }\n\n /** Creates a JSON from the Geographic CRS definition\n * @public */\n public toJSON(): GeographicCRSProps {\n const data: GeographicCRSProps = {};\n if (this.horizontalCRS)\n data.horizontalCRS = this.horizontalCRS.toJSON();\n\n if (this.verticalCRS)\n data.verticalCRS = this.verticalCRS.toJSON();\n\n if (this.additionalTransform)\n data.additionalTransform = this.additionalTransform.toJSON();\n\n return data;\n }\n\n /** Compares two Geographic CRS. It is a strict compare operation not an equivalence test though\n * number compares are applied a minuscule tolerance.\n * It takes into account descriptive properties not only mathematical definition properties.\n * @public\n */\n public equals(other: GeographicCRS): boolean {\n if ((this.horizontalCRS === undefined) !== (other.horizontalCRS === undefined))\n return false;\n\n if (this.horizontalCRS && !this.horizontalCRS.equals(other.horizontalCRS!))\n return false;\n\n if ((this.verticalCRS === undefined) !== (other.verticalCRS === undefined))\n return false;\n\n if (this.verticalCRS && !this.verticalCRS.equals(other.verticalCRS!))\n return false;\n\n if ((this.additionalTransform === undefined) !== (other.additionalTransform === undefined))\n return false;\n\n if (this.additionalTransform && !this.additionalTransform.equals(other.additionalTransform!))\n return false;\n\n return true;\n }\n}\n\n"]}
|
|
1
|
+
{"version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,IAAI,IAAI,CAAC,WAAW;YAClB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAE/C,IAAI,IAAI,CAAC,mBAAmB;YAC1B,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC;QAE/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,KAAoB;QAChC,IAAI,CAAC,IAAI,CAAC,aAAa,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC;YAC5E,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,aAAc,CAAC;YACxE,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC;YACxE,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,WAAY,CAAC;YAClE,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,mBAAmB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,KAAK,SAAS,CAAC;YACxF,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAoB,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n// cspell:ignore NAVD, NGVD, NSRS, Helmert\n\nimport { GeodeticDatum, GeodeticDatumProps } from \"./GeodeticDatum\";\nimport { GeodeticEllipsoid, GeodeticEllipsoidProps } from \"./GeodeticEllipsoid\";\nimport { Carto2DDegrees, Carto2DDegreesProps, Projection, ProjectionProps } from \"./Projection\";\nimport { AdditionalTransform, AdditionalTransformProps } from \"./AdditionalTransform\";\n/** This type indicates possible linear and angular units supported.\n * @public\n * @extensions\n*/\nexport type UnitType = \"Meter\" | \"InternationalFoot\" | \"USSurveyFoot\" | \"Degree\" | \"Unsupported\";\n\n/** The extent in latitude, longitude bounds where a horizontal CRS is applicable\n * @public\n * @extensions\n*/\nexport interface HorizontalCRSExtentProps {\n /** The South West point in latitude and longitude in degrees for the user-defined extent of the CRS */\n southWest: Carto2DDegreesProps;\n /** The North East point in latitude in longitude in degrees for the user-defined extent of the CRS.\n The latitude of the North East must be greater or equal to the latitude of the South West point\n It is possible, however, for the longitude of the South West corner to have greater value than the\n longitude of the North East point such as when the west longitude is located on the other side\n of the -180/180 degree longitude line.*/\n northEast: Carto2DDegreesProps;\n}\n\n/** The extent in latitude, longitude bounds where a horizontal CRS is applicable\n * @public\n */\nexport class HorizontalCRSExtent implements HorizontalCRSExtentProps {\n /** The latitude minimum and maximum for the user-defined extent of the CRS */\n public readonly southWest: Carto2DDegrees;\n /** The North East point in latitude in longitude in degrees for the user-defined extent of the CRS.\n The latitude of the North East must be greater or equal to the latitude of the South West point\n It is possible, however, for the longitude of the South West corner to have greater value than the\n longitude of the North East point such as when the west longitude is located on the other side\n of the -180/180 degree longitude line.*/\n public readonly northEast: Carto2DDegrees;\n\n public constructor(data?: HorizontalCRSExtentProps) {\n if (data) {\n this.southWest = Carto2DDegrees.fromJSON(data.southWest);\n this.northEast = Carto2DDegrees.fromJSON(data.northEast);\n if (this.northEast.latitude < this.southWest.latitude)\n this.northEast.latitude = this.southWest.latitude;\n } else {\n this.southWest = new Carto2DDegrees();\n this.northEast = new Carto2DDegrees();\n }\n }\n\n /** Creates an extent object from JSON representation.\n * @public */\n public static fromJSON(data: HorizontalCRSExtentProps): HorizontalCRSExtent {\n return new HorizontalCRSExtent(data);\n }\n\n /** Creates a JSON from the Extent definition\n * @public */\n public toJSON(): HorizontalCRSExtentProps {\n return { southWest: this.southWest.toJSON(), northEast: this.northEast.toJSON() };\n }\n\n /** Compares two Extents. It applies a minuscule tolerance to comparing numbers.\n * @public */\n public equals(other: HorizontalCRSExtent): boolean {\n return this.southWest.equals(other.southWest) && this.northEast.equals(other.northEast);\n }\n}\n\n/** Horizontal Geographic Coordinate Reference System definition\n * @public\n * @extensions\n */\nexport interface HorizontalCRSProps {\n /** The identifier of the horizontal CRS as stored in the dictionary or the service database */\n id?: string;\n /** Used only for user-defined definitions that will typically use a GUID as id. A display name for the CRS that allows\n * a human to understand the nature of the definition\n */\n name?: string;\n /** Description */\n description?: string;\n /** A textual description of the source of the CRS definition. */\n source?: string;\n /** If true then indicates the definition is deprecated. It should then be used for backward compatibility only.\n * If false or undefined then the definition is not deprecated.\n */\n deprecated?: boolean;\n /** The EPSG code of the CRS. If undefined then there is no EPSG code associated. */\n epsg?: number;\n /** The identifier of the geodetic datum as stored in the dictionary or the service database. */\n datumId?: string;\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\n * in either service or dictionary.\n */\n datum?: GeodeticDatumProps;\n /** The identifier of the geodetic ellipsoid as stored in the dictionary or the service database. This property is exclusive\n * of having datumId and datum properties undefined.\n */\n ellipsoidId?: string;\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\n * in either service or dictionary\n */\n ellipsoid?: GeodeticEllipsoidProps;\n /** The text indicating the unit used. */\n unit?: UnitType;\n /** Projection including projection parameters. */\n projection?: ProjectionProps;\n /** Extent representing the domain of application of the CRS. */\n extent?: HorizontalCRSExtentProps;\n}\n\n/** Horizontal Geographic Coordinate reference System implementation.\n * An horizontal CRS defines the portion which is horizontal to the Earth surface (within the deformation brought by the projection process).\n * There are two major classes of Horizontal Coordinate Reference Systems:\n * - The projected CRS which rely on a projection to flatten the coordinate system space into axises using linear\n * units (meter, US Survey Feet, ...) relative to some origin.\n * - The non projected CRS (also named geographic CRS by EPSG nomenclature) that does\n * not require a projection (projection method = None) and horizontal coordinates are expressed\n * as longitude and latitude (see [[Cartographic]])\n * Horizontal Coordinate Systems rely on a projection to flatten the surface of an ellipsoid (see [[GeodeticEllipsoid]]) which is\n * the mathematical model of the Earth surface.\n * Explanations in more details of the various concepts can be obtained from other sources including the page on the subject\n * on itwinJS.org (see https://www.itwinjs.org/learning/geolocation/?term=coordinate+system).\n * A few details are still required to grasp the model. Geographic Coordinate Reference Systems rely on the concept of geodetic datums\n * (see [[GeodeticDatum]]) to convert latitude/longitude from one frame of reference to another. Such geodetic datum will bind the ellipsoid\n * and possibly define transformation steps required to convert from the currently used geodetic datum to the common datum WGS84\n * used for worldwide data (such as most popular imagery data sources). If there are no rules established to convert to WGS84\n * or if those rules are secret then the horizontal CRS can be datum-less and must make direct use of the ellipsoid\n * to define the earth surface.\n * For this purpose either the geodetic datum must be specified using either datumId or datum properties or both. If\n * both these values are undefined then it is possible to define the ellipsoid using properties ellipsoidId or ellipsoid or both.\n * These two pairs of properties are mutually exclusive with datum related properties having precedence. If a datum or datumId is set then\n * ellipsoid properties will automatically be undefined. If datumId or datum is defined then attempts to set ellipsoidId or ellipsoid\n * will fail silently, the values remaining undefined. The ellipsoidId will not be a repeat of the ellipsoidId property part of the\n * geodetic datum definition.\n * @public\n */\nexport class HorizontalCRS implements HorizontalCRSProps {\n /** The identifier of the horizontal CRS as stored in the dictionary or the service database */\n public readonly id?: string;\n /** Used only for user-defined definitions that will typically use a GUID as id. A display name for the CRS that allows\n ** a human to understand the nature of the definition\n */\n public readonly name?: string;\n /** Description */\n public readonly description?: string;\n /** The source of the CRS definition. */\n public readonly source?: string;\n /** If true then indicates the definition is deprecated. It should then be used for backward compatibility only.\n * If false then the definition is not deprecated. Default is false.\n */\n public readonly deprecated: boolean;\n /** The EPSG code of the CRS. If undefined then there is no EPSG code associated. */\n public readonly epsg?: number;\n /** The identifier of the geodetic datum as stored in the dictionary or the service database. */\n public readonly datumId?: string;\n /** The complete definition of the geodetic datum referred to by datumId. It can also be used if the datum is not stored\n * in either service or dictionary.\n */\n public readonly datum?: GeodeticDatum;\n\n /** The identifier of the geodetic ellipsoid as stored in the dictionary or the service database. This property is exclusive\n * of having datumId and datum properties undefined.\n */\n public readonly ellipsoidId?: string;\n /** The complete definition of the geodetic ellipsoid referred to by ellipsoidId. It can also be used if the ellipsoid is not stored\n * in either service or dictionary. This property is exclusive\n * of having datumId and datum properties undefined.\n */\n public readonly ellipsoid?: GeodeticEllipsoid;\n /** The text indicating the unit used. */\n public readonly unit?: UnitType;\n /** Projection including projection parameters. */\n public readonly projection?: Projection;\n /** Extent representing the domain of application of the CRS. */\n public readonly extent?: HorizontalCRSExtent;\n\n public constructor(_data?: HorizontalCRSProps) {\n this.deprecated = false;\n if (_data) {\n this.id = _data.id;\n this.description = _data.description;\n this.source = _data.source;\n this.deprecated = _data.deprecated ?? false;\n this.epsg = _data.epsg;\n this.datumId = _data.datumId;\n this.datum = _data.datum ? GeodeticDatum.fromJSON(_data.datum) : undefined;\n if (!this.datumId && !this.datum) {\n this.ellipsoidId = _data.ellipsoidId;\n this.ellipsoid = _data.ellipsoid ? GeodeticEllipsoid.fromJSON(_data.ellipsoid) : undefined;\n }\n this.unit = _data.unit;\n this.projection = _data.projection ? Projection.fromJSON(_data.projection) : undefined;\n this.extent = _data.extent ? HorizontalCRSExtent.fromJSON(_data.extent) : undefined;\n }\n }\n\n /** Creates an Horizontal CRS from JSON representation.\n * @public */\n public static fromJSON(data: HorizontalCRSProps): HorizontalCRS {\n return new HorizontalCRS(data);\n }\n\n /** Creates a JSON from the Horizontal CRS definition\n * @public */\n public toJSON(): HorizontalCRSProps {\n const data: HorizontalCRSProps = {};\n data.id = this.id;\n data.description = this.description;\n data.source = this.source;\n /* We prefer to use the default undef instead of false value for deprecated in Json */\n if (this.deprecated)\n data.deprecated = true;\n\n data.epsg = this.epsg;\n data.datumId = this.datumId;\n if (this.datum)\n data.datum = this.datum.toJSON();\n\n data.ellipsoidId = this.ellipsoidId;\n if (this.ellipsoid)\n data.ellipsoid = this.ellipsoid.toJSON();\n\n data.unit = this.unit;\n if (this.projection)\n data.projection = this.projection.toJSON();\n\n if (this.extent)\n data.extent = this.extent.toJSON();\n\n return data;\n }\n\n /** Compares two horizontal CRS. It is not an equivalence test as descriptive properties are also compared\n * but number compares are applied a minuscule tolerance.\n * @public */\n public equals(other: HorizontalCRS): boolean {\n if (this.id !== other.id ||\n this.description !== other.description ||\n this.source !== other.source ||\n this.deprecated !== other.deprecated ||\n this.epsg !== other.epsg ||\n this.datumId !== other.datumId ||\n this.ellipsoidId !== other.ellipsoidId ||\n this.unit !== other.unit)\n return false;\n\n if ((this.datum === undefined) !== (other.datum === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.datum && !this.datum.equals(other.datum!))\n return false;\n\n if ((this.ellipsoid === undefined) !== (other.ellipsoid === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.ellipsoid && !this.ellipsoid.equals(other.ellipsoid!))\n return false;\n\n if ((this.projection === undefined) !== (other.projection === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.projection && !this.projection.equals(other.projection!))\n return false;\n\n if ((this.extent === undefined) !== (other.extent === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.extent && !this.extent.equals(other.extent!))\n return false;\n\n return true;\n }\n}\n\n/** Vertical Geographic Coordinate reference System definition\n * @public\n * @extensions\n */\nexport interface VerticalCRSProps {\n /** Vertical CRS Key name.\n * @see [[VerticalCRS.id]]\n */\n id: \"GEOID\" | \"ELLIPSOID\" | \"NGVD29\" | \"NAVD88\" | \"LOCAL_ELLIPSOID\";\n}\n\n/** Vertical Coordinate reference System implementation.\n * The VerticalCRS contains currently a single identifier property of string type. Although\n * we currently only support five distinct key values \"GEOID\", \"ELLIPSOID\", \"NAVD88\", \"NGVD29\" and \"LOCAL_ELLIPSOID\"\n * we expect to support a broader set in the future including, eventually, user defined vertical CRS\n * which will require additional parameters to be added.\n * @public\n*/\nexport class VerticalCRS implements VerticalCRSProps {\n /** Vertical CRS Key name. The only supported values are currently \"GEOID\", \"ELLIPSOID\", \"NAVD88\", \"NGVD29\" and \"LOCAL_ELLIPSOID\".\n * GEOID indicates elevations are to be interpreted relative to the local Geoid of the dataset. It can also be considered to be Mean Sea Level.\n * NAVD88 is the local geoid model for the USA. This vertical datum can only be used if the horizontal portion is based on a\n * datum variation of NAD83, NAD27, NSRS2007 and NSRS2011.\n * NGVD29 is the former local geoid model for the USA. This vertical datum can only be used if the horizontal portion is based on a\n * datum variation of NAD83, NAD27, NSRS2007 and NSRS2011.\n * ELLIPSOID indicates that elevations are relative to the surface of the WGS84(or current coincident) ellipsoid.\n * LOCAL_ELLIPSOID indicates that elevations are relative to the surface of the local ellipsoid used by the horizontal CRS. It can only\n * be used for datums that are not considered coincident vertically with WGS84. Use of this vertical datum is strongly discouraged.\n */\n public readonly id: \"GEOID\" | \"ELLIPSOID\" | \"NGVD29\" | \"NAVD88\" | \"LOCAL_ELLIPSOID\";\n\n public constructor(data?: VerticalCRSProps) {\n this.id = \"GEOID\";\n if (data)\n this.id = data.id;\n }\n\n /** Creates a Vertical CRS from JSON representation.\n * @public */\n public static fromJSON(data: VerticalCRSProps): VerticalCRS {\n return new VerticalCRS(data);\n }\n\n /** Creates a JSON from the Vertical CRS definition\n * @public */\n public toJSON(): VerticalCRSProps {\n return { id: this.id };\n }\n\n /** Compares two vertical CRS.\n * @public */\n public equals(other: VerticalCRS): boolean {\n return (this.id === other.id);\n }\n}\n\n/** Geographic Coordinate Reference System definition that includes the horizontal and vertical definitions as well as an optional\n * additional transformation.\n * @see [[GeographicCRS]].\n * @public\n * @extensions\n */\nexport interface GeographicCRSProps {\n /** The horizontal portion of the geographic coordinate reference system. */\n horizontalCRS?: HorizontalCRSProps;\n /** The vertical portion of the geographic coordinate reference system. */\n verticalCRS?: VerticalCRSProps;\n /** The optional additional transform the geographic coordinate reference system. */\n additionalTransform?: AdditionalTransformProps;\n}\n\n/** Geographic Coordinate Reference System implementation. This is the class that indicates the definition of a Geographic\n * coordinate reference system comprised of three components: Horizontal and Vertical and an optional additional transform.\n * The vertical component (see [[VerticalCRS]]) is the simplest portion containing a simple identifier as a string.\n * The optional additional transform of which, currently, only the type Helmert 2D with Z offset [[Helmert2DWithZOffset]] is supported\n * defines a transformation of x,y, and z cartesian coordinate of the projection to the final\n * Geographic Coordinate Reference System cartesian coordinates.\n * The horizontal component contains a list of identification and documentation properties as well as\n * defining details possibly including the projection with method and parameters, the definition of the datum, ellipsoid, extent and so on.\n * The principle of describing a Geographic CRS is that the definition may be incomplete. The whole set of classes related to geographic\n * coordinate reference system classes ([[GeodeticEllipsoid]], [[GeodeticDatum]], [[Projection]], [[GeodeticTransform]], ...) are designed\n * so that they can be parsed from incomplete JSON fragments, or produce incomplete JSON fragments such as would be\n * generated from a request to a REST API to a server when select OData clauses are used.\n * Often GeographicCRS would knowingly be created incomplete but with sufficient information to perform conversion from some\n * reprojection engine (the present set of classes do not provide any GeographicCRS conversion).\n * For example the following definitions are quite sufficient to request conversion to or from by a reprojection engine:\n * { horizontalCRS: {id: \"LL84\"}, verticalCRS: {id:\"GEOID\"}\n * or\n * { horizontalCRS: {datumId: \"WGS84\", projection: {method: \"None\"}}, verticalCRS: \"ELLIPSOID\"}\n * The reprojection engine will use the engine internal dictionary to obtain the details if it can.\n * Some definitions will originate from other sources (a parsed WKT for example) and the reprojection engine will require\n * all mathematical and operational details to perform any conversion (descriptive information are ignored in the conversion process).\n * @note see important detailed explanation in the [[HorizontalCRS]], [[VerticalCRS]] and [[AdditionalTransform]] documentation.\n * @note Earth Centered, Earth Fixed coordinate system (ECEF) is a full 3D cartesian system that unambiguously\n * expressed coordinates relative to the Earth Center. Since there is no horizontal portion independent from\n * the vertical portion this system cannot be represented by a GeographicCRS and remains a separate concept.\n * @public\n*/\nexport class GeographicCRS implements GeographicCRSProps {\n /** The horizontal portion of the geographic coordinate reference system. */\n public readonly horizontalCRS?: HorizontalCRS;\n /** The vertical portion of the geographic coordinate reference system. */\n public readonly verticalCRS?: VerticalCRS;\n /** The optional additional transform the geographic coordinate reference system. */\n public readonly additionalTransform?: AdditionalTransform;\n\n public constructor(data?: GeographicCRSProps) {\n if (data) {\n this.horizontalCRS = data.horizontalCRS ? HorizontalCRS.fromJSON(data.horizontalCRS) : undefined;\n this.verticalCRS = data.verticalCRS ? VerticalCRS.fromJSON(data.verticalCRS) : undefined;\n this.additionalTransform = data.additionalTransform ? AdditionalTransform.fromJSON(data.additionalTransform) : undefined;\n }\n }\n\n /** Creates a Geographic CRS from JSON representation.\n * @public */\n public static fromJSON(data: GeographicCRSProps): GeographicCRS {\n return new GeographicCRS(data);\n }\n\n /** Creates a JSON from the Geographic CRS definition\n * @public */\n public toJSON(): GeographicCRSProps {\n const data: GeographicCRSProps = {};\n if (this.horizontalCRS)\n data.horizontalCRS = this.horizontalCRS.toJSON();\n\n if (this.verticalCRS)\n data.verticalCRS = this.verticalCRS.toJSON();\n\n if (this.additionalTransform)\n data.additionalTransform = this.additionalTransform.toJSON();\n\n return data;\n }\n\n /** Compares two Geographic CRS. It is a strict compare operation not an equivalence test though\n * number compares are applied a minuscule tolerance.\n * It takes into account descriptive properties not only mathematical definition properties.\n * @public\n */\n public equals(other: GeographicCRS): boolean {\n if ((this.horizontalCRS === undefined) !== (other.horizontalCRS === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.horizontalCRS && !this.horizontalCRS.equals(other.horizontalCRS!))\n return false;\n\n if ((this.verticalCRS === undefined) !== (other.verticalCRS === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.verticalCRS && !this.verticalCRS.equals(other.verticalCRS!))\n return false;\n\n if ((this.additionalTransform === undefined) !== (other.additionalTransform === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.additionalTransform && !this.additionalTransform.equals(other.additionalTransform!))\n return false;\n\n return true;\n }\n}\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementGeometry.d.ts","sourceRoot":"","sources":["../../../src/geometry/ElementGeometry.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"ElementGeometry.d.ts","sourceRoot":"","sources":["../../../src/geometry/ElementGeometry.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAsC,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,KAAK,EAA+E,aAAa,EAA6E,OAAO,EAAE,OAAO,EAAiE,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGvW,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAA8C,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAI/F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAuB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtF,OAAO,EAAE,mBAAmB,EAAe,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAsB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E;;;;GAIG;AACH,oBAAY,qBAAqB;IAC/B,0EAA0E;IAC1E,eAAe,IAAI;IACnB,iDAAiD;IACjD,aAAa,IAAI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,OAAO,CA4WnI;IAED,uDAAuD;IACvD,SAAgB,oBAAoB,CAAC,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,wBAAwB,EAAE,EAAE,YAAY,CAAC,EAAE,SAAS,GAAG,OAAO,CAuWvI;IAED,iEAAiE;IACjE,SAAgB,cAAc,CAAC,KAAK,EAAE,wBAAwB,EAAE,aAAa,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CA2BjH;IAED,qEAAqE;IACrE,SAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,SAAS,GAAG,wBAAwB,GAAG,SAAS,CAoC9I;IAED,kGAAkG;IAClG,SAAgB,iBAAiB,CAAC,KAAK,EAAE,wBAAwB,GAAG,mBAAmB,GAAG,SAAS,CAgBlG;IAED,qHAAqH;IACrH,SAAgB,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,GAAG,wBAAwB,GAAG,SAAS,CAqBnG;IAED,mEAAmE;IACnE,SAAgB,WAAW,CAAC,aAAa,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,CAQ9E;IAED,6FAA6F;IAC7F,SAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,mBAAmB,GAAG,SAAS,CAIzF;CACF"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module Geometry
|
|
7
7
|
*/
|
|
8
8
|
import { flatbuffers } from "flatbuffers";
|
|
9
|
-
import { Id64 } from "@itwin/core-bentley";
|
|
9
|
+
import { expectDefined, expectNotNull, Id64 } from "@itwin/core-bentley";
|
|
10
10
|
import { Angle, AngleSweep, Arc3d, BentleyGeometryFlatBuffer, FrameBuilder, LineSegment3d, LineString3d, Loop, Matrix3d, Plane3dByOriginAndUnitNormal, Point2d, Point3d, Point3dArray, PointString3d, PolyfaceQuery, Range2d, Range3d, Transform, Vector3d, YawPitchRollAngles } from "@itwin/core-geometry";
|
|
11
11
|
import { EGFBAccessors } from "./ElementGeometryFB";
|
|
12
12
|
import { Base64EncodedString } from "../Base64EncodedString";
|
|
@@ -291,7 +291,7 @@ export var ElementGeometry;
|
|
|
291
291
|
this.localToWorld = localToWorld;
|
|
292
292
|
this._applyLocalToWorld = applyLocalToWorld ? !localToWorld.isIdentity : false;
|
|
293
293
|
}
|
|
294
|
-
get value() { return this._value; }
|
|
294
|
+
get value() { return expectDefined(this._value); }
|
|
295
295
|
set value(value) { this._value = value; }
|
|
296
296
|
get outputTransform() {
|
|
297
297
|
return this._applyLocalToWorld ? this.localToWorld : undefined;
|
|
@@ -694,8 +694,10 @@ export var ElementGeometry;
|
|
|
694
694
|
const buffer = new flatbuffers.ByteBuffer(entry.data);
|
|
695
695
|
const ppfb = EGFBAccessors.PointPrimitive.getRootAsPointPrimitive(buffer);
|
|
696
696
|
const pts = [];
|
|
697
|
-
for (let i = 0; i < ppfb.coordsLength(); i++)
|
|
698
|
-
|
|
697
|
+
for (let i = 0; i < ppfb.coordsLength(); i++) {
|
|
698
|
+
const coord = expectNotNull(ppfb.coords(i));
|
|
699
|
+
pts.push(Point3d.create(coord.x(), coord.y(), coord.z()));
|
|
700
|
+
}
|
|
699
701
|
if (0 === pts.length)
|
|
700
702
|
return undefined;
|
|
701
703
|
if (undefined !== localToWorld)
|
|
@@ -713,8 +715,10 @@ export var ElementGeometry;
|
|
|
713
715
|
const buffer = new flatbuffers.ByteBuffer(entry.data);
|
|
714
716
|
const ppfb = EGFBAccessors.PointPrimitive2d.getRootAsPointPrimitive2d(buffer);
|
|
715
717
|
const pts = [];
|
|
716
|
-
for (let i = 0; i < ppfb.coordsLength(); i++)
|
|
717
|
-
|
|
718
|
+
for (let i = 0; i < ppfb.coordsLength(); i++) {
|
|
719
|
+
const coord = expectNotNull(ppfb.coords(i));
|
|
720
|
+
pts.push(Point3d.create(coord.x(), coord.y()));
|
|
721
|
+
}
|
|
718
722
|
if (0 === pts.length)
|
|
719
723
|
return undefined;
|
|
720
724
|
if (undefined !== localToWorld)
|
|
@@ -731,9 +735,12 @@ export var ElementGeometry;
|
|
|
731
735
|
case ElementGeometryOpcode.ArcPrimitive: {
|
|
732
736
|
const buffer = new flatbuffers.ByteBuffer(entry.data);
|
|
733
737
|
const ppfb = EGFBAccessors.ArcPrimitive.getRootAsArcPrimitive(buffer);
|
|
734
|
-
const
|
|
735
|
-
const
|
|
736
|
-
const
|
|
738
|
+
const ppfbCenter = expectNotNull(ppfb.center());
|
|
739
|
+
const center = Point3d.create(ppfbCenter.x(), ppfbCenter.y(), ppfbCenter.z());
|
|
740
|
+
const ppfbVector0 = expectNotNull(ppfb.vector0());
|
|
741
|
+
const vector0 = Vector3d.create(ppfbVector0.x(), ppfbVector0.y(), ppfbVector0.z());
|
|
742
|
+
const ppfbVector90 = expectNotNull(ppfb.vector90());
|
|
743
|
+
const vector90 = Vector3d.create(ppfbVector90.x(), ppfbVector90.y(), ppfbVector90.z());
|
|
737
744
|
const arc = Arc3d.create(center, vector0, vector90, AngleSweep.createStartSweepRadians(ppfb.start(), ppfb.sweep()));
|
|
738
745
|
if (undefined !== localToWorld && !arc.tryTransformInPlace(localToWorld))
|
|
739
746
|
return undefined;
|
|
@@ -1755,8 +1762,10 @@ export var ElementGeometry;
|
|
|
1755
1762
|
const ppfb = EGFBAccessors.PointPrimitive.getRootAsPointPrimitive(buffer);
|
|
1756
1763
|
if (2 !== ppfb.coordsLength())
|
|
1757
1764
|
return undefined;
|
|
1758
|
-
const
|
|
1759
|
-
const
|
|
1765
|
+
const coord0 = expectNotNull(ppfb.coords(0));
|
|
1766
|
+
const low = Point3d.create(coord0.x(), coord0.y(), coord0.z());
|
|
1767
|
+
const coord1 = expectNotNull(ppfb.coords(1));
|
|
1768
|
+
const high = Point3d.create(coord1.x(), coord1.y(), coord1.z());
|
|
1760
1769
|
return Range3d.create(low, high);
|
|
1761
1770
|
}
|
|
1762
1771
|
ElementGeometry.toSubGraphicRange = toSubGraphicRange;
|