networkgeometryprocessor – BRDR - Aligning borders

# NetworkGeometryProcessor

    processor.NetworkGeometryProcessor(config, feedback=None)

Processor that aligns geometries based on a linear network.

This processor decomposes polygons into their exterior and interior linear rings and aligns these boundaries to the linear elements (lines and points) found in the reference dataset.

## Attributes

Name | Type | Description
--- | --- | ---
processor_id | ProcessorID | The unique identifier for this processor (ProcessorID.NETWORK).

## Methods

Name | Description
--- | ---
process | Aligns the boundaries of the input geometry to a reference network.

### process

    processor.NetworkGeometryProcessor.process(
        input_geometry,
        reference_data,
        mitre_limit,
        correction_distance,
        relevant_distance,
        **kwargs,
    )

Aligns the boundaries of the input geometry to a reference network.

The process buffers the input to find relevant network elements, processes exterior and interior rings separately, and reconstructs the polygon after alignment.

#### Parameters

Name | Type | Description | Default
--- | --- | --- | ---
input_geometry | BaseGeometry | The thematic geometry (Polygon or MultiPolygon) to align. | required
reference_data | AlignerFeatureCollection | The reference dataset, specifically using its `elements` property. | required
mitre_limit | float | Mitre limit for buffering operations. | required
correction_distance | float | Distance used for cleaning and noise reduction. | required
relevant_distance | float | The maximum distance to search for network elements. | required
**kwargs | Any | Additional arguments passed to the processor. | `{}`

#### Returns

Name | Type | Description
--- | --- | ---
| ProcessResult | A dictionary containing the reconstructed and cleaned polygon.

#### Notes

The network processing follows a “deconstruct-align-reconstruct” flow:

    graph TD
        In[Input Polygon] --> Decon[Deconstruct: Exterior & Interiors]
        Decon --> Buff[Buffer Input to Find Network]
        Buff --> Align[Align Segments to Network Elements]
        Align --> Recon[Reconstruct Polygon Rings]
        Recon --> Post[Post-processing & Sliver Removal]
        Post --> End[Final ProcessResult]