@itwin/linear-referencing-backend 5.0.0-dev.11 → 5.0.0-dev.110

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/lib/cjs/LinearReferencingElementAspects.d.ts +1 -1
  3. package/lib/cjs/LinearReferencingElementAspects.d.ts.map +1 -1
  4. package/lib/cjs/LinearReferencingElementAspects.js +14 -4
  5. package/lib/cjs/LinearReferencingElementAspects.js.map +1 -1
  6. package/lib/cjs/LinearReferencingElements.d.ts +2 -2
  7. package/lib/cjs/LinearReferencingElements.d.ts.map +1 -1
  8. package/lib/cjs/LinearReferencingElements.js +17 -10
  9. package/lib/cjs/LinearReferencingElements.js.map +1 -1
  10. package/lib/cjs/LinearReferencingRelationships.js +6 -6
  11. package/lib/cjs/LinearReferencingRelationships.js.map +1 -1
  12. package/lib/cjs/LinearReferencingSchema.d.ts +4 -0
  13. package/lib/cjs/LinearReferencingSchema.d.ts.map +1 -1
  14. package/lib/cjs/LinearReferencingSchema.js +8 -4
  15. package/lib/cjs/LinearReferencingSchema.js.map +1 -1
  16. package/lib/cjs/linear-referencing-backend.d.ts +4 -4
  17. package/lib/cjs/linear-referencing-backend.d.ts.map +1 -1
  18. package/lib/cjs/linear-referencing-backend.js +4 -4
  19. package/lib/cjs/linear-referencing-backend.js.map +1 -1
  20. package/lib/esm/LinearReferencingElementAspects.d.ts +54 -0
  21. package/lib/esm/LinearReferencingElementAspects.d.ts.map +1 -0
  22. package/lib/esm/LinearReferencingElementAspects.js +99 -0
  23. package/lib/esm/LinearReferencingElementAspects.js.map +1 -0
  24. package/lib/esm/LinearReferencingElements.d.ts +202 -0
  25. package/lib/esm/LinearReferencingElements.d.ts.map +1 -0
  26. package/lib/esm/LinearReferencingElements.js +606 -0
  27. package/lib/esm/LinearReferencingElements.js.map +1 -0
  28. package/lib/esm/LinearReferencingRelationships.d.ts +63 -0
  29. package/lib/esm/LinearReferencingRelationships.d.ts.map +1 -0
  30. package/lib/esm/LinearReferencingRelationships.js +78 -0
  31. package/lib/esm/LinearReferencingRelationships.js.map +1 -0
  32. package/lib/esm/LinearReferencingSchema.d.ts +18 -0
  33. package/lib/esm/LinearReferencingSchema.d.ts.map +1 -0
  34. package/lib/esm/LinearReferencingSchema.js +34 -0
  35. package/lib/esm/LinearReferencingSchema.js.map +1 -0
  36. package/lib/esm/linear-referencing-backend.d.ts +11 -0
  37. package/lib/esm/linear-referencing-backend.d.ts.map +1 -0
  38. package/lib/esm/linear-referencing-backend.js +15 -0
  39. package/lib/esm/linear-referencing-backend.js.map +1 -0
  40. package/package.json +29 -22
@@ -30,60 +30,60 @@ exports.ILinearLocationLocatesElement = ILinearLocationLocatesElement;
30
30
  * @beta
31
31
  */
32
32
  class ILinearElementProvidedBySource extends core_common_1.RelatedElement {
33
+ static classFullName = "LinearReferencing:ILinearElementProvidedBySource";
33
34
  constructor(sourceId, relClassName = ILinearElementProvidedBySource.classFullName) {
34
35
  super({ id: sourceId, relClassName });
35
36
  }
36
37
  }
37
38
  exports.ILinearElementProvidedBySource = ILinearElementProvidedBySource;
38
- ILinearElementProvidedBySource.classFullName = "LinearReferencing:ILinearElementProvidedBySource";
39
39
  /** Relationship indicating the bis:Element being attributed by a concrete instance mixing-in ILinearlyLocatedAttribution.
40
40
  * @beta
41
41
  */
42
42
  class ILinearlyLocatedAttributesElement extends core_common_1.RelatedElement {
43
+ static classFullName = "LinearReferencing:ILinearlyLocatedAttributesElement";
43
44
  constructor(attributedElementId, relClassName = ILinearlyLocatedAttributesElement.classFullName) {
44
45
  super({ id: attributedElementId, relClassName });
45
46
  }
46
47
  }
47
48
  exports.ILinearlyLocatedAttributesElement = ILinearlyLocatedAttributesElement;
48
- ILinearlyLocatedAttributesElement.classFullName = "LinearReferencing:ILinearlyLocatedAttributesElement";
49
49
  /** Relationship indicating the bis:SpatialElement being used as Referent for Linear Referencing purposes.
50
50
  * @beta
51
51
  */
52
52
  class IReferentReferencesElement extends core_common_1.RelatedElement {
53
+ static classFullName = "LinearReferencing:IReferentReferencesElement";
53
54
  constructor(referencedElementId, relClassName = IReferentReferencesElement.classFullName) {
54
55
  super({ id: referencedElementId, relClassName });
55
56
  }
56
57
  }
57
58
  exports.IReferentReferencesElement = IReferentReferencesElement;
58
- IReferentReferencesElement.classFullName = "LinearReferencing:IReferentReferencesElement";
59
59
  /** Relationship indicating the referent used by a particular linearly-referenced At position.
60
60
  * @beta
61
61
  */
62
62
  class LinearlyReferencedAtPositionRefersToReferent extends core_common_1.RelatedElement {
63
+ static classFullName = "LinearReferencing:LinearlyReferencedAtPositionRefersToReferent";
63
64
  constructor(referentId, relClassName = IReferentReferencesElement.classFullName) {
64
65
  super({ id: referentId, relClassName });
65
66
  }
66
67
  }
67
68
  exports.LinearlyReferencedAtPositionRefersToReferent = LinearlyReferencedAtPositionRefersToReferent;
68
- LinearlyReferencedAtPositionRefersToReferent.classFullName = "LinearReferencing:LinearlyReferencedAtPositionRefersToReferent";
69
69
  /** Relationship indicating the referent used by a particular linearly-referenced From position.
70
70
  * @beta
71
71
  */
72
72
  class LinearlyReferencedFromPositionRefersToReferent extends core_common_1.RelatedElement {
73
+ static classFullName = "LinearReferencing:LinearlyReferencedFromPositionRefersToReferent";
73
74
  constructor(referentId, relClassName = LinearlyReferencedFromPositionRefersToReferent.classFullName) {
74
75
  super({ id: referentId, relClassName });
75
76
  }
76
77
  }
77
78
  exports.LinearlyReferencedFromPositionRefersToReferent = LinearlyReferencedFromPositionRefersToReferent;
78
- LinearlyReferencedFromPositionRefersToReferent.classFullName = "LinearReferencing:LinearlyReferencedFromPositionRefersToReferent";
79
79
  /** Relationship indicating the referent used by a particular linearly-referenced To position.
80
80
  * @beta
81
81
  */
82
82
  class LinearlyReferencedToPositionRefersToReferent extends core_common_1.RelatedElement {
83
+ static classFullName = "LinearReferencing:LinearlyReferencedToPositionRefersToReferent";
83
84
  constructor(referentId, relClassName = LinearlyReferencedToPositionRefersToReferent.classFullName) {
84
85
  super({ id: referentId, relClassName });
85
86
  }
86
87
  }
87
88
  exports.LinearlyReferencedToPositionRefersToReferent = LinearlyReferencedToPositionRefersToReferent;
