@vertigis/arcgis-extensions 51.12.0 → 51.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/data/convert.d.ts +24 -0
  2. package/data/convert.js +1 -1
  3. package/data/support/_dxfConverters.d.ts +538 -0
  4. package/data/support/_dxfConverters.js +1 -0
  5. package/data/support/_dxfFunctions.d.ts +82 -0
  6. package/data/support/_dxfFunctions.js +1 -0
  7. package/data/support/_dxfInterfaces.d.ts +913 -0
  8. package/data/support/_dxfInterfaces.js +1 -0
  9. package/docs/html/assets/navigation.js +1 -1
  10. package/docs/html/assets/search.js +1 -1
  11. package/docs/html/classes/data_support__dxfConverters.DxfEntityProcessor.html +31 -0
  12. package/docs/html/classes/data_support__dxfConverters.DxfToGeoJsonInsertBlockMapper.html +29 -0
  13. package/docs/html/classes/data_support__dxfConverters.DxfToGeoJsonLineMapper.html +12 -0
  14. package/docs/html/classes/data_support__dxfConverters.DxfToGeoJsonPolygonMapper.html +21 -0
  15. package/docs/html/classes/data_support__dxfConverters.DxfToGeoJsonTextMapper.html +28 -0
  16. package/docs/html/functions/data_convert.dxfToLayerExtensions.html +7 -0
  17. package/docs/html/functions/data_support__dxfConverters.mapDXFLineTypeToEsri.html +13 -0
  18. package/docs/html/functions/data_support__dxfFunctions.deriveAnnotationMinScale.html +7 -0
  19. package/docs/html/functions/data_support__dxfFunctions.intToRGB.html +4 -0
  20. package/docs/html/functions/data_support__dxfFunctions.mapBasicLineType.html +5 -0
  21. package/docs/html/functions/data_support__dxfFunctions.mapDXFLineTypeToEsri.html +6 -0
  22. package/docs/html/functions/data_support__dxfFunctions.mapIsoPatterns.html +4 -0
  23. package/docs/html/functions/data_support__dxfFunctions.mapLineTypePattern.html +5 -0
  24. package/docs/html/functions/data_support__dxfFunctions.normalizeFillStyle.html +4 -0
  25. package/docs/html/functions/data_support__dxfFunctions.normalizeLineOutline.html +8 -0
  26. package/docs/html/hierarchy.html +1 -1
  27. package/docs/html/interfaces/data_convert.DxfToLayerExtensionsOptions.html +6 -0
  28. package/docs/html/interfaces/data_support__dxfInterfaces.DxfBlock.html +15 -0
  29. package/docs/html/interfaces/data_support__dxfInterfaces.DxfEntity.html +42 -0
  30. package/docs/html/interfaces/data_support__dxfInterfaces.DxfJsonComponentProperties.html +18 -0
  31. package/docs/html/interfaces/data_support__dxfInterfaces.DxfPoint.html +8 -0
  32. package/docs/html/interfaces/data_support__dxfInterfaces.DxfScale.html +9 -0
  33. package/docs/html/interfaces/data_support__dxfInterfaces.IAttDefEntity.html +22 -0
  34. package/docs/html/interfaces/data_support__dxfInterfaces.IBaseTable.html +6 -0
  35. package/docs/html/interfaces/data_support__dxfInterfaces.IDxfData.html +10 -0
  36. package/docs/html/interfaces/data_support__dxfInterfaces.IDxfJsonComponentContext.html +62 -0
  37. package/docs/html/interfaces/data_support__dxfInterfaces.ILayer.html +12 -0
  38. package/docs/html/interfaces/data_support__dxfInterfaces.ILayerTypesTable.html +8 -0
  39. package/docs/html/interfaces/data_support__dxfInterfaces.ILayersTable.html +8 -0
  40. package/docs/html/interfaces/data_support__dxfInterfaces.ILineEntityExtended.html +4 -0
  41. package/docs/html/interfaces/data_support__dxfInterfaces.ILineType.html +10 -0
  42. package/docs/html/interfaces/data_support__dxfInterfaces.ILwpolylineEntityExtended.html +4 -0
  43. package/docs/html/interfaces/data_support__dxfInterfaces.IMTextEntity.html +18 -0
  44. package/docs/html/interfaces/data_support__dxfInterfaces.IPolylineEntityExtended.html +6 -0
  45. package/docs/html/interfaces/data_support__dxfInterfaces.ITables.html +8 -0
  46. package/docs/html/interfaces/data_support__dxfInterfaces.ITextEntityExtended.html +18 -0
  47. package/docs/html/interfaces/data_support__dxfInterfaces.IViewPort.html +50 -0
  48. package/docs/html/interfaces/data_support__dxfInterfaces.IViewPortTable.html +8 -0
  49. package/docs/html/interfaces/data_support__dxfInterfaces.LineStyle.html +4 -0
  50. package/docs/html/interfaces/data_support__dxfInterfaces.RendererPolygonEntry.html +12 -0
  51. package/docs/html/interfaces/data_support__dxfInterfaces.SimpleFillSymbolJSON.html +12 -0
  52. package/docs/html/interfaces/data_support__dxfInterfaces.SimpleMarkerSymbolDXF.html +10 -0
  53. package/docs/html/interfaces/data_support__dxfInterfaces.TextGraphicAttr.html +15 -0
  54. package/docs/html/modules/data_convert.html +2 -0
  55. package/docs/html/modules/data_support__dxfConverters.html +7 -0
  56. package/docs/html/modules/data_support__dxfFunctions.html +11 -0
  57. package/docs/html/modules/data_support__dxfInterfaces.html +30 -0
  58. package/docs/html/modules.html +3 -0
  59. package/docs/html/types/data_support__dxfFunctions.SimpleFillStyle.html +2 -0
  60. package/docs/html/types/data_support__dxfInterfaces.RendererObjectLine.html +9 -0
  61. package/docs/html/types/data_support__dxfInterfaces.RendererObjectPoint.html +5 -0
  62. package/docs/html/types/data_support__dxfInterfaces.RendererObjectPolygon.html +11 -0
  63. package/docs/html/variables/data_support__dxfFunctions.VALID_FILL_STYLES.html +1 -0
  64. package/docs/html/variables/version.version.html +1 -1
  65. package/package.json +3 -1
  66. package/utilities/_project.js +1 -1
  67. package/version.d.ts +1 -1
  68. package/version.js +1 -1
