check_graph(_checks text[] DEFAULT NULL::text[], _road_codes text[] DEFAULT NULL::text[], _options jsonb DEFAULT NULL::jsonb)


Description

Run the checks of the road graph and return one line per issue found.

The checks are listed in the table glossary_graph_check of the production schema. All the active checks are run if _checks is NULL, and all the roads are checked if _road_codes is NULL. The parameter _options overrides the default options of the checks stored in this table, with the check code as key: {“G02”: {“tolerance”: 2}}.

Each line gives the check code and title, the severity (error or warning), the road code, the ids of the edges, nodes and markers concerned, some details, the action which can fix the issue with its parameters (NULL if the issue must be fixed manually), a point locating the issue (geom) and, if useful, a line showing it (geom_detail).

The function can be run on the production schema or on the editing schema: road_graph_editing.check_graph() checks the data of the editing session. The issues must be fixed in an editing session, with the function fix_graph_issue.

Parameters

Name Type Mode
_checks text[] IN
_road_codes text[] IN
_options jsonb IN
id integer TABLE
check_code text TABLE
check_title text TABLE
severity text TABLE
road_code text TABLE
edge_ids integer[] TABLE
node_ids integer[] TABLE
marker_ids integer[] TABLE
details jsonb TABLE
fix_action text TABLE
fix_params jsonb TABLE
geom geometry TABLE
geom_detail geometry TABLE

Definition