Processes various DXF entities and dispatches them to the appropriate mapper class for conversion to GeoJSON features.

Constructors

  • Initializes a new instance of the DxfEntityProcessor.

    Parameters

    • sourceSR: SpatialReference

      The source spatial reference of the DXF data.

    • targetSR: SpatialReference

      The target spatial reference for the output layers.

    • contextOverrides: Partial<IDxfJsonComponentContext> = {}

      Optional partial context to override default values.

    Returns DxfEntityProcessor

Methods

  • Converts a single coordinate pair from the source spatial reference to the target spatial reference.

    Parameters

    • x: number

      The x-coordinate to convert.

    • y: number

      The y-coordinate to convert.

    Returns Promise<[number, number]>

    A promise that resolves with the converted [x, y] coordinates.

  • Processes a single DXF entity or an array of entities. It filters out "BLOCK" and "ENDBLK" types and dispatches the rest to the appropriate handler.

    Parameters

    • entity: IEntity | IEntity[]

      The entity or array of entities to process.

    Returns Promise<void>

  • Processes all entities from the DXF data in batches to keep the UI responsive.

    Returns Promise<(FeatureLayer | GeoJSONLayer | GraphicsLayer)[]>

    A promise that resolves with an array of the generated layers.

  • Project an array of points into the target spatial reference.

    Parameters

    • points: Point[]

      Array of points to project.

    Returns Promise<[number, number][]>

    Array of converted coordinate pairs.