cartagen.detect_branching_crossroads#
- detect_branching_crossroads(roads, roundabouts=None, area_threshold=2500, maximum_distance_area=0.5, allow_middle_node=True, middle_angle_tolerance=10.0, allow_single_4degree_node=True)#
Detect branching crossroads based on geometric properties.
This algorithm proposed by Touya [1] detects branching crossroads inside a road network based on the proximity between the geometry of the network face and a triangle.
- Parameters:
roads (
GeoDataFrameofLineString) – Road network to analyze.roundabouts (
GeoDataFrameofPolygon, optional) – The polygons representing the network faces considered as roundabouts. If provided, links the branching crossroad to a roundabout for collapsing.area_threshold (
int, optional) – The area (in square meters) above which the object is not considered a branching crossroads.maximum_distance_area (
float, optional) – The maximum distance area between the actual polygon and the triangle formed by the 3 nodes connecting the junction to the rest of the network.allow_middle_node (
bool, optional) – If set to True, allow 4 nodes to form the crossroads, but each must have a degree of 3 and the ‘middle’ node must have an angle of 180°.middle_angle_tolerance (
float, optional) – If allow_middle_node is set to True, indicate an angle tolerance in degree for the fourth node of the crossroad to be considered the middle node.allow_single_4degree_node (
bool, optional) – If set to True, allow one and only one node to have a degree of 4.
- Returns:
Warning
Detecting roundabouts beforehand is important as a branching crossroad may be an entrance to a roundabout. This algorithm will link branching crossroads to a roundabout when applicable, and this will help collapsing both objects.
See also
detect_roundaboutsDetect roundabouts inside the road network.
collapse_roundaboutsCollapse roundabouts to a point.
collapse_branching_crossroadsCollapse branching crossroads to a point.
References