cartagen.collapse_dual_carriageways

cartagen.collapse_dual_carriageways#

collapse_dual_carriageways(roads, carriageways, propagate_attributes=None, sigma=None, blend_smoothing=False)#

Collapse dual carriageways using a TIN skeleton.

This algorithm proposed by Thom [1] collapses the network faces considered as dual carriageways using a skeleton calculated from a Delaunay triangulation.

Parameters:
  • roads (GeoDataFrame of LineString) – The road network.

  • carriageways (GeoDataFrame of Polygon) – The polygons representing the faces of the network detected as dual carriageways.

  • propagate_attributes (list of str, optional) – Propagate the provided list of column name to the resulting network. The propagated attribute is the one from the longest line.

  • sigma (float, optional) – If not None, apply a gaussian smoothing to the collapsed dual carriageways to avoid jagged lines that can be created during skeletonization.

  • blend_smoothing (bool, optional) – If True and a sigma is defined, apply the gaussian smoothing to the skeleton once it has been blended within the provided network. This will modify the network outside the extent of the detected dual carriageway polygon. If false and a sigma is defined, apply the gaussian smoothing only to the skeleton before blending with the network.

See also

detect_dual_carriageways

Detect dual carriageways inside a road network.

skeletonize_network

Blends a TIN skeleton inside a road network.

References

(Source code)

../_images/collapse_dual_carriageways.png