graph TD
In[Input Geometry] --> OD{OD Strategy?}
OD -- EXCLUDE --> Snap[Snap to Real Refs]
OD -- AS_IS --> Keep[Keep OD part as-is]
OD -- OTHER --> Virtual[Create Virtual Ref]
Virtual --> SnapAll[Snap to Real + Virtual Refs]
Keep --> Merge[Merge snapped & as-is parts]
Snap --> Post[Post-process Result]
SnapAll --> Post
Merge --> Post
SnapGeometryProcessor
processor.SnapGeometryProcessor(config, feedback=None)Processor that aligns geometries by snapping them to the reference data.
This processor uses the snapping algorithm to pull the vertices of the thematic geometry towards the nearest components of the reference data within a specified distance.
Attributes
| Name | Type | Description |
|---|---|---|
| processor_id | ProcessorID | The unique identifier for this processor (ProcessorID.SNAP). |
Methods
| Name | Description |
|---|---|
| process | Aligns the input geometry by snapping its vertices to the reference geometries. |
process
processor.SnapGeometryProcessor.process(
correction_distance,
reference_data,
input_geometry,
mitre_limit,
relevant_distance,
**kwargs,
)Aligns the input geometry by snapping its vertices to the reference geometries.
The process considers the Open Domain (OD) strategy to determine how areas not covered by reference features should be handled (e.g., ignored, kept as-is, or used as a virtual snapping target).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| correction_distance | float | Distance used for cleaning geometric noise. | required |
| reference_data | AlignerFeatureCollection | The collection of reference geometries. | required |
| input_geometry | BaseGeometry | The thematic geometry to be snapped. | required |
| mitre_limit | float | Mitre limit for buffering operations. | required |
| relevant_distance | float | The maximum distance within which snapping occurs. | required |
| **kwargs | Any | Additional arguments passed to the processor. | {} |
Returns
| Name | Type | Description |
|---|---|---|
| ProcessResult | A dictionary containing the snapped result and difference metrics. |
Notes
The snapping logic is influenced by the od_strategy (Open Domain):