cartagen.strokes_roads

Contents

cartagen.strokes_roads#

strokes_roads(roads, attributes=None, angle=45.0, angle_sum=30.0)#

Calculate strokes inside a road network.

This algorithm is based on the ‘Good Continuation’ principle as defined by Thomson & Richardson. [1] It defines strokes, which are segments that follow this perceptual grouping also known as Gestalt’s principle.

Parameters:
  • roads (GeoDataFrame of LineString) – The roads to calculate the strokes from.

  • attributes (list of str) – The list of attributes to help the derivation of continuity.

  • angle (float, optional) – Thresholds for the maximum angle between two segments at the junction of two sections belonging to the same stroke.

  • angle_sum (float, optional) – Thresholds for the maximum angle between two sections belonging to the same stroke.

Returns:

GeoDataFrame of LineString

See also

strokes_rivers

Calculate strokes inside a river network.

References

(Source code)

../_images/strokes_roads.png