[general]
name=roadnetwork
qgisMinimumVersion=3.40
commitNumber=
about=This plugins allows to manage a topological road network : guided editing, linear referencing, references from geometries and geometry generation from references.
icon=resources/icons/icon.png
category=
deprecated=False
hasProcessingProvider=True
description=roadnetwork
author=3Liz
email=info@3liz.com
tags=road network,linear referencing,editing
homepage=https://docs.3liz.org/qgis-road-network-plugin/
repository=https://github.com/3liz/qgis-road-network-plugin
tracker=https://github.com/3liz/qgis-road-network-plugin
experimental=False
version=0.6.2
commitSha1=638aa575782c6a33490a4160f9b10fcead4b684b
dateTime=2026-10-30T09:00:05Z
changelog=
	Version 0.6.2:
	### Summary
	
	**Highlights**
	
	* **Performance**: editing long roads is much faster, for example adding an edge crossing a road
	  of 135 edges takes about 0.6 s instead of 8 to 13 s
	* **Docs**: new explanation of the impacts of the modifications on the references, with a diagram
	
	**Upgrade notes**
	
	* Run the algorithm `Upgrade database structure` to upgrade the database (migration 41)
	
	### Changed
	
	* **SQL**: faster editing of long roads: the references of a road are no longer calculated several times
	  for one modification, and splitting an edge only calculates the references of its two parts.
	  For example on a road of 135 edges, adding a crossing edge takes about 0.6 s instead of 8 to 13 s
	  (migration `upgrade_to_41.sql`)
	* **Docs**: in the page `Road graph editing`, explain the impacts of the modifications of the edges and markers
	  on the references, upstream and downstream, with a diagram
	* **Docs**: in the page `Road graph editing`, warn against editing directly the production schema `road_graph`,
	  and explain how to correct the whole road graph after a first import with an editing session covering all the data
	
	Version 0.6.1:
	### Summary
	
	**Highlights**
	
	* **GPS tracks**: new Processing algorithm to get the road sections followed by the lines of a layer,
	  for example GPS tracks, with their start and end references
	* **Performance**: modifying a field of the edges is much faster
	
	**Upgrade notes**
	
	* Run the algorithm `Upgrade database structure` to upgrade the database (migration 40)
	
	### Added
	
	* **Processing**: new algorithm `Get road sections from a line (GPS track)` in the group `Linear referencing`,
	  which snaps the lines of a layer, for example GPS tracks, on the road graph,
	  and creates a layer with the sections of the roads they follow, with their start and end references
	
	### Changed
	
	* **SQL**: performance of the edges updates: the references of an updated edge are not calculated anymore
	  by the trigger `before_edge_insert_or_update` when they are calculated again just after
	  for the whole road, or when only another field of the edge has been modified.
	  For example, modifying a field of all the edges of a road is a few hundred times faster (migration `upgrade_to_40.sql`)
	* **SQL**: new function `road_graph.get_or_create_edge_node`, used by the trigger `before_edge_insert_or_update`
	  to get or create the start and end nodes of an edge, instead of duplicated code
	
	### Fixed
	
	* **SQL**: the search of the next edge of an edge could fail if two edges of the same road started at the same node
	
	Version 0.6.0:
	### Summary
	
	**Highlights**
	
	* **GPS tracks**: snap a GPS track, for example from a GPX file, on the road graph,
	  and get the references of each road it follows (new SQL functions)
	* **Performance**: the calculation of the references is about 9 times faster for the edges,
	  and about 3.5 times faster for the managed objects
	* **Road graph editing**: the field `no_intersection_cutting` is respected by all the trigger functions,
	  drawing an edge across a highway interchange no longer hangs, and no orphan node is created anymore
	* **Managed objects**: new functions to add the reference fields and the triggers calculating the references,
	  materialized view of the last updated objects, and fixed split of a line by a point in Lizmap
	* **Documentation**: reorganized and completed: Processing algorithms, tables and fields, functions examples,
	  demo database, toolbar and panels, training plan
	
	**Upgrade notes**
	
	* Run the algorithm `Upgrade database structure` to upgrade the database (migrations 31 to 39)
	* The editing schema `editing_session` is renamed `road_graph_editing`: recreate the QGIS administration project
	  with the algorithm `Create database local interface`, or update the data sources of the existing projects
	* The Python code of the layer actions is now stored in the plugin: the plugin must be installed and activated
	  to use the actions of the administration project
	
	### Added
	
	* **SQL**: add the function `road_graph.add_managed_object_reference_fields` which adds to a managed object table
	  the reference fields corresponding to its geometry type (migration `upgrade_to_39.sql`)
	* **SQL**: add the function `road_graph.add_managed_objects_triggers()` which creates the trigger
	  `trg_calculate_managed_object_references` on every table listed in `road_graph.managed_objects`
	  with the new column `add_trigger_on_geom_change` set to `True`, if it does not already exist
	* **SQL**: add the materialized view `road_graph.vm_managed_objects`, based on the view `v_managed_objects`
	  and refreshed at the end of the function `merge_editing_session_data`.
	  The QGIS administration project uses it instead of the view `v_managed_objects`
	* **SQL**: add the functions `road_graph.get_snapped_line_from_track` which snaps an imprecise GPS track
	  (for example from a GPX file) on the road graph edges, without zigzags between close roads,
	  and `road_graph.get_road_sections_from_snapped_line` which returns the ordered list of the roads
	  followed by the snapped line, with their start and end references (migration `upgrade_to_34.sql`)
	* **Docs**: the `Database` menu now contains the pages `Useful functions`,
	  which explains how to use these functions, and `Database structure`, which embeds the SchemaSpy documentation
	* **Docs**: explain the use of the field `no_intersection_cutting` in the page `Road graph editing`
	
	### Changed
	
	* **Docs**: reorganization and new content of the documentation:
	  new pages `Processing algorithms` and `Tables and fields`,
	  description of the toolbar and panels of the plugin, examples of the linear referencing functions,
	  creation of a demo database, example of the impacts of a graph modification on the business data,
	  the preparation of the business tables moved to the page `Managed objects`,
	  and a training plan in appendix
	* **QGIS project**: the Python code of the layer actions has been moved into the plugin
	  (module `roadnetwork/actions`). The actions of the administration project now only call
	  `plugins['roadnetwork'].run_action(...)`: `finalize_roundabout` (layer `edges copie`),
	  `display_edited_data`, `create_editing_session` and `drop_editing_session` (layer `editing_sessions`)
	* **Processing**: remove the `Schema name` parameter from the algorithms `Create database structure`
	  and `Upgrade database structure`: the plugin schema is always `road_graph`
	* **SQL**: rename the editing schema `editing_session` to `road_graph_editing`
	  (migration `upgrade_to_32.sql`). The table `road_graph.editing_sessions` and the functions
	  `*_editing_session*` keep their names. The QGIS administration project and the plugin tools
	  use the new schema name: QGIS projects created before must be recreated
	  with the algorithm `Create database local interface`, or their data sources updated
	
	### Fixed
	
	* **Processing**: in the algorithm `Update managed objects from the road graph`, the option
	  `Preserve start & end points when updating line geometries` had no effect
	* **QGIS**: in the panel `RoadNetwork tools`, pressing `Enter` in a field did not run the search `Find`
	* **QGIS**: the error message of the tool `Get references under the cursor` raised an error itself
	* **Processing**: the help of the algorithm `Merge editing session data` was the help of the algorithm cloning the data
	* **SQL**: the geometry of an editing session which status is not `created` could still be modified
	  by setting its status back to `created` in the same query, or by removing it (migration `upgrade_to_38.sql`)
	* **Lizmap**: in the references form of the road network panel, the button `Road` of the start references
	  went to the end of the road instead of its start
	* **SQL**: split of a managed object linestring by a point (Lizmap action `split_line_by_point`):
	  the references were not updated when the table has no trigger calculating them.
	  The first part now ends, and the second part starts, at the references of the cut point.
	  A feature digitized in the opposite direction of the road can now also be split (migration `upgrade_to_37.sql`)
	* **SQL**: drawing an edge across edges crossing without node (bridges, highway interchanges) never ended:
	  the parts of each split edge created nodes at all their intersections, which were propagated
	  to the edges crossing them, and so on. Only the intersections of the drawn edge are now cut
	* **SQL**: when a new edge crossed several edges, a second node, not linked to any edge,
	  could be created 10 cm away from a crossing node (rounding of the coordinates of the split parts)
	* **SQL**: the edges with `no_intersection_cutting` set to `True` were still cut by the nodes located on them,
	  for example a new edge with this value passing over an existing crossroad.
	  They are now only cut when the start or end point of a created or moved edge is located on them,
	  for example a new access road arriving in the middle of a highway edge (migration `upgrade_to_36.sql`)
	* **SQL**: performance of the references calculation: the recalculation of the edges references
	  of all the roads (`update_edge_references`) is about 9 times faster, with the same results.
	  With the road cache, the previous marker is only searched among the markers of the road
	  (all the markers of the database were read), and the edge order is stored in the cache
	  instead of being calculated again for each point
	* **SQL**: performance of the update of the managed objects references (`update_table_references_from_geometries`),
	  about 3.5 times faster on long roads: the road cache can now contain several roads,
	  and is built for the roads of the objects before calculating their references
	* **SQL**: `get_ordered_edges` returned twice the edge of the roads having only one edge
	* **SQL**: when the first edge of a road is updated, for example when it is split by a new node,
	  do not create a marker `0` if the road already has markers. Some roads do not start with the marker `0`
	  (e.g. a road starting at the marker `4 + 918`): a wrong marker `0` was created, or the editing failed
	  with the error `The object geometry must intersect the editing session polygon`
	  if the start of the road was outside the editing session (migration `upgrade_to_33.sql`)
	* **SQL**: the session variables `road.graph.*` used by the topology triggers are set with `SET LOCAL`,
	  so that their value cannot leak outside of the current transaction (migration `upgrade_to_33.sql`)
	* **SQL**: remove the `SET search_path` / `RESET search_path` inside the functions
	  `drop_editing_session`, `editing_survey` and `split_edge_by_node`, which now use the quoted schema name
	  `"road_graph"`. The function `merge_editing_session_data` has its `search_path` set in its definition
	* **Locator**: remove the prefix `rr`, which was ignored by QGIS
	  (plugin prefixes must have at least 3 characters).
	  The search is run without typing any prefix.
	


[roadnetwork]
schemaVersion=41
schemaName=road_graph
