cartagen.dissolve_network

cartagen.dissolve_network#

dissolve_network(network)#

Removes degree-2 nodes within a line network.

Simplifies a road network by removing degree-2 nodes and merging connected LineStrings, preserving attributes from the longest segment.

This function is also suitable for river networks as it preserves the direction of the LineStrings. It also keeps crossing sections (tunnels and bridges).

Parameters:

network (GeoDataFrame of LineString) – The network to dissolve.

Returns:

GeoDataFrame of LineString

See also

make_planar

Make the network planar and keep the relationship between sections.

(Source code)

../_images/dissolve_network.png