# Class DxfToGeoJsonPolygonMapper

The DxfToGeoJsonPolygonMapper class processes DXF polygon-based entities such as SOLID and CIRCLE, converting them into GeoJSON features. It also builds corresponding renderers and sublayers for visualization.

#####
Index

### Constructors

constructor

### Properties

dxfContext

### Methods

polygonToGeoJSON
processCircle
processSolid

##
Constructors

### constructor

- new DxfToGeoJsonPolygonMapper(dxfContext): DxfToGeoJsonPolygonMapper

- Creates a new instance of the DxfToGeoJsonPolygonMapper class.

  #### Parameters

  - dxfContext: IDxfJsonComponentContext

    The shared DXF conversion context.

  #### Returns DxfToGeoJsonPolygonMapper

##
Properties

### dxfContext

dxfContext: IDxfJsonComponentContext

The shared DXF context containing references to dxfContext, renderers, and layers.

##
Methods

### polygonToGeoJSON

- polygonToGeoJSON(): void

- Converts all processed polygon features into a GeoJSONLayer and adds it to the dxfContext collection.

  #### Returns void

### processCircle

- processCircle(entity): Promise<void>

- Processes a DXF CIRCLE entity and converts it into an approximate polygon (ring) for GeoJSON representation.

  #### Parameters

  - entity: ICircleEntity

    The DXF CIRCLE entity to process.

  #### Returns Promise<void>

### processSolid

- processSolid(entity): Promise<void>

- Processes a DXF SOLID entity, converts it to a polygon feature, and stores it within the context for GeoJSON conversion.

  #### Parameters

  - entity: ISolidEntity

    The DXF SOLID entity to process.

  #### Returns Promise<void>