88
- LinearlyReferencedToPositionRefersToReferent.classFullName = "LinearReferencing:LinearlyReferencedToPositionRefersToReferent";
89
89
  //# sourceMappingURL=LinearReferencingRelationships.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinearReferencingRelationships.js","sourceRoot":"","sources":["../../src/LinearReferencingRelationships.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,sDAA8D;AAC9D,oDAAoD;AAEpD;;GAEG;AACH,MAAa,mCAAoC,SAAQ,sCAAuB;IAC9E,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,qCAAqC,CAAC,CAAC,CAAC;CACjG;AAHD,kFAGC;AAED;;GAEG;AACH,MAAa,6BAA8B,SAAQ,sCAAuB;IACxE,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,+BAA+B,CAAC,CAAC,CAAC;CAC3F;AAHD,sEAGC;AAED;;GAEG;AACH,MAAa,8BAA+B,SAAQ,4BAAc;IAEhE,YAAmB,QAAoB,EAAE,eAAuB,8BAA8B,CAAC,aAAa;QAC1G,KAAK,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;IACxC,CAAC;;AAJH,wEAKC;AAJe,4CAAa,GAAG,kDAAkD,CAAC;AAMnF;;GAEG;AACH,MAAa,iCAAkC,SAAQ,4BAAc;IAEnE,YAAmB,mBAA+B,EAAE,eAAuB,iCAAiC,CAAC,aAAa;QACxH,KAAK,CAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,YAAY,EAAE,CAAC,CAAC;IACnD,CAAC;;AAJH,8EAKC;AAJe,+CAAa,GAAG,qDAAqD,CAAC;AAMtF;;GAEG;AACH,MAAa,0BAA2B,SAAQ,4BAAc;IAE5D,YAAmB,mBAA+B,EAAE,eAAuB,0BAA0B,CAAC,aAAa;QACjH,KAAK,CAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,YAAY,EAAE,CAAC,CAAC;IACnD,CAAC;;AAJH,gEAKC;AAJe,wCAAa,GAAG,8CAA8C,CAAC;AAM/E;;GAEG;AACH,MAAa,4CAA6C,SAAQ,4BAAc;IAE9E,YAAmB,UAAsB,EAAE,eAAuB,0BAA0B,CAAC,aAAa;QACxG,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1C,CAAC;;AAJH,oGAKC;AAJe,0DAAa,GAAG,gEAAgE,CAAC;AAMjG;;GAEG;AACH,MAAa,8CAA+C,SAAQ,4BAAc;IAEhF,YAAmB,UAAsB,EAAE,eAAuB,8CAA8C,CAAC,aAAa;QAC5H,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1C,CAAC;;AAJH,wGAKC;AAJe,4DAAa,GAAG,kEAAkE,CAAC;AAMnG;;GAEG;AACH,MAAa,4CAA6C,SAAQ,4BAAc;IAE9E,YAAmB,UAAsB,EAAE,eAAuB,4CAA4C,CAAC,aAAa;QAC1H,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1C,CAAC;;AAJH,oGAKC;AAJe,0DAAa,GAAG,gEAAgE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LinearReferencing\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ElementRefersToElements } from \"@itwin/core-backend\";\r\nimport { RelatedElement } from \"@itwin/core-common\";\r\n\r\n/** Relationship indicating the Linear-Element along which concrete instances mixing-in ILinearlyLocated are located.\r\n * @beta\r\n */\r\nexport class ILinearlyLocatedAlongILinearElement extends ElementRefersToElements {\r\n /** @internal */\r\n public static override get className(): string { return \"ILinearlyLocatedAlongILinearElement\"; }\r\n}\r\n\r\n/** Relationship indicating bis:Element being linearly-located by a concrete instance mixing-in ILinearLocationElement.\r\n * @beta\r\n */\r\nexport class ILinearLocationLocatesElement extends ElementRefersToElements {\r\n /** @internal */\r\n public static override get className(): string { return \"ILinearLocationLocatesElement\"; }\r\n}\r\n\r\n/** Relationship associating Linear-Elements with the elements they came from.\r\n * @beta\r\n */\r\nexport class ILinearElementProvidedBySource extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:ILinearElementProvidedBySource\";\r\n public constructor(sourceId: Id64String, relClassName: string = ILinearElementProvidedBySource.classFullName) {\r\n super({ id: sourceId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the bis:Element being attributed by a concrete instance mixing-in ILinearlyLocatedAttribution.\r\n * @beta\r\n */\r\nexport class ILinearlyLocatedAttributesElement extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:ILinearlyLocatedAttributesElement\";\r\n public constructor(attributedElementId: Id64String, relClassName: string = ILinearlyLocatedAttributesElement.classFullName) {\r\n super({ id: attributedElementId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the bis:SpatialElement being used as Referent for Linear Referencing purposes.\r\n * @beta\r\n */\r\nexport class IReferentReferencesElement extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:IReferentReferencesElement\";\r\n public constructor(referencedElementId: Id64String, relClassName: string = IReferentReferencesElement.classFullName) {\r\n super({ id: referencedElementId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the referent used by a particular linearly-referenced At position.\r\n * @beta\r\n */\r\nexport class LinearlyReferencedAtPositionRefersToReferent extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:LinearlyReferencedAtPositionRefersToReferent\";\r\n public constructor(referentId: Id64String, relClassName: string = IReferentReferencesElement.classFullName) {\r\n super({ id: referentId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the referent used by a particular linearly-referenced From position.\r\n * @beta\r\n */\r\nexport class LinearlyReferencedFromPositionRefersToReferent extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:LinearlyReferencedFromPositionRefersToReferent\";\r\n public constructor(referentId: Id64String, relClassName: string = LinearlyReferencedFromPositionRefersToReferent.classFullName) {\r\n super({ id: referentId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the referent used by a particular linearly-referenced To position.\r\n * @beta\r\n */\r\nexport class LinearlyReferencedToPositionRefersToReferent extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:LinearlyReferencedToPositionRefersToReferent\";\r\n public constructor(referentId: Id64String, relClassName: string = LinearlyReferencedToPositionRefersToReferent.classFullName) {\r\n super({ id: referentId, relClassName });\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LinearReferencingRelationships.js","sourceRoot":"","sources":["../../src/LinearReferencingRelationships.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,sDAA8D;AAC9D,oDAAoD;AAEpD;;GAEG;AACH,MAAa,mCAAoC,SAAQ,sCAAuB;IAC9E,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,qCAAqC,CAAC,CAAC,CAAC;CACjG;AAHD,kFAGC;AAED;;GAEG;AACH,MAAa,6BAA8B,SAAQ,sCAAuB;IACxE,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,+BAA+B,CAAC,CAAC,CAAC;CAC3F;AAHD,sEAGC;AAED;;GAEG;AACH,MAAa,8BAA+B,SAAQ,4BAAc;IACzD,MAAM,CAAC,aAAa,GAAG,kDAAkD,CAAC;IACjF,YAAmB,QAAoB,EAAE,eAAuB,8BAA8B,CAAC,aAAa;QAC1G,KAAK,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;IACxC,CAAC;;AAJH,wEAKC;AAED;;GAEG;AACH,MAAa,iCAAkC,SAAQ,4BAAc;IAC5D,MAAM,CAAC,aAAa,GAAG,qDAAqD,CAAC;IACpF,YAAmB,mBAA+B,EAAE,eAAuB,iCAAiC,CAAC,aAAa;QACxH,KAAK,CAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,YAAY,EAAE,CAAC,CAAC;IACnD,CAAC;;AAJH,8EAKC;AAED;;GAEG;AACH,MAAa,0BAA2B,SAAQ,4BAAc;IACrD,MAAM,CAAC,aAAa,GAAG,8CAA8C,CAAC;IAC7E,YAAmB,mBAA+B,EAAE,eAAuB,0BAA0B,CAAC,aAAa;QACjH,KAAK,CAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,YAAY,EAAE,CAAC,CAAC;IACnD,CAAC;;AAJH,gEAKC;AAED;;GAEG;AACH,MAAa,4CAA6C,SAAQ,4BAAc;IACvE,MAAM,CAAC,aAAa,GAAG,gEAAgE,CAAC;IAC/F,YAAmB,UAAsB,EAAE,eAAuB,0BAA0B,CAAC,aAAa;QACxG,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1C,CAAC;;AAJH,oGAKC;AAED;;GAEG;AACH,MAAa,8CAA+C,SAAQ,4BAAc;IACzE,MAAM,CAAC,aAAa,GAAG,kEAAkE,CAAC;IACjG,YAAmB,UAAsB,EAAE,eAAuB,8CAA8C,CAAC,aAAa;QAC5H,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1C,CAAC;;AAJH,wGAKC;AAED;;GAEG;AACH,MAAa,4CAA6C,SAAQ,4BAAc;IACvE,MAAM,CAAC,aAAa,GAAG,gEAAgE,CAAC;IAC/F,YAAmB,UAAsB,EAAE,eAAuB,4CAA4C,CAAC,aAAa;QAC1H,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1C,CAAC;;AAJH,oGAKC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LinearReferencing\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { ElementRefersToElements } from \"@itwin/core-backend\";\r\nimport { RelatedElement } from \"@itwin/core-common\";\r\n\r\n/** Relationship indicating the Linear-Element along which concrete instances mixing-in ILinearlyLocated are located.\r\n * @beta\r\n */\r\nexport class ILinearlyLocatedAlongILinearElement extends ElementRefersToElements {\r\n /** @internal */\r\n public static override get className(): string { return \"ILinearlyLocatedAlongILinearElement\"; }\r\n}\r\n\r\n/** Relationship indicating bis:Element being linearly-located by a concrete instance mixing-in ILinearLocationElement.\r\n * @beta\r\n */\r\nexport class ILinearLocationLocatesElement extends ElementRefersToElements {\r\n /** @internal */\r\n public static override get className(): string { return \"ILinearLocationLocatesElement\"; }\r\n}\r\n\r\n/** Relationship associating Linear-Elements with the elements they came from.\r\n * @beta\r\n */\r\nexport class ILinearElementProvidedBySource extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:ILinearElementProvidedBySource\";\r\n public constructor(sourceId: Id64String, relClassName: string = ILinearElementProvidedBySource.classFullName) {\r\n super({ id: sourceId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the bis:Element being attributed by a concrete instance mixing-in ILinearlyLocatedAttribution.\r\n * @beta\r\n */\r\nexport class ILinearlyLocatedAttributesElement extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:ILinearlyLocatedAttributesElement\";\r\n public constructor(attributedElementId: Id64String, relClassName: string = ILinearlyLocatedAttributesElement.classFullName) {\r\n super({ id: attributedElementId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the bis:SpatialElement being used as Referent for Linear Referencing purposes.\r\n * @beta\r\n */\r\nexport class IReferentReferencesElement extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:IReferentReferencesElement\";\r\n public constructor(referencedElementId: Id64String, relClassName: string = IReferentReferencesElement.classFullName) {\r\n super({ id: referencedElementId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the referent used by a particular linearly-referenced At position.\r\n * @beta\r\n */\r\nexport class LinearlyReferencedAtPositionRefersToReferent extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:LinearlyReferencedAtPositionRefersToReferent\";\r\n public constructor(referentId: Id64String, relClassName: string = IReferentReferencesElement.classFullName) {\r\n super({ id: referentId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the referent used by a particular linearly-referenced From position.\r\n * @beta\r\n */\r\nexport class LinearlyReferencedFromPositionRefersToReferent extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:LinearlyReferencedFromPositionRefersToReferent\";\r\n public constructor(referentId: Id64String, relClassName: string = LinearlyReferencedFromPositionRefersToReferent.classFullName) {\r\n super({ id: referentId, relClassName });\r\n }\r\n}\r\n\r\n/** Relationship indicating the referent used by a particular linearly-referenced To position.\r\n * @beta\r\n */\r\nexport class LinearlyReferencedToPositionRefersToReferent extends RelatedElement {\r\n public static classFullName = \"LinearReferencing:LinearlyReferencedToPositionRefersToReferent\";\r\n public constructor(referentId: Id64String, relClassName: string = LinearlyReferencedToPositionRefersToReferent.classFullName) {\r\n super({ id: referentId, relClassName });\r\n }\r\n}\r\n"]}
