# grb.update_featurecollection_to_actual_grb { #brdr.be.grb.grb.update_featurecollection_to_actual_grb }

```python
be.grb.grb.update_featurecollection_to_actual_grb(
    featurecollection,
    id_theme_fieldname=None,
    base_metadata_field=METADATA_FIELD_NAME,
    grb_type=GRBType.ADP,
    max_distance_for_actualisation=2.0,
    max_predictions=-1,
    full_reference_strategy=FullReferenceStrategy.NO_FULL_REFERENCE,
    multi_to_best_prediction=True,
    feedback=None,
    crs=DEFAULT_CRS,
    attributes=True,
    max_workers=None,
)
```

Update a thematic feature collection to the most recent version of the GRB.

This function automates the alignment process by first identifying which
features are 'affected' by changes in the GRB reference layer within a
specific timeframe. It then calculates and evaluates new alignment
predictions for those affected features.

## Parameters {.doc-section .doc-section-parameters}

| Name                           | Type                                                        | Description                                                                                                                                                                            | Default                                    |
|--------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------|
| featurecollection              | [Dict](`typing.Dict`)\[[str](`str`), [Any](`typing.Any`)\]  | The thematic data as a GeoJSON-like dictionary.                                                                                                                                        | _required_                                 |
| id_theme_fieldname             | [str](`str`)                                                | The property field name containing the unique ID for each feature.                                                                                                                     | `None`                                     |
| base_metadata_field            | [str](`str`)                                                | Name of the attribute field that stores the existing alignment observation (JSON string). This is used to determine the last version date.                                             | `OBSERVATION_FIELD_NAME`                   |
| grb_type                       | [GRBType](`brdr.be.grb.enums.GRBType`)                      | The type of GRB reference data to align against.                                                                                                                                       | `GRBType.ADP`                              |
| max_distance_for_actualisation | [float](`float`)                                            | Maximum distance (in meters) to search for potential alignments. The function checks intervals of 0.1m up to this value.                                                               | `2.0`                                      |
| max_predictions                | [int](`int`)                                                | Maximum number of alignment predictions to return. -1 returns all.                                                                                                                     | `-1`                                       |
| full_reference_strategy        | [FullReferenceStrategy](`brdr.enums.FullReferenceStrategy`) | Determines the prediction score when evaluating predictions, so predictions that are based on full-reference-geometries can be preferred.                                              | `NO_FULL_REFERENCE`                        |
| multi_to_best_prediction       | [bool](`bool`)                                              | If True, the prediction with the best prediction score is returned when multiple predictions are found If False, the original geometry is returned when multiple predictions are found | `True. Only useful when max_predictions=1` |
| feedback                       | [Any](`typing.Any`)                                         | Feedback object (e.g., QgsFeedback) for progress reporting and logging (in QGIS).                                                                                                      | `None`                                     |
| crs                            | [str](`str`)                                                | The Coordinate Reference System for processing.                                                                                                                                        | `DEFAULT_CRS`                              |
| attributes                     | [bool](`bool`)                                              | Whether to include the original thematic attributes in the result.                                                                                                                     | `True`                                     |
| max_workers                    | [int](`int`)                                                | The number of parallel threads to use for processing.                                                                                                                                  | `None`                                     |

## Returns {.doc-section .doc-section-returns}

| Name   | Type                                                       | Description                                                                                        |
|--------|------------------------------------------------------------|----------------------------------------------------------------------------------------------------|
|        | [Dict](`typing.Dict`)\[[str](`str`), [Any](`typing.Any`)\] | A GeoJSON-like dictionary containing the evaluated predictions and updated alignment observations. |

## Notes {.doc-section .doc-section-notes}

The function follows a specific lifecycle to optimize performance:

1. **Initialization**: Loads thematic data and the actual GRB reference data.
2. **Temporal Analysis**: Extracts the `last_version_date` from the features'
   observations to determine the relevant GRB change-window.
3. **Spatial Filtering**: Uses `get_affected_by_grb_change` to isolate only
   those geometries where the underlying GRB has actually changed.
4. **Alignment**: Executes the `Aligner.evaluate` logic only on 'affected'
   features.

## Raises {.doc-section .doc-section-raises}

| Name   | Type                       | Description                                                                |
|--------|----------------------------|----------------------------------------------------------------------------|
|        | [ValueError](`ValueError`) | If the CRS is unsupported or if the input feature collection is malformed. |