@@ -0,0 +1,913 @@
1
+ import type Point from "@arcgis/core/geometry/Point";
2
+ import type SpatialReference from "@arcgis/core/geometry/SpatialReference";
3
+ import type FeatureLayer from "@arcgis/core/layers/FeatureLayer";
4
+ import type GeoJSONLayer from "@arcgis/core/layers/GeoJSONLayer";
5
+ import type GraphicsLayer from "@arcgis/core/layers/GraphicsLayer";
6
+ import type { IEntity, IPolylineEntity, ILwpolylineEntity, ILineEntity } from "dxf-parser";
7
+ import type { DxfToGeoJsonLineMapper, DxfToGeoJsonPolygonMapper, DxfToGeoJsonTextMapper, DxfToGeoJsonInsertBlockMapper } from "./_dxfConverters";
8
+ /**
9
+ * A single coordinate point in 2D or 3D space.
10
+ */
11
+ export interface DxfPoint {
12
+ /**
13
+ * The x-coordinate.
14
+ */
15
+ x: number;
16
+ /**
17
+ * The y-coordinate.
18
+ */
19
+ y: number;
20
+ /**
21
+ * The z-coordinate.
22
+ */
23
+ z?: number;
24
+ }
25
+ /**
26
+ * Represents scale factors for the X, Y, and Z axes in a DXF file. Typically
27
+ * used to define scaling transformations applied to block inserts or entities.
28
+ */
29
+ export interface DxfScale {
30
+ /**
31
+ * Scale factor along the X-axis.
32
+ */
33
+ x: number;
34
+ /**
35
+ * Scale factor along the Y-axis.
36
+ */
37
+ y: number;
38
+ /**
39
+ * Scale factor along the Z-axis.
40
+ */
41
+ z: number;
42
+ }
43
+ /**
44
+ * Represents a DXF block that groups multiple DXF entities together. A block
45
+ * can be inserted, transformed, or reused within the DXF drawing.
46
+ */
47
+ export interface DxfBlock {
48
+ /**
49
+ * The type of block (numeric or string identifier).
50
+ */
51
+ type: string | number;
52
+ /**
53
+ * List of DXF entities that make up the block.
54
+ */
55
+ entities: DxfEntity[];
56
+ /**
57
+ * The name of the block.
58
+ */
59
+ name: string;
60
+ /**
61
+ * Optional insertion point or reference position for the block.
62
+ */
63
+ position?: DxfPoint;
64
+ /**
65
+ * Optional layer name associated with the block.
66
+ */
67
+ layer?: string;
68
+ /**
69
+ * Optional color index or code for the block.
70
+ */
71
+ color?: number;
72
+ }
73
+ /**
74
+ * Represents a single DXF entity. Entities can include points, lines, circles,
75
+ * arcs, text, or polylines.
76
+ */
77
+ export interface DxfEntity {
78
+ /**
79
+ * Type of the DXF entity (e.g., LINE, CIRCLE, TEXT).
80
+ */
81
+ type: string;
82
+ /**
83
+ * List of vertex coordinates defining geometry for polylines or shapes.
84
+ */
85
+ vertices?: DxfPoint[];
86
+ /**
87
+ * The layer on which this entity resides.
88
+ */
89
+ layer?: string;
90
+ /**
91
+ * Whether the shape entity represents a closed loop (for polylines).
92
+ */
93
+ shape?: boolean;
94
+ /**
95
+ * Whether the polyline is closed (end connects to start).
96
+ */
97
+ closed?: boolean;
98
+ /**
99
+ * The geometric center point (for circles or arcs).
100
+ */
101
+ center?: DxfPoint;
102
+ /**
103
+ * The radius (for circles and arcs).
104
+ */
105
+ radius?: number;
106
+ /**
107
+ * The start angle of an arc (in degrees).
108
+ */
109
+ startAngle?: number;
110
+ /**
111
+ * The end angle of an arc (in degrees).
112
+ */
113
+ endAngle?: number;
114
+ /**
115
+ * The text string value (for TEXT or MTEXT entities).
116
+ */
117
+ text?: string;
118
+ /**
119
+ * Position of the entity (for TEXT, INSERT, etc.).
120
+ */
121
+ position?: DxfPoint;
122
+ /**
123
+ * Height of text (for TEXT or MTEXT entities).
124
+ */
125
+ height?: number;
126
+ /**
127
+ * Rotation angle of the entity (in degrees).
128
+ */
129
+ rotation?: number;
130
+ /**
131
+ * Optional name (for block references or named entities).
132
+ */
133
+ name?: string;
134
+ /**
135
+ * Optional scale factors applied to the entity or block reference.
136
+ */
137
+ scale?: DxfScale;
138
+ /**
139
+ * Optional dictionary of nested blocks referenced by this entity.
140
+ */
141
+ blocks?: Record<string, DxfBlock>;
142
+ /**
143
+ * Name of the block this entity references (if any).
144
+ */
145
+ blockName?: string;
146
+ /**
147
+ * Flag indicating whether this entity originated from a special block
148
+ * reference.
149
+ */
150
+ isFromSpecialBlock?: boolean;
151
+ /**
152
+ * Color index or code for the entity.
153
+ */
154
+ color?: number;
155
+ }
156
+ /**
157
+ * Defines properties shared by all DXF component dxfContext. Used to configure
158
+ * renderers, color mappings, and spatial references for visualizing DXF data
159
+ * within a mapping or rendering system.
160
+ */
161
+ export interface DxfJsonComponentProperties {
162
+ /**
163
+ * Default color applied to DXF layers.
164
+ */
165
+ layerColor?: string;
166
+ /**
167
+ * Renderer configuration for point entities.
168
+ */
169
+ renderer_Object_Point?: Record<string, unknown>;
170
+ /**
171
+ * Renderer configuration for line entities.
172
+ */
173
+ renderer_Object_Line?: Record<string, unknown>;
174
+ /**
175
+ * Renderer configuration for polygon entities.
176
+ */
177
+ renderer_Object_Polygon?: Record<string, unknown>;
178
+ /**
179
+ * Raw parsed DXF data structure.
180
+ */
181
+ dxf?: Record<string, unknown>;
182
+ /**
183
+ * The source spatial reference of the DXF data.
184
+ */
185
+ sourceSR?: SpatialReference;
186
+ /**
187
+ * The target spatial reference used for projection or rendering.
188
+ */
189
+ targetSR?: SpatialReference;
190
+ }
191
+ /**
192
+ * Simple line style definition (may include dash patterns).
193
+ */
194
+ export interface LineStyle {
195
+ /**
196
+ * Numeric pattern describing dash and gap sequence.
197
+ */
198
+ pattern?: number[];
199
+ }
200
+ /**
201
+ * Represents the JSON structure for a simple fill symbol, used for serializing
202
+ * symbol properties.
203
+ */
204
+ export interface SimpleFillSymbolJSON {
205
+ /**
206
+ * The fill style of the symbol.
207
+ */
208
+ style?: "solid" | "none";
209
+ /**
210
+ * The color of the fill, represented as an RGBA array.
211
+ */
212
+ color?: number[];
213
+ /**
214
+ * The outline of the symbol.
215
+ */
216
+ outline?: {
217
+ /**
218
+ * The color of the outline, represented as an RGBA array.
219
+ */
220
+ color?: number[];
221
+ /**
222
+ * The width of the outline.
223
+ */
224
+ width?: number;
225
+ /**
226
+ * Optional type discriminator for autocasting.
227
+ */
228
+ type?: "simple-line";
229
+ };
230
+ }
231
+ /**
232
+ * Renderer definition for line entities. Each record key corresponds to a DXF
233
+ * layer or classification.
234
+ */
235
+ export type RendererObjectLine = Record<string, {
236
+ /**
237
+ * The renderer value (typically layer name or identifier).
238
+ */
239
+ value: string;
240
+ /**
241
+ * Symbol definition for rendering the line.
242
+ */
243
+ symbol: {
244
+ /**
245
+ * Symbol type, always "simple-line" for line rendering.
246
+ */
247
+ type: "simple-line";
248
+ /**
249
+ * Line style pattern or keyword (e.g., solid, dash, dot).
250
+ */
251
+ style: "solid" | "dash" | "dot" | "dash-dot" | "long-dash" | "long-dash-dot" | "short-dash" | "dash-dot" | "short-dash-dot" | LineStyle;
252
+ /**
253
+ * Width of the rendered line in pixels or map units.
254
+ */
255
+ width: number;
256
+ /**
257
+ * Optional RGBA color definition.
258
+ */
259
+ color?: number[];
260
+ };
261
+ }>;
262
+ /**
263
+ * Renderer definition for polygon entities. Used to visualize DXF closed shapes
264
+ * and filled areas.
265
+ */
266
+ export type RendererObjectPolygon = Record<string, {
267
+ /**
268
+ * The renderer value (usually layer name).
269
+ */
270
+ value: string;
271
+ /**
272
+ * Symbol definition for rendering polygons.
273
+ */
274
+ symbol: {
275
+ /**
276
+ * Symbol type, always "simple-fill" for polygons.
277
+ */
278
+ type: "simple-fill";
279
+ /**
280
+ * Fill style, can be solid or none.
281
+ */
282
+ style: "none" | "solid" | "dash" | "dot" | "dash-dot" | "long-dash" | "long-dash-dot" | "short-dash" | "dash-dot" | "short-dash-dot";
283
+ /**
284
+ * Optional RGBA fill color.
285
+ */
286
+ color?: number[];
287
+ /**
288
+ * Optional outline definition for polygon borders.
289
+ */
290
+ outline?: {
291
+ /**
292
+ * Outline color as RGBA.
293
+ */
294
+ color: number[];
295
+ /**
296
+ * Outline width in pixels or map units.
297
+ */
298
+ width?: number;
299
+ };
300
+ };
301
+ }>;
302
+ /**
303
+ * Entry definition for polygon renderer arrays.
304
+ */
305
+ export interface RendererPolygonEntry {
306
+ /**
307
+ * Renderer classification value (e.g., layer name).
308
+ */
309
+ value: string;
310
+ /**
311
+ * Symbol definition for the polygon.
312
+ */
313
+ symbol: {
314
+ /**
315
+ * Symbol type (always "simple-fill").
316
+ */
317
+ type: "simple-fill";
318
+ /**
319
+ * Fill style (always "solid" here).
320
+ */
321
+ style: "solid";
322
+ /**
323
+ * Fill color as RGBA array.
324
+ */
325
+ color: number[];
326
+ /**
327
+ * Outline properties for the polygon.
328
+ */
329
+ outline: {
330
+ /**
331
+ * Outline color as RGBA array.
332
+ */
333
+ color: number[];
334
+ /**
335
+ * Outline width in pixels or map units.
336
+ */
337
+ width: number;
338
+ };
339
+ };
340
+ }
341
+ /**
342
+ * Simple marker symbol used for rendering point entities.
343
+ */
344
+ export interface SimpleMarkerSymbolDXF {
345
+ /**
346
+ * Marker symbol type (always "simple-marker").
347
+ */
348
+ type: "simple-marker";
349
+ /**
350
+ * Marker shape style.
351
+ */
352
+ style: "none" | "circle" | "cross" | "square" | "x" | "diamond" | "triangle" | "path";
353
+ /**
354
+ * Marker size in pixels or map units.
355
+ */
356
+ size: number;
357
+ /**
358
+ * Optional fill color as RGBA array.
359
+ */
360
+ color?: number[];
361
+ }
362
+ /**
363
+ * Renderer definition for point entities. Each record key represents a DXF
364
+ * layer or symbol classification.
365
+ */
366
+ export type RendererObjectPoint = Record<string, {
367
+ /**
368
+ * Renderer value (e.g., layer or category name).
369
+ */
370
+ value: string;
371
+ /**
372
+ * Symbol definition for point rendering.
373
+ */
374
+ symbol: SimpleMarkerSymbolDXF;
375
+ }>;
376
+ /**
377
+ * Represents a DXF TEXT entity with text positioning and formatting attributes.
378
+ */
379
+ export interface ITextEntityExtended extends IEntity {
380
+ /**
381
+ * Start point of the text entity.
382
+ */
383
+ startPoint: {
384
+ x: number;
385
+ y: number;
386
+ };
387
+ /**
388
+ * Text string value.
389
+ */
390
+ text?: string;
391
+ /**
392
+ * Alternative text content field.
393
+ */
394
+ string?: string;
395
+ /**
396
+ * Tag or label identifier for the text.
397
+ */
398
+ tag?: string;
399
+ /**
400
+ * Text rotation angle in degrees.
401
+ */
402
+ rotation?: number;
403
+ /**
404
+ * Text height.
405
+ */
406
+ textHeight?: number;
407
+ /**
408
+ * The block this text entity belongs to.
409
+ */
410
+ block?: boolean;
411
+ /**
412
+ * The horizontal alignment of the text.
413
+ */
414
+ halign?: number;
415
+ }
416
+ /**
417
+ * Represents a DXF MTEXT (multiline text) entity.
418
+ */
419
+ export interface IMTextEntity extends IEntity {
420
+ /**
421
+ * Position of the text insertion point.
422
+ */
423
+ position: DxfPoint;
424
+ /**
425
+ * Text content.
426
+ */
427
+ text?: string;
428
+ /**
429
+ * Optional string content (alternative key).
430
+ */
431
+ string?: string;
432
+ /**
433
+ * Attribute tag associated with the text.
434
+ */
435
+ tag?: string;
436
+ /**
437
+ * Rotation angle of the text in degrees.
438
+ */
439
+ rotation?: number;
440
+ /**
441
+ * Text height.
442
+ */
443
+ height?: number;
444
+ /**
445
+ * Width of the multiline text block.
446
+ */
447
+ width?: number | undefined;
448
+ /**
449
+ * Attachment point for text alignment.
450
+ */
451
+ attachmentPoint?: number | undefined;
452
+ }
453
+ /**
454
+ * Represents a DXF ATTDEF (attribute definition) entity.
455
+ */
456
+ export interface IAttDefEntity extends IEntity {
457
+ /**
458
+ * Start point of the attribute definition.
459
+ */
460
+ startPoint: DxfPoint;
461
+ /**
462
+ * Optional end point for the attribute definition.
463
+ */
464
+ endPoint?: DxfPoint;
465
+ /**
466
+ * Text content associated with the attribute.
467
+ */
468
+ text?: string;
469
+ /**
470
+ * Attribute tag identifier.
471
+ */
472
+ tag?: string;
473
+ /**
474
+ * Prompt message displayed in block insertion.
475
+ */
476
+ prompt?: string;
477
+ /**
478
+ * Name of the block this attribute belongs to.
479
+ */
480
+ blockName?: string;
481
+ /**
482
+ * Text Height of the attribute text.
483
+ */
484
+ textHeight?: number;
485
+ /**
486
+ * Height of the attribute text.
487
+ */
488
+ height?: number;
489
+ /**
490
+ * Rotation angle of the text.
491
+ */
492
+ rotation?: number;
493
+ /**
494
+ * Optional horizontal justification.
495
+ */
496
+ horizontalJustification?: number | undefined;
497
+ }
498
+ /**
499
+ * Extended interface for POLYLINE entities.
500
+ */
501
+ export interface IPolylineEntityExtended extends IPolylineEntity {
502
+ /**
503
+ * Whether the polyline is closed.
504
+ */
505
+ closed?: boolean;
506
+ /**
507
+ * The width of the polyline.
508
+ */
509
+ width?: number;
510
+ }
511
+ /**
512
+ * Extended interface for LWPOLYLINE entities.
513
+ */
514
+ export interface ILwpolylineEntityExtended extends ILwpolylineEntity {
515
+ /**
516
+ * Whether this lightweight polyline is closed (DXF flag 1).
517
+ */
518
+ closed?: boolean;
519
+ }
520
+ /**
521
+ * Extended interface for LINE entities, including optional block reference.
522
+ */
523
+ export interface ILineEntityExtended extends ILineEntity {
524
+ /**
525
+ * The optional block name this line belongs to.
526
+ */
527
+ blockName?: string;
528
+ }
529
+ /**
530
+ * Base table definition used in DXF file tables section.
531
+ */
532
+ export interface IBaseTable {
533
+ /**
534
+ * Unique handle identifier for this table.
535
+ */
536
+ handle: string;
537
+ /**
538
+ * Handle of the owner object.
539
+ */
540
+ ownerHandle: string;
541
+ }
542
+ /**
543
+ * Represents a DXF viewport table entry.
544
+ */
545
+ export interface IViewPort {
546
+ /**
547
+ * Name of the viewport.
548
+ */
549
+ name: string;
550
+ /**
551
+ * Lower-left corner of the viewport.
552
+ */
553
+ lowerLeftCorner: DxfPoint;
554
+ /**
555
+ * Upper-right corner of the viewport.
556
+ */
557
+ upperRightCorner: DxfPoint;
558
+ /**
559
+ * Center point of the viewport.
560
+ */
561
+ center: DxfPoint;
562
+ /**
563
+ * Snap base point for the viewport.
564
+ */
565
+ snapBasePoint: DxfPoint;
566
+ /**
567
+ * Snap spacing setting.
568
+ */
569
+ snapSpacing: DxfPoint;
570
+ /**
571
+ * Grid spacing setting.
572
+ */
573
+ gridSpacing: DxfPoint;
574
+ /**
575
+ * Viewing direction vector from the target.
576
+ */
577
+ viewDirectionFromTarget: DxfPoint;
578
+ /**
579
+ * Viewing target coordinates.
580
+ */
581
+ viewTarget: DxfPoint;
582
+ /**
583
+ * Lens length for the viewport camera.
584
+ */
585
+ lensLength: number;
586
+ /**
587
+ * Front clipping plane setting.
588
+ */
589
+ frontClippingPlane: string | number | boolean;
590
+ /**
591
+ * Back clipping plane setting.
592
+ */
593
+ backClippingPlane: string | number | boolean;
594
+ /**
595
+ * View height of the viewport.
596
+ */
597
+ viewHeight: number;
598
+ /**
599
+ * Snap rotation angle in radians.
600
+ */
601
+ snapRotationAngle: number;
602
+ /**
603
+ * View twist angle in radians.
604
+ */
605
+ viewTwistAngle: number;
606
+ /**
607
+ * Orthographic projection type.
608
+ */
609
+ orthographicType: string;
610
+ /**
611
+ * UCS origin point.
612
+ */
613
+ ucsOrigin: DxfPoint;
614
+ /**
615
+ * UCS X-axis vector.
616
+ */
617
+ ucsXAxis: DxfPoint;
618
+ /**
619
+ * UCS Y-axis vector.
620
+ */
621
+ ucsYAxis: DxfPoint;
622
+ /**
623
+ * Render mode for the viewport.
624
+ */
625
+ renderMode: string;
626
+ /**
627
+ * Default lighting type.
628
+ */
629
+ defaultLightingType: string;
630
+ /**
631
+ * Indicates if default lighting is enabled.
632
+ */
633
+ defaultLightingOn: string;
634
+ /**
635
+ * Owner handle reference.
636
+ */
637
+ ownerHandle: string;
638
+ /**
639
+ * Ambient light color index.
640
+ */
641
+ ambientColor: number;
642
+ }
643
+ /**
644
+ * Represents a DXF line type definition.
645
+ */
646
+ export interface ILineType {
647
+ /**
648
+ * Name of the line type.
649
+ */
650
+ name: string;
651
+ /**
652
+ * Description of the line type.
653
+ */
654
+ description: string;
655
+ /**
656
+ * Dash pattern definition.
657
+ */
658
+ pattern: string[];
659
+ /**
660
+ * Total pattern length.
661
+ */
662
+ patternLength: number;
663
+ }
664
+ /**
665
+ * Represents the attributes for a text graphic.
666
+ *
667
+ * @interface TextGraphicAttr
668
+ */
669
+ export interface TextGraphicAttr {
670
+ /**
671
+ * The horizontal alignment of the text.
672
+ *
673
+ * @type {"left" | "right" | "center"}
674
+ */
675
+ horizontal: "left" | "right" | "center";
676
+ /**
677
+ * The vertical alignment of the text.
678
+ *
679
+ * @type {"baseline" | "bottom" | "middle" | "top"}
680
+ */
681
+ vertical: "baseline" | "bottom" | "middle" | "top";
682
+ /**
683
+ * The text content of the graphic.
684
+ *
685
+ * @type {string}
686
+ */
687
+ textContent: string;
688
+ /**
689
+ * The base font size for the text.
690
+ *
691
+ * @type {number}
692
+ */
693
+ baseFontSize: number;
694
+ /**
695
+ * The rotation angle of the text in degrees.
696
+ *
697
+ * @type {number}
698
+ */
699
+ rotation: number;
700
+ /**
701
+ * The color of the text in a string format (e.g., "#FFFFFF" for white).
702
+ *
703
+ * @type {string}
704
+ */
705
+ color: string;
706
+ }
707
+ /**
708
+ * Represents a DXF layer definition.
709
+ */
710
+ export interface ILayer {
711
+ /**
712
+ * Layer name.
713
+ */
714
+ name: string;
715
+ /**
716
+ * Whether the layer is visible.
717
+ */
718
+ visible: boolean;
719
+ /**
720
+ * Color index associated with the layer.
721
+ */
722
+ colorIndex: number;
723
+ /**
724
+ * Color value (RGB integer).
725
+ */
726
+ color: number;
727
+ /**
728
+ * Whether the layer is frozen (not displayed).
729
+ */
730
+ frozen: boolean;
731
+ }
732
+ /**
733
+ * Represents the DXF viewport table section.
734
+ */
735
+ export interface IViewPortTable extends IBaseTable {
736
+ /**
737
+ * Collection of viewports defined in the table.
738
+ */
739
+ viewPorts: IViewPort[];
740
+ }
741
+ /**
742
+ * Represents the DXF line type table section.
743
+ */
744
+ export interface ILayerTypesTable extends IBaseTable {
745
+ /**
746
+ * Collection of line type definitions.
747
+ */
748
+ lineTypes: Record<string, ILineType>;
749
+ }
750
+ /**
751
+ * Represents the DXF layer table section.
752
+ */
753
+ export interface ILayersTable extends IBaseTable {
754
+ /**
755
+ * Collection of layer definitions.
756
+ */
757
+ layers: Record<string, ILayer>;
758
+ }
759
+ /**
760
+ * Represents the full set of tables defined in a DXF file.
761
+ */
762
+ export interface ITables {
763
+ /**
764
+ * Viewport table.
765
+ */
766
+ viewPort: IViewPortTable;
767
+ /**
768
+ * Line type table.
769
+ */
770
+ lineType: ILayerTypesTable;
771
+ /**
772
+ * Layer table.
773
+ */
774
+ layer: ILayersTable;
775
+ }
776
+ /**
777
+ * Represents the core parsed DXF data dxfContext.
778
+ */
779
+ export interface IDxfData {
780
+ /**
781
+ * The header section of the DXF file.
782
+ */
783
+ header: Record<string, unknown>;
784
+ /**
785
+ * DXF tables (viewports, layers, line types).
786
+ */
787
+ tables: ITables;
788
+ /**
789
+ * Collection of all entities parsed from the DXF.
790
+ */
791
+ entities: IEntity[];
792
+ /**
793
+ * Optional map of block definitions.
794
+ */
795
+ blocks?: Record<string, DxfBlock>;
796
+ }
797
+ /**
798
+ * Context object for DXF-to-GeoJSON or map layer conversion.
799
+ */
800
+ export interface IDxfJsonComponentContext {
801
+ /**
802
+ * Parsed DXF data structure.
803
+ */
804
+ dxf: IDxfData;
805
+ /**
806
+ * Renderer for point features.
807
+ */
808
+ renderer_Object_Point: RendererObjectPoint;
809
+ /**
810
+ * Renderer for line features.
811
+ */
812
+ renderer_Object_Line: RendererObjectLine;
813
+ /**
814
+ * Renderer for polygon features.
815
+ */
816
+ renderer_Object_Polygon: RendererObjectPolygon;
817
+ /**
818
+ * Source spatial reference.
819
+ */
820
+ sourceSR: SpatialReference;
821
+ /**
822
+ * Target spatial reference for transformation.
823
+ */
824
+ targetSR: SpatialReference;
825
+ /**
826
+ * Generated sublayers (GeoJSON or graphics layers).
827
+ */
828
+ subLayers: (GeoJSONLayer | GraphicsLayer | FeatureLayer)[];
829
+ /**
830
+ * DxfContext responsible for line entity processing.
831
+ */
832
+ dxfToGeoJsonLineMapper: DxfToGeoJsonLineMapper;
833
+ /**
834
+ * DxfContext responsible for polygon entity processing.
835
+ */
836
+ dxfToGeoJsonPolygonMapper: DxfToGeoJsonPolygonMapper;
837
+ /**
838
+ * DxfContext responsible for text entity processing.
839
+ */
840
+ dxfToGeoJsonTextMapper: DxfToGeoJsonTextMapper;
841
+ /**
842
+ * DxfContext responsible for insert block handling.
843
+ */
844
+ dxfToGeoJsonInsertBlockMapper: DxfToGeoJsonInsertBlockMapper;
845
+ /**
846
+ * Generated GeoJSON point features.
847
+ */
848
+ pointFeatures: GeoJSON.Feature[];
849
+ /**
850
+ * Generated GeoJSON line features.
851
+ */
852
+ lineFeatures: GeoJSON.Feature[];
853
+ /**
854
+ * Generated GeoJSON polygon features.
855
+ */
856
+ polygonFeatures: GeoJSON.Feature[];
857
+ /**
858
+ * Generated GeoJSON text features.
859
+ */
860
+ textFeatures: GeoJSON.Feature[];
861
+ /**
862
+ * Process DXF entities and convert them to GIS features.
863
+ *
864
+ * @param entity The entity or list of entities to process.
865
+ */
866
+ dxfEntities(entity: IEntity | IEntity[]): Promise<void>;
867
+ /**
868
+ * Convert raw XY coordinates into the target spatial reference.
869
+ *
870
+ * @param x X coordinate value.
871
+ * @param y Y coordinate value.
872
+ * @returns Converted coordinate pair.
873
+ */
874
+ convertToSpatialReference(x: number, y: number): Promise<[number, number]>;
875
+ /**
876
+ * Project an array of points into the target spatial reference.
877
+ *
878
+ * @param points Array of points to project.
879
+ * @returns Array of converted coordinate pairs.
880
+ */
881
+ projectMany(points: Point[]): Promise<[number, number][]>;
882
+ /**
883
+ * Convert a DXF integer color value to an RGB array.
884
+ *
885
+ * @param colorInt Integer color value.
886
+ * @returns RGB array.
887
+ */
888
+ intToRGB(colorInt: number): number[];
889
+ /**
890
+ * The original file name of the DXF file.
891
+ */
892
+ fileName?: string;
893
+ /**
894
+ * A sanitized version of the file name suitable for use in an ID.
895
+ */
896
+ sanitizedFileName?: string;
897
+ /**
898
+ * The end coordinate of the last processed line or arc segment, used for
899
+ * determining continuity. It is `undefined` if there is no previous segment
900
+ * or if continuity is broken.
901
+ */
902
+ lastLineEnd?: [number, number] | undefined;
903
+ /**
904
+ * A running index to provide unique colors for entities.
905
+ */
906
+ colorIndex: number;
907
+ /**
908
+ * The layer of the last processed line or arc segment. This is used in
909
+ * conjunction with `lastLineEnd` to ensure that line segments are only
910
+ * merged if they belong to the same layer.
911
+ */
912
+ lastLineLayer?: string | undefined;
913
+ }