@@ -8,6 +8,10 @@ import { Schema } from "@itwin/core-backend";
8
8
  */
9
9
  export declare class LinearReferencingSchema extends Schema {
10
10
  static get schemaName(): string;
11
+ /**
12
+ * TODO: Currently the schema file comes from a hardcoded path assuming its delivered with imodeljs-native
13
+ * Look to add a dependency on @bentley/linear-referencing-schema and using require.resolve to obtain the path
14
+ */
11
15
  static get schemaFilePath(): string;
12
16
  static registerSchema(): void;
13
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LinearReferencingSchema.d.ts","sourceRoot":"","sources":["../../src/LinearReferencingSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAiC,MAAM,EAAW,MAAM,qBAAqB,CAAC;AAKrF;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,MAAM;IACjD,WAA2B,UAAU,IAAI,MAAM,CAAgC;IAC/E,WAAkB,cAAc,IAAI,MAAM,CAA+G;WAC3I,cAAc;CAU7B"}
1
+ {"version":3,"file":"LinearReferencingSchema.d.ts","sourceRoot":"","sources":["../../src/LinearReferencingSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAiC,MAAM,EAAW,MAAM,qBAAqB,CAAC;AAKrF;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,MAAM;IACjD,WAA2B,UAAU,IAAI,MAAM,CAAgC;IAC7E;;;KAGC;IACH,WAAkB,cAAc,IAAI,MAAM,CAA+G;WAC3I,cAAc;CAU7B"}
@@ -8,17 +8,21 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.LinearReferencingSchema = void 0;
11
- const path = require("path");
11
+ const path = require("node:path");
12
12
  const core_backend_1 = require("@itwin/core-backend");
13
- const aspectsModule = require("./LinearReferencingElementAspects");
14
- const elementsModule = require("./LinearReferencingElements");
15
- const relationshipsModule = require("./LinearReferencingRelationships");
13
+ const aspectsModule = require("./LinearReferencingElementAspects.js");
14
+ const elementsModule = require("./LinearReferencingElements.js");
15
+ const relationshipsModule = require("./LinearReferencingRelationships.js");
16
16
  /** Schema for the LinearReferencing domain.
17
17
  * [Linear referencing](https://en.wikipedia.org/wiki/Linear_referencing) is the method of storing geographic locations by using relative positions along a measured linear feature.
18
18
  * @beta
19
19
  */
20
20
  class LinearReferencingSchema extends core_backend_1.Schema {
21
21
  static get schemaName() { return "LinearReferencing"; }
22
+ /**
23
+ * TODO: Currently the schema file comes from a hardcoded path assuming its delivered with imodeljs-native
24
+ * Look to add a dependency on @bentley/linear-referencing-schema and using require.resolve to obtain the path
25
+ */
22
26
  static get schemaFilePath() { return path.join(core_backend_1.KnownLocations.nativeAssetsDir, "ECSchemas", "Domain", "LinearReferencing.ecschema.xml"); }
23
27
  static registerSchema() {
24
28
  if (this !== core_backend_1.Schemas.getRegisteredSchema(this.schemaName)) {
@@ -1 +1 @@
1
- {"version":3,"file":"LinearReferencingSchema.js","sourceRoot":"","sources":["../../src/LinearReferencingSchema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,sDAAqF;AACrF,mEAAmE;AACnE,8DAA8D;AAC9D,wEAAwE;AAExE;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,qBAAM;IAC1C,MAAM,KAAc,UAAU,KAAa,OAAO,mBAAmB,CAAC,CAAC,CAAC;IACxE,MAAM,KAAK,cAAc,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,6BAAc,CAAC,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,gCAAgC,CAAC,CAAC,CAAC,CAAC;IAClJ,MAAM,CAAC,cAAc;QAC1B,IAAI,IAAI,KAAK,sBAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1D,sBAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC1C,sBAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YAE7B,4BAAa,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YACnD,4BAAa,CAAC,cAAc,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;YAClD,4BAAa,CAAC,cAAc,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;CACF;AAbD,0DAaC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LinearReferencing\r\n */\r\n\r\nimport * as path from \"path\";\r\nimport { ClassRegistry, KnownLocations, Schema, Schemas } from \"@itwin/core-backend\";\r\nimport * as aspectsModule from \"./LinearReferencingElementAspects\";\r\nimport * as elementsModule from \"./LinearReferencingElements\";\r\nimport * as relationshipsModule from \"./LinearReferencingRelationships\";\r\n\r\n/** Schema for the LinearReferencing domain.\r\n * [Linear referencing](https://en.wikipedia.org/wiki/Linear_referencing) is the method of storing geographic locations by using relative positions along a measured linear feature.\r\n * @beta\r\n */\r\nexport class LinearReferencingSchema extends Schema {\r\n public static override get schemaName(): string { return \"LinearReferencing\"; }\r\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Domain\", \"LinearReferencing.ecschema.xml\"); }\r\n public static registerSchema() {\r\n if (this !== Schemas.getRegisteredSchema(this.schemaName)) {\r\n Schemas.unregisterSchema(this.schemaName);\r\n Schemas.registerSchema(this);\r\n\r\n ClassRegistry.registerModule(elementsModule, this);\r\n ClassRegistry.registerModule(aspectsModule, this);\r\n ClassRegistry.registerModule(relationshipsModule, this);\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LinearReferencingSchema.js","sourceRoot":"","sources":["../../src/LinearReferencingSchema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,kCAAkC;AAClC,sDAAqF;AACrF,sEAAsE;AACtE,iEAAiE;AACjE,2EAA2E;AAE3E;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,qBAAM;IAC1C,MAAM,KAAc,UAAU,KAAa,OAAO,mBAAmB,CAAC,CAAC,CAAC;IAC7E;;;KAGC;IACI,MAAM,KAAK,cAAc,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,6BAAc,CAAC,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,gCAAgC,CAAC,CAAC,CAAC,CAAC;IAClJ,MAAM,CAAC,cAAc;QAC1B,IAAI,IAAI,KAAK,sBAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAC1D,sBAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC1C,sBAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YAE7B,4BAAa,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YACnD,4BAAa,CAAC,cAAc,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;YAClD,4BAAa,CAAC,cAAc,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;CACF;AAjBD,0DAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LinearReferencing\r\n */\r\n\r\nimport * as path from \"node:path\";\r\nimport { ClassRegistry, KnownLocations, Schema, Schemas } from \"@itwin/core-backend\";\r\nimport * as aspectsModule from \"./LinearReferencingElementAspects.js\";\r\nimport * as elementsModule from \"./LinearReferencingElements.js\";\r\nimport * as relationshipsModule from \"./LinearReferencingRelationships.js\";\r\n\r\n/** Schema for the LinearReferencing domain.\r\n * [Linear referencing](https://en.wikipedia.org/wiki/Linear_referencing) is the method of storing geographic locations by using relative positions along a measured linear feature.\r\n * @beta\r\n */\r\nexport class LinearReferencingSchema extends Schema {\r\n public static override get schemaName(): string { return \"LinearReferencing\"; }\r\n /**\r\n * TODO: Currently the schema file comes from a hardcoded path assuming its delivered with imodeljs-native\r\n * Look to add a dependency on @bentley/linear-referencing-schema and using require.resolve to obtain the path\r\n */\r\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Domain\", \"LinearReferencing.ecschema.xml\"); }\r\n public static registerSchema() {\r\n if (this !== Schemas.getRegisteredSchema(this.schemaName)) {\r\n Schemas.unregisterSchema(this.schemaName);\r\n Schemas.registerSchema(this);\r\n\r\n ClassRegistry.registerModule(elementsModule, this);\r\n ClassRegistry.registerModule(aspectsModule, this);\r\n ClassRegistry.registerModule(relationshipsModule, this);\r\n }\r\n }\r\n}\r\n"]}
@@ -1,7 +1,7 @@
1
- export * from "./LinearReferencingElementAspects";
2
- export * from "./LinearReferencingElements";
3
- export * from "./LinearReferencingRelationships";
4
- export * from "./LinearReferencingSchema";
1
+ export * from "./LinearReferencingElementAspects.js";
2
+ export * from "./LinearReferencingElements.js";
3
+ export * from "./LinearReferencingRelationships.js";
4
+ export * from "./LinearReferencingSchema.js";
5
5
  /** @docs-package-description
6
6
  * The `@itwin/linear-referencing-backend` package contains classes for working with the LinearReferencing schema on the backend.
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"linear-referencing-backend.d.ts","sourceRoot":"","sources":["../../src/linear-referencing-backend.ts"],"names":[],"mappings":"AAKA,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAE1C;;GAEG;AAEH;;GAEG"}
1
+ {"version":3,"file":"linear-referencing-backend.d.ts","sourceRoot":"","sources":["../../src/linear-referencing-backend.ts"],"names":[],"mappings":"AAKA,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAE7C;;GAEG;AAEH;;GAEG"}
@@ -18,10 +18,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- __exportStar(require("./LinearReferencingElementAspects"), exports);
22
- __exportStar(require("./LinearReferencingElements"), exports);
23
- __exportStar(require("./LinearReferencingRelationships"), exports);
24
- __exportStar(require("./LinearReferencingSchema"), exports);
21
+ __exportStar(require("./LinearReferencingElementAspects.js"), exports);
22
+ __exportStar(require("./LinearReferencingElements.js"), exports);
23
+ __exportStar(require("./LinearReferencingRelationships.js"), exports);
24
+ __exportStar(require("./LinearReferencingSchema.js"), exports);
25
25
  /** @docs-package-description
26
26
  * The `@itwin/linear-referencing-backend` package contains classes for working with the LinearReferencing schema on the backend.
27
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"linear-referencing-backend.js","sourceRoot":"","sources":["../../src/linear-referencing-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,oEAAkD;AAClD,8DAA4C;AAC5C,mEAAiD;AACjD,4DAA0C;AAE1C;;GAEG;AAEH;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport * from \"./LinearReferencingElementAspects\";\r\nexport * from \"./LinearReferencingElements\";\r\nexport * from \"./LinearReferencingRelationships\";\r\nexport * from \"./LinearReferencingSchema\";\r\n\r\n/** @docs-package-description\r\n * The `@itwin/linear-referencing-backend` package contains classes for working with the LinearReferencing schema on the backend.\r\n */\r\n\r\n/** @docs-group-description LinearReferencing\r\n * [Linear referencing](https://en.wikipedia.org/wiki/Linear_referencing) is the method of storing geographic locations by using relative positions along a measured linear feature.\r\n */\r\n"]}
1
+ {"version":3,"file":"linear-referencing-backend.js","sourceRoot":"","sources":["../../src/linear-referencing-backend.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,uEAAqD;AACrD,iEAA+C;AAC/C,sEAAoD;AACpD,+DAA6C;AAE7C;;GAEG;AAEH;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport * from \"./LinearReferencingElementAspects.js\";\r\nexport * from \"./LinearReferencingElements.js\";\r\nexport * from \"./LinearReferencingRelationships.js\";\r\nexport * from \"./LinearReferencingSchema.js\";\r\n\r\n/** @docs-package-description\r\n * The `@itwin/linear-referencing-backend` package contains classes for working with the LinearReferencing schema on the backend.\r\n */\r\n\r\n/** @docs-group-description LinearReferencing\r\n * [Linear referencing](https://en.wikipedia.org/wiki/Linear_referencing) is the method of storing geographic locations by using relative positions along a measured linear feature.\r\n */\r\n"]}
@@ -0,0 +1,54 @@
1
+ /** @packageDocumentation
2
+ * @module LinearReferencing
3
+ */
4
+ import { Id64String } from "@itwin/core-bentley";
5
+ import { ElementMultiAspect, IModelDb } from "@itwin/core-backend";
6
+ import { DistanceExpressionProps, LinearlyReferencedAtLocationAspectProps, LinearlyReferencedFromToLocationAspectProps } from "@itwin/linear-referencing-common";
7
+ import { LinearlyReferencedAtPositionRefersToReferent, LinearlyReferencedFromPositionRefersToReferent, LinearlyReferencedToPositionRefersToReferent } from "./LinearReferencingRelationships.js";
8
+ /** Core structure carrying linearly-referenced information.
9
+ * @beta
10
+ */
11
+ export declare class DistanceExpression implements DistanceExpressionProps {
12
+ distanceAlongFromStart: number;
13
+ lateralOffsetFromILinearElement?: number;
14
+ verticalOffsetFromILinearElement?: number;
15
+ distanceAlongFromReferent?: number;
16
+ constructor(props: DistanceExpressionProps);
17
+ static fromJSON(json: DistanceExpressionProps): DistanceExpression;
18
+ }
19
+ /** Base class for multi-aspects carrying linearly-referenced locations.
20
+ * @beta
21
+ */
22
+ export declare class LinearlyReferencedLocation extends ElementMultiAspect {
23
+ /** @internal */
24
+ static get className(): string;
25
+ }
26
+ /** Concrete multi-aspect class carrying 'at' linearly-referenced positions along a Linear-Element.
27
+ * @beta
28
+ */
29
+ export declare class LinearlyReferencedAtLocation extends LinearlyReferencedLocation {
30
+ /** @internal */
31
+ static get className(): string;
32
+ atPosition: DistanceExpression;
33
+ fromReferent?: LinearlyReferencedAtPositionRefersToReferent;
34
+ constructor(props: LinearlyReferencedAtLocationAspectProps, iModel: IModelDb);
35
+ private static toProps;
36
+ static create(iModel: IModelDb, locatedElementId: Id64String, at: DistanceExpression, fromReferentId?: Id64String): LinearlyReferencedAtLocation;
37
+ static insert(iModel: IModelDb, locatedElementId: Id64String, at: DistanceExpression, fromReferentId?: Id64String): void;
38
+ }
39
+ /** Concrete multi-aspect class carrying 'from-to' linearly-referenced positions along a Linear-Element.
40
+ * @beta
41
+ */
42
+ export declare class LinearlyReferencedFromToLocation extends LinearlyReferencedLocation {
43
+ /** @internal */
44
+ static get className(): string;
45
+ fromPosition: DistanceExpression;
46
+ fromPositionFromReferent?: LinearlyReferencedFromPositionRefersToReferent;
47
+ toPosition: DistanceExpression;
48
+ toPositionFromReferent?: LinearlyReferencedToPositionRefersToReferent;
49
+ constructor(props: LinearlyReferencedFromToLocationAspectProps, iModel: IModelDb);
50
+ private static toProps;
51
+ static create(iModel: IModelDb, locatedElementId: Id64String, from: DistanceExpression, to: DistanceExpression, fromReferentId?: Id64String, toReferentId?: Id64String): LinearlyReferencedFromToLocation;
52
+ static insert(iModel: IModelDb, locatedElementId: Id64String, from: DistanceExpression, to: DistanceExpression, fromReferentId?: Id64String, toReferentId?: Id64String): void;
53
+ }
54
+ //# sourceMappingURL=LinearReferencingElementAspects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinearReferencingElementAspects.d.ts","sourceRoot":"","sources":["../../src/LinearReferencingElementAspects.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EACL,uBAAuB,EAAE,uCAAuC,EAAE,2CAA2C,EAC9G,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,4CAA4C,EAAE,8CAA8C,EAAE,4CAA4C,EAC3I,MAAM,qCAAqC,CAAC;AAE7C;;GAEG;A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QhF,OAAO,CAAC,MAAM,CAAC,OAAO;WAcR,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,UAAU,EACjE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE,kBAAkB,EAAE,cAAc,CAAC,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,UAAU,GAAG,gCAAgC;WAI/H,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,UAAU,EACjE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE,kBAAkB,EAAE,cAAc,CAAC,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,UAAU,GAAG,IAAI;CAGlH"}
@@ -0,0 +1,99 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module LinearReferencing
7
+ */
8
+ import { JsonUtils } from "@itwin/core-bentley";
9
+ import { ElementMultiAspect } from "@itwin/core-backend";
10
+ import { RelatedElement } from "@itwin/core-common";
11
+ import { LinearlyReferencedAtPositionRefersToReferent, LinearlyReferencedFromPositionRefersToReferent, LinearlyReferencedToPositionRefersToReferent, } from "./LinearReferencingRelationships.js";
12
+ /** Core structure carrying linearly-referenced information.
13
+ * @beta
14
+ */
15
+ export class DistanceExpression {
16
+ distanceAlongFromStart;
17
+ lateralOffsetFromILinearElement;
18
+ verticalOffsetFromILinearElement;
19
+ distanceAlongFromReferent;
20
+ constructor(props) {
21
+ this.distanceAlongFromStart = JsonUtils.asDouble(props.distanceAlongFromStart);
22
+ this.lateralOffsetFromILinearElement = JsonUtils.asDouble(props.lateralOffsetFromILinearElement);
23
+ this.verticalOffsetFromILinearElement = JsonUtils.asDouble(props.verticalOffsetFromILinearElement);
24
+ this.distanceAlongFromReferent = JsonUtils.asDouble(props.distanceAlongFromReferent);
25
+ }
26
+ static fromJSON(json) { return new DistanceExpression(json); }
27
+ }
28
+ /** Base class for multi-aspects carrying linearly-referenced locations.
29
+ * @beta
30
+ */
31
+ export class LinearlyReferencedLocation extends ElementMultiAspect {
32
+ /** @internal */
33
+ static get className() { return "LinearlyReferencedLocation"; }
34
+ }
35
+ /** Concrete multi-aspect class carrying 'at' linearly-referenced positions along a Linear-Element.
36
+ * @beta
37
+ */
38
+ export class LinearlyReferencedAtLocation extends LinearlyReferencedLocation {
39
+ /** @internal */
40
+ static get className() { return "LinearlyReferencedAtLocation"; }
41
+ atPosition;
42
+ fromReferent;
43
+ constructor(props, iModel) {
44
+ super(props, iModel);
45
+ this.atPosition = DistanceExpression.fromJSON(props.atPosition);
46
+ this.fromReferent = RelatedElement.fromJSON(props.fromReferent);
47
+ }
48
+ static toProps(locatedElementId, at, fromReferentId) {
49
+ const props = {
50
+ classFullName: LinearlyReferencedAtLocation.classFullName,
51
+ element: { id: locatedElementId },
52
+ atPosition: at,
53
+ fromReferent: (fromReferentId === undefined) ? undefined : new LinearlyReferencedAtPositionRefersToReferent(fromReferentId),
54
+ };
55
+ return props;
56
+ }
57
+ static create(iModel, locatedElementId, at, fromReferentId) {
58
+ return new LinearlyReferencedAtLocation(this.toProps(locatedElementId, at, fromReferentId), iModel);
59
+ }
60
+ static insert(iModel, locatedElementId, at, fromReferentId) {
61
+ iModel.elements.insertAspect(this.toProps(locatedElementId, at, fromReferentId));
62
+ }
63
+ }
64
+ /** Concrete multi-aspect class carrying 'from-to' linearly-referenced positions along a Linear-Element.
65
+ * @beta
66
+ */
67
+ export class LinearlyReferencedFromToLocation extends LinearlyReferencedLocation {
68
+ /** @internal */
69
+ static get className() { return "LinearlyReferencedFromToLocation"; }
70
+ fromPosition;
71
+ fromPositionFromReferent;
72
+ toPosition;
73
+ toPositionFromReferent;
74
+ constructor(props, iModel) {
75
+ super(props, iModel);
76
+ this.fromPosition = DistanceExpression.fromJSON(props.fromPosition);
77
+ this.toPosition = DistanceExpression.fromJSON(props.toPosition);
78
+ this.fromPositionFromReferent = RelatedElement.fromJSON(props.fromPositionFromReferent);
79
+ this.toPositionFromReferent = RelatedElement.fromJSON(props.toPositionFromReferent);
80
+ }
81
+ static toProps(locatedElementId, from, to, fromReferentId, toReferentId) {
82
+ const props = {
83
+ classFullName: LinearlyReferencedFromToLocation.classFullName,
84
+ element: { id: locatedElementId },
85
+ fromPosition: from,
86
+ fromPositionFromReferent: (fromReferentId === undefined) ? undefined : new LinearlyReferencedFromPositionRefersToReferent(fromReferentId),
87
+ toPosition: to,
88
+ toPositionFromReferent: (toReferentId === undefined) ? undefined : new LinearlyReferencedToPositionRefersToReferent(toReferentId),
89
+ };
90
+ return props;
91
+ }
92
+ static create(iModel, locatedElementId, from, to, fromReferentId, toReferentId) {
93
+ return new LinearlyReferencedFromToLocation(this.toProps(locatedElementId, from, to, fromReferentId, toReferentId), iModel);
94
+ }
95
+ static insert(iModel, locatedElementId, from, to, fromReferentId, toReferentId) {
96
+ iModel.elements.insertAspect(this.toProps(locatedElementId, from, to, fromReferentId, toReferentId));
97
+ }
98
+ }
99
+ //# sourceMappingURL=LinearReferencingElementAspects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinearReferencingElementAspects.js","sourceRoot":"","sources":["../../src/LinearReferencingElementAspects.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAc,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAY,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,OAAO,EACL,4CAA4C,EAAE,8CAA8C,EAAE,4CAA4C,GAC3I,MAAM,qCAAqC,CAAC;AAE7C;;GAEG;AACH,MAAM,OAAO,kBAAkB;IACtB,sBAAsB,CAAS;IAC/B,+BAA+B,CAAU;IACzC,gCAAgC,CAAU;IAC1C,yBAAyB,CAAU;IAE1C,YAAY,KAA8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AQ,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACtF,CAAC;IAEO,MAAM,CAAC,OAAO,CAAC,gBAA4B,EACjD,IAAwB,EAAE,EAAsB,EAAE,cAA2B,EAAE,YAAyB;QACxG,MAAM,KAAK,GAAgD;YACzD,aAAa,EAAE,gCAAgC,CAAC,aAAa;YAC7D,OAAO,EAAE,EAAE,EAAE,EAAE,gBAAgB,EAAE;YACjC,YAAY,EAAE,IAAI;YAClB,wBAAwB,EAAE,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,8CAA8C,CAAC,cAAc,CAAC;YACzI,UAAU,EAAE,EAAE;YACd,sBAAsB,EAAE,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,4CAA4C,CAAC,YAAY,CAAC;SAClI,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,MAAgB,EAAE,gBAA4B,EACjE,IAAwB,EAAE,EAAsB,EAAE,cAA2B,EAAE,YAAyB;QACxG,OAAO,IAAI,gCAAgC,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,EAAE,EAAE,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;IAC9H,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,MAAgB,EAAE,gBAA4B,EACjE,IAAwB,EAAE,EAAsB,EAAE,cAA2B,EAAE,YAAyB;QACxG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,EAAE,EAAE,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;IACvG,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LinearReferencing\r\n */\r\n\r\nimport { Id64String, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { ElementMultiAspect, IModelDb } from \"@itwin/core-backend\";\r\nimport { RelatedElement } from \"@itwin/core-common\";\r\nimport {\r\n DistanceExpressionProps, LinearlyReferencedAtLocationAspectProps, LinearlyReferencedFromToLocationAspectProps,\r\n} from \"@itwin/linear-referencing-common\";\r\nimport {\r\n LinearlyReferencedAtPositionRefersToReferent, LinearlyReferencedFromPositionRefersToReferent, LinearlyReferencedToPositionRefersToReferent,\r\n} from \"./LinearReferencingRelationships.js\";\r\n\r\n/** Core structure carrying linearly-referenced information.\r\n * @beta\r\n */\r\nexport class DistanceExpression implements DistanceExpressionProps {\r\n public distanceAlongFromStart: number;\r\n public lateralOffsetFromILinearElement?: number;\r\n public verticalOffsetFromILinearElement?: number;\r\n public distanceAlongFromReferent?: number;\r\n\r\n constructor(props: DistanceExpressionProps) {\r\n this.distanceAlongFromStart = JsonUtils.asDouble(props.distanceAlongFromStart);\r\n this.lateralOffsetFromILinearElement = JsonUtils.asDouble(props.lateralOffsetFromILinearElement);\r\n this.verticalOffsetFromILinearElement = JsonUtils.asDouble(props.verticalOffsetFromILinearElement);\r\n this.distanceAlongFromReferent = JsonUtils.asDouble(props.distanceAlongFromReferent);\r\n }\r\n\r\n public static fromJSON(json: DistanceExpressionProps): DistanceExpression { return new DistanceExpression(json); }\r\n}\r\n\r\n/** Base class for multi-aspects carrying linearly-referenced locations.\r\n * @beta\r\n */\r\nexport class LinearlyReferencedLocation extends ElementMultiAspect {\r\n /** @internal */\r\n public static override get className(): string { return \"LinearlyReferencedLocation\"; }\r\n}\r\n\r\n/** Concrete multi-aspect class carrying 'at' linearly-referenced positions along a Linear-Element.\r\n * @beta\r\n */\r\nexport class LinearlyReferencedAtLocation extends LinearlyReferencedLocation {\r\n /** @internal */\r\n public static override get className(): string { return \"LinearlyReferencedAtLocation\"; }\r\n\r\n public atPosition: DistanceExpression;\r\n public fromReferent?: LinearlyReferencedAtPositionRefersToReferent;\r\n\r\n constructor(props: LinearlyReferencedAtLocationAspectProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.atPosition = DistanceExpression.fromJSON(props.atPosition);\r\n this.fromReferent = RelatedElement.fromJSON(props.fromReferent);\r\n }\r\n\r\n private static toProps(locatedElementId: Id64String, at: DistanceExpression, fromReferentId?: Id64String): LinearlyReferencedAtLocationAspectProps {\r\n const props: LinearlyReferencedAtLocationAspectProps = {\r\n classFullName: LinearlyReferencedAtLocation.classFullName,\r\n element: { id: locatedElementId },\r\n atPosition: at,\r\n fromReferent: (fromReferentId === undefined) ? undefined : new LinearlyReferencedAtPositionRefersToReferent(fromReferentId),\r\n };\r\n\r\n return props;\r\n }\r\n\r\n public static create(iModel: IModelDb, locatedElementId: Id64String,\r\n at: DistanceExpression, fromReferentId?: Id64String): LinearlyReferencedAtLocation {\r\n return new LinearlyReferencedAtLocation(this.toProps(locatedElementId, at, fromReferentId), iModel);\r\n }\r\n\r\n public static insert(iModel: IModelDb, locatedElementId: Id64String,\r\n at: DistanceExpression, fromReferentId?: Id64String): void {\r\n iModel.elements.insertAspect(this.toProps(locatedElementId, at, fromReferentId));\r\n }\r\n}\r\n\r\n/** Concrete multi-aspect class carrying 'from-to' linearly-referenced positions along a Linear-Element.\r\n * @beta\r\n */\r\nexport class LinearlyReferencedFromToLocation extends LinearlyReferencedLocation {\r\n /** @internal */\r\n public static override get className(): string { return \"LinearlyReferencedFromToLocation\"; }\r\n\r\n public fromPosition: DistanceExpression;\r\n public fromPositionFromReferent?: LinearlyReferencedFromPositionRefersToReferent;\r\n public toPosition: DistanceExpression;\r\n public toPositionFromReferent?: LinearlyReferencedToPositionRefersToReferent;\r\n\r\n constructor(props: LinearlyReferencedFromToLocationAspectProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.fromPosition = DistanceExpression.fromJSON(props.fromPosition);\r\n this.toPosition = DistanceExpression.fromJSON(props.toPosition);\r\n this.fromPositionFromReferent = RelatedElement.fromJSON(props.fromPositionFromReferent);\r\n this.toPositionFromReferent = RelatedElement.fromJSON(props.toPositionFromReferent);\r\n }\r\n\r\n private static toProps(locatedElementId: Id64String,\r\n from: DistanceExpression, to: DistanceExpression, fromReferentId?: Id64String, toReferentId?: Id64String): LinearlyReferencedFromToLocationAspectProps {\r\n const props: LinearlyReferencedFromToLocationAspectProps = {\r\n classFullName: LinearlyReferencedFromToLocation.classFullName,\r\n element: { id: locatedElementId },\r\n fromPosition: from,\r\n fromPositionFromReferent: (fromReferentId === undefined) ? undefined : new LinearlyReferencedFromPositionRefersToReferent(fromReferentId),\r\n toPosition: to,\r\n toPositionFromReferent: (toReferentId === undefined) ? undefined : new LinearlyReferencedToPositionRefersToReferent(toReferentId),\r\n };\r\n\r\n return props;\r\n }\r\n\r\n public static create(iModel: IModelDb, locatedElementId: Id64String,\r\n from: DistanceExpression, to: DistanceExpression, fromReferentId?: Id64String, toReferentId?: Id64String): LinearlyReferencedFromToLocation {\r\n return new LinearlyReferencedFromToLocation(this.toProps(locatedElementId, from, to, fromReferentId, toReferentId), iModel);\r\n }\r\n\r\n public static insert(iModel: IModelDb, locatedElementId: Id64String,\r\n from: DistanceExpression, to: DistanceExpression, fromReferentId?: Id64String, toReferentId?: Id64String): void {\r\n iModel.elements.insertAspect(this.toProps(locatedElementId, from, to, fromReferentId, toReferentId));\r\n }\r\n}\r\n"]}
@@ -0,0 +1,202 @@
1
+ /** @packageDocumentation
2
+ * @module LinearReferencing
3
+ */
4
+ import { Id64String } from "@itwin/core-bentley";
5
+ import { IModelDb, PhysicalElement, SpatialLocationElement } from "@itwin/core-backend";
6
+ import { ElementProps, GeometricElement3dProps, PhysicalElementProps } from "@itwin/core-common";
7
+ import { LinearLocationReference, LinearlyLocatedAttributionProps, LinearlyReferencedAtLocationProps, LinearlyReferencedFromToLocationProps, QueryParams, ReferentElementProps } from "@itwin/linear-referencing-common";
8
+ import { LinearlyReferencedAtLocation, LinearlyReferencedFromToLocation } from "./LinearReferencingElementAspects.js";
9
+ import { ILinearlyLocatedAttributesElement, IReferentReferencesElement } from "./LinearReferencingRelationships.js";
10
+ /** Base class for Spatial Location Element subclasses representing properties whose value is located along a Linear-Element and only applies to a portion of an Element.
11
+ * @beta
12
+ */
13
+ export declare abstract class LinearlyLocatedAttribution extends SpatialLocationElement {
14
+ /** @internal */
15
+ static get className(): string;
16
+ attributedElement?: ILinearlyLocatedAttributesElement;
17
+ constructor(props: LinearlyLocatedAttributionProps, iModel: IModelDb);
18
+ getLinearElementId(): Id64String | undefined;
19
+ }
20
+ /** Base class for Spatial Location Element implementations that are linearly located along a Linear-Element.
21
+ * @beta
22
+ */
23
+ export declare abstract class LinearLocationElement extends SpatialLocationElement implements LinearlyLocatedBase {
24
+ /** @internal */
25
+ static get className(): string;
26
+ constructor(props: GeometricElement3dProps, iModel: IModelDb);
27
+ getLinearElementId(): Id64String | undefined;
28
+ }
29
+ /** Linear Referencing Location attached to an Element not inherently Linearly Referenced.
30
+ * @beta
31
+ */
32
+ export declare class LinearLocation extends LinearLocationElement implements LinearlyLocatedBase {
33
+ /** @internal */
34
+ static get className(): string;
35
+ constructor(props: GeometricElement3dProps, iModel: IModelDb);
36
+ private static toProps;
37
+ static create(iModel: IModelDb, modelId: Id64String, categoryId: Id64String): LinearLocation;
38
+ static insertFromTo(iModel: IModelDb, modelId: Id64String, categoryId: Id64String, linearElementId: Id64String, fromToPosition: LinearlyReferencedFromToLocationProps, locatedElementId: Id64String): Id64String;
39
+ insertFromTo(iModel: IModelDb, linearElementId: Id64String, fromToPosition: LinearlyReferencedFromToLocationProps, locatedElementId: Id64String): Id64String;
40
+ static insertAt(iModel: IModelDb, modelId: Id64String, categoryId: Id64String, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps, locatedElementId: Id64String): Id64String;
41
+ insertAt(iModel: IModelDb, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps, locatedElementId: Id64String): Id64String;
42
+ }
43
+ /** Base class for Physical Elements that are inherently linearly located along a Linear-Element.
44
+ * @beta
45
+ */
46
+ export declare abstract class LinearPhysicalElement extends PhysicalElement {
47
+ /** @internal */
48
+ static get className(): string;
49
+ constructor(props: PhysicalElementProps, iModel: IModelDb);
50
+ }
51
+ /** Spatial Location Element that can play the role of a Referent (known location along a Linear-Element).
52
+ * @beta
53
+ */
54
+ export declare abstract class ReferentElement extends SpatialLocationElement implements LinearlyLocatedBase {
55
+ /** @internal */
56
+ static get className(): string;
57
+ referencedElement?: IReferentReferencesElement;
58
+ constructor(props: ReferentElementProps, iModel: IModelDb);
59
+ getLinearElementId(): Id64String | undefined;
60
+ }
61
+ /** Referent-implementation turning any bis:SpatialElement not inherently Linearly-Referenced into a Referent for Linear-Referencing purposes.
62
+ * @beta
63
+ */
64
+ export declare class Referent extends ReferentElement {
65
+ /** @internal */
66
+ static get className(): string;
67
+ constructor(props: ReferentElementProps, iModel: IModelDb);
68
+ private static toProps;
69
+ static create(iModel: IModelDb, modelId: Id64String, categoryId: Id64String, referencedElementId: Id64String): Referent;
70
+ static insertAt(iModel: IModelDb, modelId: Id64String, categoryId: Id64String, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps, referencedElementId: Id64String): Id64String;
71
+ insertAt(iModel: IModelDb, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps): Id64String;
72
+ }
73
+ /** A class offering services for LinearlyLocated elements.
74
+ * @beta
75
+ */
76
+ export declare class LinearlyLocated {
77
+ private static insertBasic;
78
+ /** Insert a new LinearlyLocated element into an iModel at a specific location along an existing Linear-Element.
79
+ * @param iModel The iModel to insert the new element into.
80
+ * @param elProps The properties of the new element.
81
+ * @param linearElementId The Id of the Linear-Element along which the new LinearlyLocated will be inserted.
82
+ * @param atPosition Linear position.
83
+ * @returns The newly inserted element's Id.
84
+ * @throws [[IModelError]] if unable to insert the element.
85
+ */
86
+ static insertAt(iModel: IModelDb, elProps: ElementProps, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps): Id64String;
87
+ /** Insert a new LinearlyLocated element into an iModel at a specific from-to location along an existing Linear-Element.
88
+ * @param iModel The iModel to insert the new element into.
89
+ * @param elProps The properties of the new element.
90
+ * @param linearElementId The Id of the Linear-Element along which the new LinearlyLocated will be inserted.
91
+ * @param fromToPosition Linear position.
92
+ * @returns The newly inserted element's Id.
93
+ * @throws [[IModelError]] if unable to insert the element.
94
+ */
95
+ static insertFromTo(iModel: IModelDb, elProps: ElementProps, linearElementId: Id64String, fromToPosition: LinearlyReferencedFromToLocationProps): Id64String;
96
+ private static getLinearLocations;
97
+ private static queryFirstLinearLocationAspectId;
98
+ /** Query for LinearlyReferenced AtLocation aspects owned by the specified LinearlyLocated Element.
99
+ * @param iModel The iModel to query from.
100
+ * @param linearlyLocatedElementId The id of the LinearlyLocated Element to query aspects about.
101
+ * @returns Returns an array of LinearlyReferencedAtLocation.
102
+ * @throws [[IModelError]]
103
+ */
104
+ static getAtLocations(iModel: IModelDb, linearlyLocatedElementId: Id64String): LinearlyReferencedAtLocation[];
105
+ /** Query for the single LinearlyReferenced AtLocation aspect owned by the specified LinearlyLocated Element. If more than one aspect is expected, use [[getAtLocations]] instead.
106
+ * @param iModel The iModel to query from.
107
+ * @param linearlyLocatedElementId The id of the LinearlyLocated Element to query about.
108
+ * @returns Returns an LinearlyReferencedAtLocation or undefined is none is found.
109
+ * @throws [[IModelError]]
110
+ */
111
+ static getAtLocation(iModel: IModelDb, linearlyLocatedElementId: Id64String): LinearlyReferencedAtLocation | undefined;
112
+ /** Update an existing LinearlyReferencedAtLocation aspect within the iModel.
113
+ * @param iModel The iModel to update.
114
+ * @param linearlyLocatedElementId The Id of the owning Linearly Located Element.
115
+ * @param linearLocationProps The properties to use to update the LinearlyReferencedAtLocation aspect.
116
+ * @param aspectId The Id of the aspect to update. If not known, the first aspectId will be looked-up.
117
+ * @throws [[IModelError]]
118
+ */
119
+ static updateAtLocation(iModel: IModelDb, linearlyLocatedElementId: Id64String, linearLocationProps: LinearlyReferencedAtLocationProps, aspectId?: Id64String): void;
120
+ /** Update an existing LinearlyReferencedFromToLocation aspect within the iModel.
121
+ * @param iModel The iModel to update.
122
+ * @param linearlyLocatedElementId The Id of the owning Linearly Located Element.
123
+ * @param linearLocationProps The properties to use to update the LinearlyReferencedFromToLocation aspect.
124
+ * @param aspectId The Id of the aspect to update. If not known, the first aspectId will be looked-up.
125
+ * @throws [[IModelError]]
126
+ */
127
+ static updateFromToLocation(iModel: IModelDb, linearlyLocatedElementId: Id64String, linearLocationProps: LinearlyReferencedFromToLocationProps, aspectId?: Id64String): void;
128
+ /** Query for the Id of the Linear-Element along which the specified LinearlyLocated Element is located.
129
+ * @param iModel The iModel to query from.
130
+ * @param linearlyLocatedElementId The id of the LinearlyLocated Element to query a Linear-Element for.
131
+ * @returns Returns the Id of the Linear-Element or undefined is none is assigned.
132
+ */
133
+ static getLinearElementId(iModel: IModelDb, linearlyLocatedElementId: Id64String): Id64String | undefined;
134
+ /** Query for LinearlyReferenced FromToLocation aspects owned by the specified LinearlyLocated Element.
135
+ * @param iModel The iModel to query from.
136
+ * @param linearlyLocatedElementId The id of the LinearlyLocated Element to query aspects about.
137
+ * @returns Returns an array of LinearlyReferencedFromToLocation.
138
+ * @throws [[IModelError]]
139
+ */
140
+ static getFromToLocations(iModel: IModelDb, linearlyLocatedElementId: Id64String): LinearlyReferencedFromToLocation[];
141
+ /** Query for the single LinearlyReferenced FromToLocation aspect owned by the specified LinearlyLocated Element. If more than one aspect is expected, use [[getFromToLocations]] instead.
142
+ * @param iModel The iModel to query from.
143
+ * @param linearlyLocatedElementId The id of the LinearlyLocated Element to query about.
144
+ * @returns Returns an LinearlyReferencedFromToLocation or undefined is none is found.
145
+ * @throws [[IModelError]]
146
+ */
147
+ static getFromToLocation(iModel: IModelDb, linearlyLocatedElementId: Id64String): LinearlyReferencedFromToLocation | undefined;
148
+ }
149
+ /** Base interface to optionally be implemented by Elements inherently Linearly-Located. Implementors should choose the
150
+ * appropriate sub-interface rather than implementing LinearlyLocatedBase directly.
151
+ * @beta
152
+ */
153
+ export interface LinearlyLocatedBase {
154
+ getLinearElementId(): Id64String | undefined;
155
+ }
156
+ /** Interface to optionally be implemented by Elements inherently Linearly-Located whose linear-locations are always a single at-position.
157
+ * It also provides convenient APIs for callers to reach Linear-Referencing data stored on aspects. Classes implementing this interface should
158
+ * make use of the services provided by [LinearlyLocated]($linear-referencing-backend).
159
+ * @beta
160
+ */
161
+ export interface LinearlyLocatedSingleAt extends LinearlyLocatedBase {
162
+ getAtLocation(): LinearlyReferencedAtLocation | undefined;
163
+ updateAtLocation(linearLocation: LinearlyReferencedAtLocationProps, aspectId?: Id64String): void;
164
+ }
165
+ /** Interface to optionally be implemented by Elements inherently Linearly-Located whose linear-locations are always at-positions.
166
+ * It also provides convenient APIs for callers to reach Linear-Referencing data stored on aspects. Classes implementing this interface should
167
+ * make use of the services provided by [LinearlyLocated]($linear-referencing-backend).
168
+ * @beta
169
+ */
170
+ export interface LinearlyLocatedMultipleAt extends LinearlyLocatedBase {
171
+ getAtLocations(): LinearlyReferencedAtLocation[];
172
+ updateAtLocation(linearLocation: LinearlyReferencedAtLocationProps, aspectId: Id64String): void;
173
+ }
174
+ /** Interface to optionally be implemented by Elements inherently Linearly-Located whose linear-locations are always a single from-to-position.
175
+ * It also provides convenient APIs for callers to reach Linear-Referencing data stored on aspects. Classes implementing this interface should
176
+ * make use of the services provided by [LinearlyLocated]($linear-referencing-backend).
177
+ * @beta
178
+ */
179
+ export interface LinearlyLocatedSingleFromTo extends LinearlyLocatedBase {
180
+ getFromToLocation(): LinearlyReferencedFromToLocation | undefined;
181
+ updateFromToLocation(linearLocation: LinearlyReferencedFromToLocationProps, aspectId?: Id64String): void;
182
+ }
183
+ /** Interface to optionally be implemented by Elements inherently Linearly-Located whose linear-locations are always from-to-positions.
184
+ * It also provides convenient APIs for callers to reach Linear-Referencing data stored on aspects. Classes implementing this interface should
185
+ * make use of the services provided by [LinearlyLocated]($linear-referencing-backend).
186
+ * @beta
187
+ */
188
+ export interface LinearlyLocatedMultipleFromTo extends LinearlyLocatedBase {
189
+ getFromToLocations(): LinearlyReferencedFromToLocation[];
190
+ updateFromToLocation(linearLocation: LinearlyReferencedFromToLocationProps, aspectId: Id64String): void;
191
+ }
192
+ /** A class offering services for linearly-located data along a Linear-Element.
193
+ * @beta
194
+ */
195
+ export declare class LinearElement {
196
+ /** Query for LinearLocationReferences based on specified query parameters.
197
+ * @returns Returns an array of LinearLocationReferences.
198
+ * @throws [[IModelError]]
199
+ */
200
+ static queryLinearLocations(iModel: IModelDb, linearElementId: Id64String, queryParams: QueryParams): LinearLocationReference[];
201
+ }
202
+ //# sourceMappingURL=LinearReferencingElements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinearReferencingElements.d.ts","sourceRoot":"","sources":["../../src/LinearReferencingElements.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAoB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAiC,QAAQ,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACvH,OAAO,EAAQ,YAAY,EAAE,uBAAuB,EAAe,oBAAoB,EAAkB,MAAM,oBAAoB,CAAC;AACpI,OAAO,EACa,uBAAuB,EAAE,+BAA+B,EAC1E,iCAAiC,EAA+C,qCAAqC,EACrF,WAAW,EAAE,oBAAoB,EAClE,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,4BAA4B,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AACtH,OAAO,EAC+D,iCAAiC,EAAE,0BAA0B,EAClI,MAAM,qCAAqC,CAAC;AAE7C;;GAEG;AACH,8BAAsB,0BAA2B,SAAQ,sBAAsB;IAC7E,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAAyC;IAEhF,iBAAiB,CAAC,EAAE,iCAAiC,CAAC;gBAE1C,KAAK,EA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