update_managed_object_linked_geometries()


Description

Trigger function updating the lines of a managed object table which were connected to the start or the end of an updated line.

The linked lines are the other lines of the same road whose start or end point touched (5 cm tolerance) the start or end point of the line before its modification:

  • an upstream linked line gets the new start references of the line as end references,
  • a downstream linked line gets the new end references of the line as start references,
  • the cumulative distances are also updated if the fields exist.

Their geometry is built again with the function get_road_substring_from_references, keeping their offset and side: they are shortened or extended to stay connected. A linked line is not modified if its new references are not ordered (the line has been extended over it).

It must be used in an AFTER UPDATE OF geom trigger, so that the references of the updated line are already calculated, for example by the trigger trg_calculate_managed_object_references. The function road_graph.add_managed_objects_triggers creates this trigger, named trg_update_managed_object_linked_geometries.

The table must be registered in road_graph.managed_objects with a line geometry type, and have the fields road_code, start_marker_code, start_abscissa, end_marker_code and end_abscissa.

The trigger is disabled by the session variables road.graph.disable.trigger or road.graph.disable.linked.geometries set to 1.

Parameters

Name Type Mode
IN

Definition